AnthropicClaude 托管智能体

更新部署

修改一个定时部署的计划、触发条件或目标环境。

POST /anthropic/v1/deployments/{deployment_id}○ 未支持

请求参数

  • deployment_idstring必填

    path: 部署 ID(路径或查询参数)。

  • namestring可选

    Human-readable name. Must be non-empty. Omit to preserve. Cannot be cleared.

  • agentstring | object可选

    Agent to deploy. Accepts the `agent` ID string, which re-pins to the latest version, or an `agent` object with both id and version specified. Omit to preserve. Cannot be cleared.

    ▸ 展开子字段(3)
    • idstring必填

      The `agent` ID.

    • typestring必填
      取值 agent
    • versionnumber可选

      The specific `agent` version to use. Omit to use the latest version. Must be at least 1 if specified.

  • environment_idstring可选

    ID of the `environment` where sessions run. Omit to preserve. Cannot be cleared.

  • budgetobject可选

    A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.

    ▸ 展开子字段(2)
    • max_list_costobject必填

      A monetary amount in a specific currency.

    • typestring必填
      取值 limit
  • descriptionstring可选

    Description. Omit to preserve; send empty string or null to clear.

  • initial_eventsarray可选

    Initial events. Full replacement. Omit to preserve. Cannot be cleared. At least 1, maximum 50.

  • metadataobject可选

    Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars.

  • resourcesarray可选

    Session resources. Full replacement. Omit to preserve; send empty array or null to clear. Maximum 500.

  • scheduleobject可选

    5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone.

    ▸ 展开子字段(3)
    • expressionstring必填

      5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 \* \* 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).

    • timezonestring必填

      Required. IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Validated against the IANA timezone database.

    • typestring必填
      取值 cron
  • ▸ 更多参数(1)
    • vault_idsarray可选

      Vault IDs. Full replacement. Omit to preserve; send empty array or null to clear. Maximum 50.

返回

501 平台还没有实现这个端点;调用会得到下面这个响应:

平台还不能按计划或触发条件自动运行智能体。调用会返回 501(not_implemented_error),不产生副作用,官方 SDK 不会重试。

错误按 Claude Managed Agents 格式返回,参见 错误码

响应

HTTP 200

Successful response

application/json

名称类型说明
idstringUnique identifier for this deployment.
agentobjectA resolved agent reference with a concrete version.
agent.idstring
agent.typestring
agent.versionnumber
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
descriptionnull | stringDescription of what the deployment does.
environment_idstringID of the `environment` where sessions run.
initial_eventsarray<object>Events sent to each session immediately after creation.
initial_events[].contentarray<object>Array of content blocks for the user message. / System content blocks to append. Text-only.
initial_events[].typestring
initial_events[].descriptionstringWhat the agent should produce. This is the task specification.
initial_events[].rubricobjectRubric for grading the quality of an outcome.
initial_events[].max_iterationsnull | numberEval→revision cycles before giving up. Default 3, max 20.
metadataobjectArbitrary key-value metadata. Maximum 16 pairs.
namestringHuman-readable name.
paused_reasonnull | objectWhy a deployment is paused. Non-null exactly when `status` is `paused`.
paused_reason.typestring
paused_reason.errorobjectThe error that triggered an auto-pause. Matches the failed run's `error.type`.
resourcesarray<object>Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.
resources[].typestring
resources[].urlstringGithub URL of the repository
resources[].checkoutnull | objectBranch or commit to check out. Defaults to the repository's default branch.
resources[].mount_pathnull | stringMount path in the container. Defaults to `/workspace/<repo-name>`. / Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
resources[].file_idstringID of a previously uploaded file.
resources[].memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
resources[].accessnull | stringAccess mode for an attached memory store.
resources[].instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
schedulenull | object5-field POSIX cron schedule with computed runtime timestamps.
schedule.expressionstring5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).
schedule.timezonestringIANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
schedule.typestring
schedule.last_run_atnull | stringA timestamp in RFC 3339 format
schedule.upcoming_runs_atarray<string>Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused deployments (reflects what the schedule would do if unpaused); empty once the deployment is archived (`archived_at` set). Each fire is offset by a small per-schedule jitter, so a run will actually start at or shortly after its listed time.
statusstringLifecycle status of a deployment.
typestring
updated_atstringA timestamp in RFC 3339 format
vault_idsarray<string>Vault IDs supplying stored credentials for sessions created from this deployment.
budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
budget.max_list_costobjectA monetary amount in a specific currency.
budget.typestring