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"
}