部署ToolComposer需要以下步骤:
环境要求:Python 3.12+,pip或uv包管理器
安装依赖:
cd backend
pip install -r requirements.txt
# 或使用 uv
uv sync
配置API信息:
需要修改各代理文件中的LLM配置,包括:
- orchestrator/work_node.py
- worker_agent/openapi_agent//_agent.py
- worker_agent/mcp_agent/kubernetes_agent/kubernetes_agent.py
配置项包括:base_url(LLM API地址)、api_key(API密钥)、model_name(模型名称如gpt-4)
启动服务:
- 先启动各代理服务:
python start_agents.py - 再启动主服务器:
python server.py
主服务器默认在 http://localhost:30011 启动,提供与OpenAI API兼容的接口。