by alishangtian
A powerful, extensible multi‑agent workflow engine built with Python and FastAPI, enabling dynamic tool invocation, visual workflow orchestration, real‑time monitoring, sandboxed code execution, and MCP integration.
Proteus AI provides a flexible platform for constructing and managing complex automation tasks and intelligent agent systems. It combines chain‑of‑thought reasoning, dynamic tool calling, and a visual workflow editor to allow users to design, execute, and monitor multi‑agent pipelines.
cd sandbox && ./build.sh && cd ...cd proteus && docker build -t proteus-agent .../bin/generate-ssl-cert.sh inside the proteus directory..env.example files in docker/volumes/agent and docker/volumes/sandbox to .env and edit as needed.cd docker && docker-compose up -d.https://localhost (or http://localhost:8000).proteus/bin scripts), or the Android client.Q: Do I need to write code to add new node types?
A: No. New nodes can be added by creating a Python file under proteus/src/nodes/ and registering it in agent_node_config.yaml.
Q: How is code execution sandboxed?
A: The sandbox runs in a separate Docker container built from the sandbox directory, isolating filesystem and network access.
Q: Can I run Proteus AI without Docker? A: It is possible but not recommended; the Docker setup ensures isolation of the sandbox and simplifies service orchestration.
Q: What models are supported?
A: Any LLM accessible via the configured model_name (e.g., deepseek-chat). Model endpoints are defined in the configuration files under proteus/conf/.
Q: How do I enable MCP tool integration?
A: Define MCP server credentials in the environment variables and use the mcp-agent mode when launching an agent.
Proteus AI 是一个强大的、可扩展的、基于 Python 和 FastAPI 构建的多智能体工作流引擎。它旨在提供一个灵活、高效的平台,用于构建和管理复杂的自动化任务和智能代理系统。
Proteus(普罗透斯)源自希腊神话中的海神,他以能够随意改变自己的形态而闻名。这个名字完美契合了本项目的核心特性:
内置多种节点类型,涵盖多种操作,并支持轻松扩展:
| 类别 | 节点类型 | 功能描述 |
|---|---|---|
| 数据库操作 | db_query, db_execute, mysql_node |
数据库查询和执行 |
| 信息检索 | duckduckgo_search, arxiv_search, serper_search |
多种搜索引擎集成 |
| Web 爬虫 | web_crawler |
网页内容抓取 |
| 代码与自动化 | python_execute |
Python 代码和 Shell 脚本执行(沙箱环境) |
| 浏览器自动化 | browser_agent |
浏览器操作自动化 |
| 交互与通信 | api_call, chat, email_sender |
API 调用、聊天节点、邮件发送 |
| 技能管理 | skills_extract |
技能解析与管理(列出、获取、读取技能文件) |
| 特殊功能 | weather_forecast |
天气预报查询(通过经纬度获取天气数据) |
提供独立的沙箱环境,用于安全地执行 Python 代码和终端命令,隔离潜在风险。
请查看 examples/ 文件夹中的研究报告示例,展示 Proteus 在复杂信息收集和分析方面的能力:
请严格遵循以下流程构建和启动项目。
首先构建用于安全执行代码的沙箱环境镜像。
cd sandbox
./build.sh
cd ..
构建核心 Agent 服务的镜像。
cd proteus
docker build -t proteus-agent .
为 Nginx 服务生成 SSL 证书,以支持 HTTPS 访问。
# 确保在 proteus 目录下
./bin/generate-ssl-cert.sh
进入 Docker 目录并启动所有服务。
cd docker
# 首次启动前,请确保配置了必要的环境变量
# 复制示例配置文件
# cp volumes/agent/.env.example volumes/agent/.env
# cp volumes/sandbox/.env.example volumes/sandbox/.env
# 启动服务
docker-compose up -d
服务启动后:
https://localhost (通过 Nginx 代理) 或 http://localhost:8000http://localhost:8000 (容器内部端口)主要配置项位于 proteus/docker/volumes/agent/.env 文件中。您需要从 .env.example 复制并配置:
Proteus AI 提供多种智能体运行模式,适用于不同场景:
| 模式 | 描述 |
|---|---|
chat |
纯对话模式,支持工具调用和多轮对话 |
task |
任务模式,自动规划并完成复杂任务 |
workflow |
工作流模式,执行可视化工作流 |
super-agent |
超级智能体,具备更强的规划与执行能力 |
mcp-agent |
MCP 模式,通过 Model Context Protocol 调用外部工具 |
browser-agent |
浏览器操作模式,支持自动化网页交互 |
deep-research |
深度研究模式,对指定主题进行系统性深度研究 |
deep-research-multi |
多智能体协作深度研究模式 |
codeact-agent |
代码执行智能体,通过编写和运行代码解决问题 |
Proteus AI 的核心是 Chat 智能体,这是一个功能强大的对话智能体,支持工具调用和上下文管理:
# 使用 Chat 智能体进行对话
chat_agent = ChatAgent(
stream_manager=stream_manager,
model_name="deepseek-chat",
enable_tools=True,
tool_choices=["serper_search", "web_crawler", "python_execute"],
max_tool_iterations=5,
conversation_id=conversation_id,
conversation_round=5,
enable_tool_memory=True,
enable_skills_memory=True,
user_name=user_name,
selected_skills=selected_skills,
workspace_path=workspace_path, # 可选,工作区路径
)
# 运行智能体
result = await chat_agent.run(
chat_id=chat_id,
text="请搜索最新的人工智能发展动态并进行分析",
file_analysis_context=file_context
)
核心特性:
proteus-ai/
├── proteus/ # 主应用目录
│ ├── src/ # 源代码
│ │ ├── agent/ # 智能体系统(chat_agent.py、base_agent.py、prompt/)
│ │ ├── nodes/ # 节点实现(agent_node_config.yaml 及各节点文件)
│ │ ├── api/ # API 接口(stream_manager、llm_api、events 等)
│ │ ├── auth/ # 认证模块
│ │ ├── login/ # 登录模块
│ │ ├── manager/ # 管理器模块(会话、模型等)
│ │ ├── tasks/ # 任务处理器
│ │ └── utils/ # 工具函数
│ ├── static/ # 静态文件(Web 界面)
│ ├── conf/ # 配置文件(压缩策略、模型配置等)
│ ├── docker/ # Docker 配置及 volumes
│ ├── bin/ # 脚本工具(SSL 证书生成等)
│ ├── scripts/ # 辅助脚本
│ ├── tests/ # 测试文件
│ └── requirements.txt # Python 依赖
├── sandbox/ # 沙箱环境(安全代码执行)
├── app/ # Android 客户端
│ └── src/ # Kotlin/Compose 源码
├── server/ # 轻量级 Web 服务器
│ ├── main.py # FastAPI 主应用
│ ├── requirements.txt # Python 依赖
│ └── .env.example # 环境变量示例
├── examples/ # 使用示例
│ ├── deep-research/ # 深度研究报告示例
│ └── self_improving_agent/ # 自我改进智能体示例
├── AGENTS.md # 智能体详细文档
└── README.md # 项目说明
proteus/src/nodes/ 目录下创建新的节点文件proteus/src/nodes/agent_node_config.yaml 中注册 Agent 工具配置proteus/src/agent/prompt/ 中添加新的提示词模板proteus/src/agent/agent.py 实现新的推理方法proteus/static/ 目录# 运行测试
cd proteus
python -m pytest tests/
app/ 目录包含 Proteus AI 的官方 Android 客户端,基于 Jetpack Compose + Kotlin + Material Design 3 构建,让你随时随地通过手机使用 AI 智能体服务。详细说明见 app/README.md。
按照本 README 上方的"快速开始"章节启动 Proteus AI 后端服务。
# 进入 app 目录
cd app
# 编译调试版 APK(需已配置 Android SDK 环境变量)
./gradlew assembleDebug
# 安装到已连接的 Android 设备
adb install app/build/outputs/apk/debug/app-debug.apk
推荐使用 Android Studio 2023.3+ 打开
app/目录,点击 ▶️ Run 直接安装并运行。
| 场景 | 配置方式 |
|---|---|
| Android 模拟器访问本机(默认) | 无需修改,默认 http://10.0.2.2:8888/ |
| 真机访问局域网服务器 | 修改 app/build.gradle.kts 中 defaultConfig 的 BASE_URL 为局域网 IP |
| 生产环境 | 修改 buildTypes.release 中的 BASE_URL |
更多详细说明(架构、接口文档、常见问题等)请查看
app/README.md。
server/ 目录包含一个基于 FastAPI 的轻量级 Web 服务器,提供对话管理、模型配置查询、任务队列提交和 SSE 流式重放等接口,详细说明见 server/README.md。
| 方法 | 路径 | 说明 |
|---|---|---|
GET |
/conversations |
获取当前用户的会话列表 |
GET |
/conversations/{id} |
获取指定会话详情 |
GET |
/models |
获取可用模型列表 |
GET |
/replay/stream/{chat_id} |
SSE 流式重放已保存的聊天记录 |
POST |
/submit_task |
提交任务到 Redis 队列 |
GET |
/health |
服务健康检查 |
cd server
# 安装依赖
pip install -r requirements.txt
# 配置环境变量
cp .env.example .env
# 编辑 .env,填写 Redis 连接信息
# 启动服务
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
服务启动后可访问:
在请求头中携带 Bearer Token:
Authorization: Bearer <your_token>
我们致力于不断改进 Proteus 引擎,以下是未来可能优先考虑的功能和优化:
欢迎提交 Issue 和 Pull Request 来帮助改进项目。在提交代码前,请确保:
本项目采用 MIT 许可证,详见 LICENSE 文件。
如果您在使用过程中遇到问题或有改进建议,请通过以下方式联系我们:
Proteus AI - 让复杂任务变得简单自动化
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by activepieces
A self‑hosted, open‑source platform that provides a no‑code builder for creating, versioning, and running AI‑driven automation workflows. Pieces are TypeScript‑based plugins that become MCP servers, allowing direct consumption by large language models.
by Skyvern-AI
Automates browser‑based workflows by leveraging large language models and computer‑vision techniques, turning natural‑language prompts into fully functional web interactions without writing custom scripts.
by ahujasid
Enables Claude AI to control Blender for prompt‑assisted 3D modeling, scene creation, and manipulation via a socket‑based Model Context Protocol server.
by PipedreamHQ
Connect APIs quickly with a free, hosted integration platform that enables event‑driven automations across 1,000+ services and supports custom code in Node.js, Python, Go, or Bash.
by elie222
Organizes email inbox, drafts replies in the user's tone, tracks follow‑ups, and provides analytics to achieve inbox zero quickly.
by grab
Enables Cursor AI to read and programmatically modify Figma designs through a Model Context Protocol integration.
by CursorTouch
Enables AI agents to control the Windows operating system, performing file navigation, application launching, UI interaction, QA testing, and other automation tasks through a lightweight server.
by ahujasid
Enables Claude AI to control Ableton Live in real time, allowing AI‑driven creation, editing, and playback of tracks, clips, instruments, and effects through a socket‑based server.
by leonardsellem
Provides tools and resources to enable AI assistants to manage and execute n8n workflows via natural language commands.