^-^
Life love
OpenManus部署笔记
最近更新:2025-06-18   |   字数总计:439   |   阅读估时:1分钟   |   阅读量:
  1. OpenManus
    1. git使用代理
    2. 安装
    3. 浏览器自动化工具(可选)
  2. 配置说明
  3. 快速启动
  4. 添加自定义多智能体

OpenManus

git使用代理

1
2
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890

安装

在python官网安装,安装引导选择将python添加到path环境变量。

  1. 在 vscode git bash 安装 uv(一个快速的 Python 包管理器):
1
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. 克隆仓库:
1
2
git clone https://github.com/FoundationAgents/OpenManus.git
cd OpenManus
  1. 在git bash创建并激活虚拟环境:
1
2
uv venv --python 3.version
source .venv/bin/activate
  1. 安装依赖:
1
uv pip install -r requirements.txt

浏览器自动化工具(可选)

1
playwright install

配置说明

OpenManus 需要配置使用的 LLM API,请按以下步骤设置:

  1. config​ 目录创建 config.toml​ 文件(可从示例复制):
1
cp config/config.example.toml config/config.toml
  1. 编辑 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:

1
python main.py

然后通过终端输入你的创意!

如需使用 MCP 工具版本,可运行:

1
python run_mcp.py

如需体验不稳定的多智能体版本,可运行:

1
python run_flow.py

添加自定义多智能体

目前除了通用的 OpenManus Agent, 我们还内置了DataAnalysis Agent,适用于数据分析和数据可视化任务,你可以在config.toml​中将这个智能体加入到run_flow​中

1
2
3
# run-flow可选配置
[runflow]
use_data_analysis_agent = true # 默认关闭,将其改为true则为激活

除此之外,你还需要安装相关的依赖来确保智能体正常运行:具体安装指南