|
| 1 | +<div align="center"> |
| 2 | + |
| 3 | +<img src="assets/alias.png" alt="Alias-Agent Logo" width="500" height="250" style="vertical-align: middle; margin-right: 20px;"> |
| 4 | +<h1 style="text-decoration: none; border-bottom: none; display: inline; vertical-align: middle; margin: 0;">Alias-Agent: Start It Now, Extend It Your Way, Deploy All with Ease</h1> |
| 5 | + |
| 6 | +</div> |
| 7 | + |
| 8 | +## Project introduction |
| 9 | +*Alias-Agent* (short for *Alias*) is an LLM-empowered agent built on [AgentScope](https://github.com/agentscope-ai/agentscope) and [AgentScope-runtime](https://github.com/agentscope-ai/agentscope-runtime/), designed to serve as an intelligent assistant for responding to user queries. Alias excels at decomposing complicated problems, constructing roadmaps, and applying appropriate strategies to tackle diverse real-world tasks. |
| 10 | + |
| 11 | +Specifically, Alias provides three operational modes for flexible task execution: |
| 12 | +- **Simple React**: Employs vanilla reasoning-acting loops to iteratively solve problems and execute tool calls. |
| 13 | +- **Planner-Worker**: Uses intelligent planning to decompose complex tasks into manageable subtasks, with dedicated worker agents handling each subtask independently. |
| 14 | +- **Built-in Agents**: Leverages specialized agents tailored for specific domains, including *Deep Research Agent* for comprehensive analysis and *Browser-use Agent* for web-based interactions. More details can refer to the following "Basic Usage" section. |
| 15 | + |
| 16 | +We aim for Alias to serve as an out-of-the-box solution that users can readily deploy for various tasks. |
| 17 | + |
| 18 | +## Coming soon |
| 19 | + |
| 20 | +Beyond being a ready-to-use agent, we envision Alias as a foundational template that can be adapted to different scenarios. Developers can extend and customize Alias at the tool, prompt, and agent levels to meet their specific requirements. |
| 21 | + |
| 22 | +We are actively developing specialized enhancements and adaptations for: |
| 23 | +- **Business Intelligence (BI)** scenarios |
| 24 | +- **Financial** analysis applications |
| 25 | +- **Question-Answering (QA)** systems |
| 26 | + |
| 27 | +Stay tuned for upcoming releases! |
| 28 | + |
| 29 | + |
| 30 | +## Installation |
| 31 | + |
| 32 | +Install the Alias package in development mode: |
| 33 | + |
| 34 | +```bash |
| 35 | +pip install -e . |
| 36 | + |
| 37 | +# SETUP SANDBOX |
| 38 | +# If you are using colima, then you need to run the following |
| 39 | +# export DOCKER_HOST=unix://$HOME/.colima/default/docker.sock |
| 40 | +# More details can refer to https://runtime.agentscope.io/en/sandbox.html |
| 41 | + |
| 42 | +# Option 1: Pull from registry |
| 43 | +export RUNTIME_SANDBOX_REGISTRY=agentscope-registry.ap-southeast-1.cr.aliyuncs.com |
| 44 | +docker pull agentscope-registry.ap-southeast-1.cr.aliyuncs.com/agentscope/runtime-sandbox-alias:latest |
| 45 | + |
| 46 | +# Option 2: pull from docker hub |
| 47 | +docker pull agentscope/runtime-sandbox-alias:latest |
| 48 | +``` |
| 49 | + |
| 50 | +This will install the `alias` command-line tool. |
| 51 | + |
| 52 | +## Basic Usage |
| 53 | + |
| 54 | +The `alias` CLI provides a terminal interface to run AI agents for various tasks. |
| 55 | + |
| 56 | +### Run Command |
| 57 | + |
| 58 | +First of all, set up API keys |
| 59 | +```bash |
| 60 | +# Model API keys |
| 61 | +export DASHSCOPE_API_KEY=your_dashscope_api_key_here |
| 62 | + |
| 63 | +# Using other models: go to src/alias/agent/run.py and add your model to MODEL_FORMATTER_MAPPING, then run the bash to set your model and api key. For example: |
| 64 | +#export MODEL=gpt-5 |
| 65 | +#export OPENAI_API_KEY=your_openai_api_key_here |
| 66 | + |
| 67 | +# Search api key (required for deep research) |
| 68 | +export TAVILY_API_KEY=your_tavily_api_key_here |
| 69 | +``` |
| 70 | + |
| 71 | +Execute an agent task: |
| 72 | + |
| 73 | +```bash |
| 74 | +alias_agent run --task "Your task description here" |
| 75 | +``` |
| 76 | + |
| 77 | +### Examples |
| 78 | + |
| 79 | +#### Run with all agents (Meta Planner with workers): |
| 80 | +```bash |
| 81 | +alias_agent run --task "Analyze Meta stock performance in Q1 2025" |
| 82 | +``` |
| 83 | + |
| 84 | +#### Run with only browser agent: |
| 85 | + |
| 86 | +```bash |
| 87 | +alias_agent run --mode browser --task "Search five latest research papers about browser-use agent" |
| 88 | +``` |
| 89 | + |
| 90 | +#### Upload files to sandbox workspace: |
| 91 | +```bash |
| 92 | +# Upload a single file |
| 93 | +alias_agent run --task "Analyze this data" --files data.csv |
| 94 | + |
| 95 | +# Upload multiple files |
| 96 | +alias_agent run --task "Process these files and create a summary report" --files report.txt data.csv notes.md |
| 97 | + |
| 98 | +# Using short form (-f) |
| 99 | +alias_agent run --task "Review the documents" -f document1.pdf document2.txt |
| 100 | + |
| 101 | +# Combine with other options |
| 102 | +alias_agent run --mode all --task "Analyze the data and generate insights" --files dataset.csv --verbose |
| 103 | +``` |
| 104 | + |
| 105 | +**Note**: Files uploaded with `--files` are automatically copied to the `/workspace` directory in the sandbox with their original filenames, making them immediately accessible to the agent. |
| 106 | + |
| 107 | +### Obtain agent-generated files |
| 108 | +In the directory where you ran `alias_agent`, you should find a `sessions_mount_dir` directory with subdirectories, each containing the content from `/workspace` of the sandboxes' mounted file systems. All generated files should be located there. |
| 109 | + |
0 commit comments