跳转到内容
EN

列出部署

先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。

GET/agent/v1/deployments● 支持

请求参数

  • agent_idstring可选

    query: 智能体 ID,由 agents.create 或 agents.list 返回;用于会话筛选时,指创建该会话所用的智能体。不是智能体名称。

  • created_at[gte]string可选

    query: Return deployments created at or after this time (inclusive).

  • created_at[lte]string可选

    query: Return deployments created at or before this time (inclusive).

  • include_archivedboolean可选

    query: When true, includes archived deployments. Default: false (exclude archived).

  • statusstring可选

    query: 按状态筛选:active 或 paused。省略则返回两者。要包含已归档部署,改用 include_archived;两者不能同时使用。

  • limitnumber可选

    query: Number of items per page.

  • pagestring可选

    query: 不透明分页游标:原样传入上一响应的 next_page 值。第一页省略。来自不同查询或格式错误的游标返回 400。

返回

200

支持部署资源创建、读取、过滤、更新、归档、暂停与恢复,固定智能体版本并返回最多五次未来调度时间;初始事件仅 user.message,资源仅 file;vault_ids 最多 50 个、自动去重,须属于当前组织且未归档,不存在或已归档返回 400 vault_ids[<index>] <id> was not found。支持手动运行及每分钟 cron 调度,运行创建的会话携带该部署的 vault_ids;创建失败会记录运行错误并自动暂停,部署保存后保险库被归档记为 vault_archived_error。 自有扩展接受 agent_with_overrides 与 target=computer(仅 general 智能体)。

错误按 Anthropic 错误格式返回(type / message / request_id),参见 错误码

请求示例

curl
# 先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。
curl "https://api.deepraxis.com/agent/v1/deployments?agent_id=agent_123" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
Python
# 先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。
import requests

opts = dict(
    base_url="https://api.deepraxis.com/agent",
    api_key="$PRAXIS_API_KEY",
)

# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.get(
    f"{opts['base_url']}/v1/deployments?agent_id=agent_123",
    headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())
TypeScript
// 先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。
const opts = {
  baseURL: "https://api.deepraxis.com/agent",
  apiKey: "$PRAXIS_API_KEY",
};

// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/deployments?agent_id=agent_123`, {
  headers: { Authorization: `Bearer ${opts.apiKey}` },
});
console.log(resp.status, await resp.json());

响应示例 200

{
  "data": [
    {
      "id": "depl_96efb13ddbbc42faaf62f099c0ce2a15",
      "type": "deployment",
      "agent": {
        "type": "agent",
        "id": "agent_b1dfcbdc-5694-4c68-ac8d-6cc81867d6b6",
        "version": 1
      },
      "target": {
        "type": "environment"
      },
      "environment_id": "env_8d2160bca3bf46ca830b785ddcc3d835",
      "name": "文档测试",
      "description": null,
      "initial_events": [
        {
          "type": "user.message",
          "content": [
            {
              "type": "text",
              "text": "Hi"
            }
          ]
        }
      ],
      "resources": [],
      "vault_ids": [],
      "budget": null,
      "schedule": null,
      "metadata": {},
      "status": "active",
      "paused_reason": null,
      "created_at": "2026-10-22T15:24:29.989Z",
      "updated_at": "2026-10-22T15:24:29.989Z",
      "archived_at": null
    }
  ],
  "next_page": null
}

响应

HTTP 200

Successful response

application/json

名称 类型 说明
data array<object> Items of this page, in the order requested by the call.
data[].id string Unique identifier for this deployment.
data[].agent object Agent reference. Naming a version pins the deployment to it; naming only an id (or a bare id string) makes it follow the agent's active version, so every run uses whichever version is in effect then and a later agent save carries through automatically. The response also carries pinned_version (null while following) and active_version (the agent's currently effective version). The own face also accepts model, permission_mode and cwd overrides for new sessions.
data[].archived_at null | string A timestamp in RFC 3339 format
data[].created_at string A timestamp in RFC 3339 format
data[].description null | string Description of what the deployment does.
data[].environment_id string | null Existing, unarchived environment id; environment_id and target are alternatives, so send at least one. target=environment requires it, target=computer (own face, general agents) may omit it; null is also accepted there.
data[].initial_events array<object> Events sent to each session immediately after creation.
data[].metadata object Arbitrary key-value metadata. Maximum 16 pairs.
data[].name string Human-readable name.
data[].paused_reason null | object Why a deployment is paused. Non-null exactly when status is paused.
data[].resources array<object> Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.
data[].schedule null | object 5-field POSIX cron schedule with computed runtime timestamps.
data[].status string Lifecycle status of a deployment.
data[].type string Always deployment. A frozen set of session parameters and an optional schedule.
data[].updated_at string A timestamp in RFC 3339 format
data[].vault_ids array<string> Vault IDs supplying stored credentials for sessions created from this deployment.
data[].budget null | object A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches max_list_cost.
data[].target object Execution target. environment (default) requires an existing, unarchived environment_id. computer is available only for general agents and permits environment_id to be omitted.
next_page string | null Opaque cursor for the next page: pass it unchanged as page to continue. Null when this is the last page.

运行示例前

先创建部署,用返回的 ID 替换 depl_123。部署运行 ID drun_123 取自运行部署的响应。取消暂停前先暂停部署;测试结束后等待生成的会话空闲并删除会话,再归档部署、环境和智能体。