用途:自托管运行编码智能体(Claude Code、Codex、Hermes、OpenCode),在隔离沙箱中执行,并提供持久会话、CRON 调度、记忆管理与统一工具(MCP)访问,兼具 UI 与 REST API。
主要能力:以 harness 指定底层智能体框架;通过 MCP 注册 GitHub、AWS、文件系统、数据库或自定义工具;创建/查看/更新/删除智能体;运行单次任务或带 session_id 的多轮任务以保留上下文;创建持久会话;按 CRON 表达式调度任务;查询运行历史与详情;凭证存放在 vault 代理中。
安装与启动(需 Node.js 18+、Docker、LiteLLM API key):
git clone https://github.com/LiteLLM-Labs/litellm-agent-platform.git cd litellm-agent-platform npm install cp .env.example .env
在 .env 中配置 LITELLM_MASTER_KEY、DATABASE_URL、REDIS_URL、PORT 及各模型提供商密钥,然后 npm run dev(开发)或 npm run build && npm start(生产),默认地址 http://localhost:4000。
API 用法:请求需 Bearer 令牌。创建智能体示例:
curl http://localhost:4000/agents -X POST
-H "Authorization: Bearer $LITELLM_KEY"
-H "Content-Type: application/json"
-d '{
"name": "code-reviewer",
"harness": "codex",
"model": "openai/gpt-4",
"system_prompt": "Review code for security and best practices.",
"tools": ["github", "filesystem"]
}'
运行任务:
curl http://localhost:4000/agents/ci-fixer/runs -X POST
-H "Authorization: Bearer $LITELLM_KEY"
-H "Content-Type: application/json"
-d '{ "input": "Fix the failing CI check on PR #418" }'
其他端点包括 /agents(列表)、/agents/{name}(状态/更新/删除)、/agents/{name}/sessions、/agents/{name}/schedules、/tools、/agents/{name}/runs(历史与详情)。
适用场景:CI/CD 修复与监控、代码审查与安全扫描自动化、多步骤重构工作流、定时巡检等。
限制:需自行准备 Node.js、Docker、PostgreSQL、Redis 与各模型 API key;官方未提供定价、托管服务、性能指标或安全审计信息,暂未提供。