OpenManus 快速构建 LLM 驱动 AI 智能代理

OpenManus 是 FoundationAgents 推出的开源通用 AI Agent 框架,基于 Python 实现,可快速构建具备智能任务处理能力的链式 LLM Agent 系统,支持通过强化学习(如 GRPO)对模型进行调优,以提升复杂场景下的执行效果。项目遵循 MIT 许可证,社区活跃,Star 超过 45.7k,贡献者超 50 人,可无门槛部署与二次开发。

OpenManus 快速构建 LLM 驱动 AI 智能代理

源码:https://github.com/FoundationAgents/OpenManus/tree/main

安装指南

我们提供两种安装方式。推荐使用方式二(uv),因为它能提供更快的安装速度和更好的依赖管理。

方式一:使用 conda

  1. 创建新的 conda 环境:
conda create -n open_manus python=3.12conda activate open_manus
  1. 克隆仓库:
git clone https://github.com/mannaandpoem/OpenManus.gitcd OpenManus
  1. 安装依赖:
pip install -r requirements.txt

方式二:使用 uv(推荐)

  1. 安装 uv(一个快速的 Python 包管理器):
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. 克隆仓库:
git clone https://github.com/mannaandpoem/OpenManus.gitcd OpenManus
  1. 创建并激活虚拟环境:
uv venv --python 3.12source .venv/bin/activate  # Unix/macOS 系统# Windows 系统使用:# .venv\Scripts\activate
  1. 安装依赖:
uv pip install -r requirements.txt

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

playwright install

配置说明

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

  1. 在 config 目录创建 config.toml 文件(可从示例复制):
cp config/config.example.toml config/config.toml
  1. 编辑 config/config.toml 添加 API 密钥和自定义设置:
# 全局 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:

python main.py

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

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

python run_mcp.py

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

python run_flow.py

Libre Depot(自由仓库)原创文章、发布者:Libre Depot = 转载请注明出处:https://www.libredepot.top/zh/5653.html

(0)
Libre DepotLibre Depot
上一篇 10小时前
下一篇 2019-07-02 4:00 下午

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注