OpenManus
git使用代理
1 2
| git config --global http.proxy http: git config --global https.proxy http:
|
安装
在python官网安装,安装引导选择将python添加到path环境变量。
- 在 vscode git bash 安装 uv(一个快速的 Python 包管理器):
1
| curl -LsSf https://astral.sh/uv/install.sh | sh
|
- 克隆仓库:
1 2
| git clone https://github.com/FoundationAgents/OpenManus.git cd OpenManus
|
- 在git bash创建并激活虚拟环境:
1 2
| uv venv --python 3.version source .venv/bin/activate
|
- 安装依赖:
1
| uv pip install -r requirements.txt
|
浏览器自动化工具(可选)
配置说明
OpenManus 需要配置使用的 LLM API,请按以下步骤设置:
- 在
config 目录创建 config.toml 文件(可从示例复制):
1
| cp config/config.example.toml config/config.toml
|
- 编辑
config/config.toml 添加 API 密钥和自定义设置:
1 2 3 4 5 6 7 8 9 10 11 12 13
| # 全局 LLM 配置 [llm] model = "gpt-4o" base_url = "https://api.openai.com/v1" api_key = "sk-..." # 替换为真实 API 密钥 max_tokens = 4096 temperature = 0.0
# 可选特定 LLM 模型配置 [llm.vision] model = "gpt-4o" base_url = "https://api.openai.com/v1" api_key = "sk-..." # 替换为真实 API 密钥
|
快速启动
一行命令运行 OpenManus:
然后通过终端输入你的创意!
如需使用 MCP 工具版本,可运行:
如需体验不稳定的多智能体版本,可运行:
添加自定义多智能体
目前除了通用的 OpenManus Agent, 我们还内置了DataAnalysis Agent,适用于数据分析和数据可视化任务,你可以在config.toml中将这个智能体加入到run_flow中
1 2 3
| # run-flow可选配置 [runflow] use_data_analysis_agent = true # 默认关闭,将其改为true则为激活
|
除此之外,你还需要安装相关的依赖来确保智能体正常运行:具体安装指南