API 参考 Agents
创建 agent
POST/projects/{project_id}/agents/
把一个 agent 加入项目团队。
参数
| 请求体字段 | 必填 | 说明 |
|---|---|---|
| name | 必填 | 名册身份 |
| description | 可选 | 这个 agent 的用途 |
| model | 可选 | agent 运行的模型(见 List agent models) |
| provider | 可选 | 提供该模型的 provider |
| agent_type | 可选 | 运行时类型,默认 dsh |
| docker_image | 可选 | agent 运行时的自定义镜像 |
| driver_config | 可选 | 运行时驱动选项 |
请求
curl -X POST "$ALLYBUILD_API_URL/projects/$PROJECT_ID/agents/" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
-d '{
"name": "reviewer",
"description": "Reviews reports before publishing",
"model": "deepseek-chat"
}'响应
{
"id": "7c6d5e4f-...",
"name": "reviewer",
"model": "deepseek-chat",
"provider": "",
"agent_type": "dsh"
}