One read of Claude Developer Platformapi-20261120T193709Z
650 pages moved out of 936 read.
Pages moved
650
significant first
Pages read
936
in this capture
Captured
19:37 UTC
Corpus hash
721918d8c137
corpus-hash
What this read moved
326-350 of 650, page 14 of 26This capture is too large to show at once. Changes 326-350 of 650 are below, significant first; the rest are on the following screens.
managed-agents/self-hosted-data-and-access Changed · +16 / -16 lines
from line 44
4444
4545When the Claude API is the inference provider, each model call also carries up to three headers. They hold IDs that your server generated:
4646
47| Header | What it holds |
48| ----------------------------------------- | ------------------------------------------ |
49| `anthropic-managed-agents-session-id` | The ID of the session that the call serves |
50| `anthropic-managed-agents-agent-id` | The ID of that session’s agent |
51| `anthropic-managed-agents-environment-id` | The ID of that session’s environment |
47| Header | What it holds |
48| ----- | ----- |
49| `anthropic-managed-agents-session-id` | The ID of the session that the call serves |
50| `anthropic-managed-agents-agent-id` | The ID of that session’s agent |
51| `anthropic-managed-agents-environment-id` | The ID of that session’s environment |
5252
5353An ID holds no name and no content, but it does encode the time when your server created it. With these headers, Anthropic can attribute usage to a session, an agent, or an environment. No setting turns them off. If `ANTHROPIC_BASE_URL` names a proxy or a gateway, the headers go there. Under any other inference provider, the server never sends them.
5454
from line 104
104104
105105The server accepts API requests on one address and port. The server opens two more listeners, each only if you turn it on.
106106
107| Listener | On by default | Default address | What it asks for |
108| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
109| API requests | Yes | `127.0.0.1:8400`, which only the same machine can reach. To change the address and port, set `server.addr`. | See [Credentials that the server accepts](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#credentials-that-the-server-accepts). |
110| The [console on your server](https://platform.claude.com/docs/en/managed-agents/self-hosted/console), a webpage | Yes. To stop serving it, see [Turn off the console](https://platform.claude.com/docs/en/managed-agents/self-hosted/console#turn-off-the-console). | The same address and port as API requests | Nothing to load the page, for anyone who can reach it. To do anything in the console, a person signs in through your identity provider. |
111| The Prometheus metrics endpoint | No | `localhost:9464`, which only the same machine can reach | No credential |
112| The server’s listener for the [egress gateway](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#environment-variable-credentials) | No | Port 8410 on every interface | The gateway’s key |
107| Listener | On by default | Default address | What it asks for |
108| ----- | ----- | ----- | ----- |
109| API requests | Yes | `127.0.0.1:8400`, which only the same machine can reach. To change the address and port, set `server.addr`. | See [Credentials that the server accepts](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#credentials-that-the-server-accepts). |
110| The [console on your server](https://platform.claude.com/docs/en/managed-agents/self-hosted/console), a webpage | Yes. To stop serving it, see [Turn off the console](https://platform.claude.com/docs/en/managed-agents/self-hosted/console#turn-off-the-console). | The same address and port as API requests | Nothing to load the page, for anyone who can reach it. To do anything in the console, a person signs in through your identity provider. |
111| The Prometheus metrics endpoint | No | `localhost:9464`, which only the same machine can reach | No credential |
112| The server’s listener for the [egress gateway](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#environment-variable-credentials) | No | Port 8410 on every interface | The gateway’s key |
113113
114114More detail on the last two listeners:
115115
from line 122
122122
123123Each deployment serves one tenant at one trust level. Environments in one deployment don’t keep trust levels apart. The server API key reaches every environment. Every caller with a role can run sessions in every environment, with whatever network and files that environment’s workers can reach.
124124
125| To keep apart | Do this |
126| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
127| Tenants | Give each tenant its own deployment, with its own database, server API key, and workers. |
128| Workloads at different trust levels | Give each trust level its own deployment, set up as for a tenant. Examples are trusted and untrusted code, or workers that reach systems that only some callers may use. |
129| Callers in a deployment | Turn on [single sign-on](https://platform.claude.com/docs/en/managed-agents/self-hosted/configure#single-sign-on), map groups to the `developer` or `user` role, and keep the server API key for administrators. [What each role can do](https://platform.claude.com/docs/en/managed-agents/self-hosted/configure#what-each-role-can-do) shows what those callers see. |
125| To keep apart | Do this |
126| ----- | ----- |
127| Tenants | Give each tenant its own deployment, with its own database, server API key, and workers. |
128| Workloads at different trust levels | Give each trust level its own deployment, set up as for a tenant. Examples are trusted and untrusted code, or workers that reach systems that only some callers may use. |
129| Callers in a deployment | Turn on [single sign-on](https://platform.claude.com/docs/en/managed-agents/self-hosted/configure#single-sign-on), map groups to the `developer` or `user` role, and keep the server API key for administrators. [What each role can do](https://platform.claude.com/docs/en/managed-agents/self-hosted/configure#what-each-role-can-do) shows what those callers see. |
130130
131131### Secret managers, single sign-on, and model gateways
132132
managed-agents/self-hosted-sandboxes-custom-tools Changed · +6 / -6 lines
from line 879
879879
880880The MCP helpers keep the server’s names and descriptions, and most schemas pass through unchanged. Rename, trim, or inline where a declaration breaks one of these rules:
881881
882| Field | Rule |
883| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
884| `name` | Unique within the agent. Letters, digits, underscores, and hyphens, 1–128 characters. Cannot match a built-in agent tool such as `bash` or `read`, or use the reserved `mcp__` or `ant__` prefix. |
885| `description` | Required and non-empty. |
886| `input_schema` | Accepts the JSON Schema keywords MCP servers commonly emit, such as `additionalProperties` and `title`. Rejects reference keywords such as `$ref` anywhere, and top-level `oneOf`, `anyOf`, and `allOf`. Property names use letters, digits, underscores, dots, and hyphens, 1–64 characters. |
887| The agent’s `tools` array | At most 256 entries. Each wrapped tool is one entry, and the built-in toolset is one more. |
882| Field | Rule |
883| ----- | ----- |
884| `name` | Unique within the agent. Letters, digits, underscores, and hyphens, 1–128 characters. Cannot match a built-in agent tool such as `bash` or `read`, or use the reserved `mcp__` or `ant__` prefix. |
885| `description` | Required and non-empty. |
886| `input_schema` | Accepts the JSON Schema keywords MCP servers commonly emit, such as `additionalProperties` and `title`. Rejects reference keywords such as `$ref` anywhere, and top-level `oneOf`, `anyOf`, and `allOf`. Property names use letters, digits, underscores, dots, and hyphens, 1–64 characters. |
887| The agent’s `tools` array | At most 256 entries. Each wrapped tool is one entry, and the built-in toolset is one more. |
888888
889889Two cases need extra work:
890890
managed-agents/self-hosted-sandboxes-memory Changed · +21 / -21 lines
from line 149
149149
150150`memory_sync_interval` (typescript: `memorySyncIntervalMs`; go: `MemorySyncInterval`) sets the shortest time between two syncs while the session runs.
151151
152| Setting | Value |
153| ---------------------- | --------------------------------------------------- |
154| Default | 15 seconds |
155| Minimum | 5 seconds |
156| Example (10 seconds) | `10` (typescript: `10_000`; go: `10 * time.Second`) |
157| Disable memory support | `None` (typescript: `null`; go: `-1`) |
152| Setting | Value |
153| ----- | ----- |
154| Default | 15 seconds |
155| Minimum | 5 seconds |
156| Example (10 seconds) | `10` (typescript: `10_000`; go: `10 * time.Second`) |
157| Disable memory support | `None` (typescript: `null`; go: `-1`) |
158158
159159The worker doesn’t sync on a timer. It checks the interval after each call to a tool that runs in your sandbox, such as `bash`, `read`, or a custom tool. The call doesn’t have to touch memory. Without tool calls, nothing syncs until the [final sync](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#how-the-worker-handles-memory). A change in one session reaches another running session only after both have synced, so the wait has no fixed length.
160160
from line 168
168168
169169`memory_sync_deletions` (typescript: `memorySyncDeletions`; go: `MemorySyncDeletions`) sets whether a file the agent deletes locally is also deleted from the store. Uploads and downloads are unaffected.
170170
171| Value | Behavior |
172| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
173| `"enabled"` (go: `environments.MemorySyncDeletionsEnabled`) (default) | Deletes the memory from the store once a later sync confirms the file is still gone. |
174| `"log_only"` (go: `environments.MemorySyncDeletionsLogOnly`) | Runs the same checks but only logs what it would have deleted. Use it to watch what your workers would delete before you trust the enabled mode. |
175| `"disabled"` (go: `environments.MemorySyncDeletionsDisabled`) | Never deletes from the store. |
171| Value | Behavior |
172| ----- | ----- |
173| `"enabled"` (go: `environments.MemorySyncDeletionsEnabled`) (default) | Deletes the memory from the store once a later sync confirms the file is still gone. |
174| `"log_only"` (go: `environments.MemorySyncDeletionsLogOnly`) | Runs the same checks but only logs what it would have deleted. Use it to watch what your workers would delete before you trust the enabled mode. |
175| `"disabled"` (go: `environments.MemorySyncDeletionsDisabled`) | Never deletes from the store. |
176176
177177For example, to sync at most once every 10 seconds and only log the deletions the worker would have made, use the following sample. The sample uses `/workspace` as the working directory, which must exist before the worker starts. [Run an always-on worker](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-workers#run-an-always-on-worker) says how to create the directory and what to use on macOS.
178178
from line 312
312312
313313A conflict is a memory that changed both in the store and in the sandbox since the previous sync. A deletion counts as a change. For a store attached with `access: "read_write"`, the worker resolves the conflict at the next sync:
314314
315| In the store | In the sandbox | Result |
316| ------------ | -------------- | ---------------------------------------------------------- |
317| Changed | Changed | The store’s version overwrites the file. |
318| Changed | Deleted | The worker writes the store’s version back to the sandbox. |
319| Deleted | Changed | The worker creates the memory again from the file. |
315| In the store | In the sandbox | Result |
316| ----- | ----- | ----- |
317| Changed | Changed | The store’s version overwrites the file. |
318| Changed | Deleted | The worker writes the store’s version back to the sandbox. |
319| Deleted | Changed | The worker creates the memory again from the file. |
320320
321321In the first two rows, the agent’s change or deletion is lost, even though the tool call succeeded. Nothing tells the agent, and the only sign of the loss is a warning in the worker’s log. In the last row, the deletion in the store is undone.
322322
from line 335
335335* Availability: Available
336336
337337| Status | Cloud platforms |
338| ------ | --------------- |
339| Beta | Claude API |
338| ----- | ----- |
339| Beta | Claude API |
340340
341341### Required beta headers
342342
from line 350
350350
351351[Data handling overview](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility)
352352
353| Item | Zero data retention | HIPAA |
354| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
355| Status | Not eligible | Not eligible |
353| Item | Zero data retention | HIPAA |
354| ----- | ----- | ----- |
355| Status | Not eligible | Not eligible |
356356| Details | Not eligible for ZDR, except for self-hosted Managed Agents. Sessions are stateful resources; transcripts persist until you delete them. [Learn more](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#how-long-data-is-kept) | Not eligible for HIPAA. Applies to all Managed Agents sub-features. |
357357
358358Applicable endpoints:
managed-agents/self-hosted-sandboxes-operations Changed · +22 / -22 lines
from line 49
4949
5050`GET /v1/environments/{environment_id}/work/stats` (python, typescript, ruby: `client.beta.environments.work.stats()`; go, csharp: `client.Beta.Environments.Work.Stats()`; java: `client.beta().environments().work().stats()`; php: `$client->beta->environments->work->stats()`; cli: `ant beta:environments:work stats`) returns the queue state for an environment:
5151
52| Field | Meaning | Use it to |
53| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
54| `depth` (csharp, go: `Depth`) | Items waiting to be claimed. | Scale your worker fleet or alert on backlog. |
55| `pending` (csharp, go: `Pending`) | Items claimed by a worker but not yet acknowledged. The worker helpers acknowledge each item before processing it, so this stays near zero in normal operation. | Detect a worker that stalled between claiming and acknowledging: alert on a sustained non-zero value. |
56| `oldest_queued_at` (java, php: `oldestQueuedAt`; csharp, go: `OldestQueuedAt`) | Timestamp of the oldest item still in the queue, either waiting to be claimed or claimed but not yet acknowledged. `null` (python: `None`; ruby: `nil`; java: `Optional.empty()`; go: `""`) when there is no such item. | See how long the oldest item has waited. |
57| `workers_polling` (java, php: `workersPolling`; csharp, go: `WorkersPolling`) | Workers that have polled in the last 30 seconds. | Alert on liveness. |
52| Field | Meaning | Use it to |
53| ----- | ----- | ----- |
54| `depth` (csharp, go: `Depth`) | Items waiting to be claimed. | Scale your worker fleet or alert on backlog. |
55| `pending` (csharp, go: `Pending`) | Items claimed by a worker but not yet acknowledged. The worker helpers acknowledge each item before processing it, so this stays near zero in normal operation. | Detect a worker that stalled between claiming and acknowledging: alert on a sustained non-zero value. |
56| `oldest_queued_at` (java, php: `oldestQueuedAt`; csharp, go: `OldestQueuedAt`) | Timestamp of the oldest item still in the queue, either waiting to be claimed or claimed but not yet acknowledged. `null` (python: `None`; ruby: `nil`; java: `Optional.empty()`; go: `""`) when there is no such item. | See how long the oldest item has waited. |
57| `workers_polling` (java, php: `workersPolling`; csharp, go: `WorkersPolling`) | Workers that have polled in the last 30 seconds. | Alert on liveness. |
5858
5959<CodeGroup>
6060 ```bash cURL
from line 334
334334
3353351. **Make sure SIGTERM and SIGINT cancel the worker.** How depends on the worker:
336336
337 | Worker | What to do |
338 | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
339 | `ant` CLI | Nothing. The CLI handles both signals itself: it cancels any in-flight tool call, posts its error result, and marks the work item `stopped`. |
340 | SDK worker that is its own process | `EnvironmentWorker` installs no signal handlers. Cancel the worker from a signal handler, as the standalone worker examples do. |
341 | SDK worker inside a webhook server | Cancel the worker from the server’s own shutdown hook, as the webhook examples do. The worker must not take over the server’s signals. |
337 | Worker | What to do |
338 | ----- | ----- |
339 | `ant` CLI | Nothing. The CLI handles both signals itself: it cancels any in-flight tool call, posts its error result, and marks the work item `stopped`. |
340 | SDK worker that is its own process | `EnvironmentWorker` installs no signal handlers. Cancel the worker from a signal handler, as the standalone worker examples do. |
341 | SDK worker inside a webhook server | Cancel the worker from the server’s own shutdown hook, as the webhook examples do. The worker must not take over the server’s signals. |
342342
3433432. **Stop the worker with SIGTERM, and give it time to finish before any hard kill.** The worker needs time to end an in-flight tool call and to upload changed files to a memory store. Docker sends SIGKILL 10 seconds after the stop signal by default. Raise that limit with `--stop-timeout 60` (python: `--stop-timeout 210`) on `docker run`, or set your orchestrator’s termination grace period to the same number of seconds.
344344
from line 362
362362* **A sync failure:** The worker writes the failure to its log and doesn’t report it to the session.
363363* **A refused write to a read-only store:** The agent gets a tool error. See [Read-only stores and conflicts](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#read-only-stores-and-conflicts).
364364
365| Symptom | Cause | Fix |
366| --------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
367| The worker log contains `the work item carried no sessions token` (in Go, the `ErrSessionMemoryNoToken` error) and the work item fails. | The work item’s per-session `secret` (csharp, go: `Secret`) did not reach the worker. Either your code did not forward it, or memory stores on self-hosted sandboxes are not enabled for your organization. | [Forward the work item’s secret](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-per-session#forward-the-work-items-secret). If the worker polls and runs sessions in one process and still logs this, contact support. |
368| The worker log contains `something already exists at the memory store's path`. | Another session on the same filesystem is using that path. Or a previous session’s worker was killed before its teardown ran, so the directory stayed behind. | Check whether a worker still runs a session that uses that path. If one does, do not remove the directory: the worker removes it when it finishes with the session. If none does, remove the directory that the log line names. Edits in it that had not synced are lost. To run two such sessions at once, see [Isolate sessions that share a store](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#isolate-sessions-that-share-a-store). |
369| The worker log contains `cannot create the memory store's folder` and `the worker host must make this mount path writable`. | The user the worker runs as cannot create directories under `/mnt/memory`. | Create `/mnt/memory` and `chown` it to that user. See [Prepare the host](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#prepare-the-host). On macOS, follow [Prepare a macOS host](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#prepare-a-macos-host) instead. |
370| The session sits `idle` with a `requires_action` stop reason and no error event shortly after a worker claimed it. | The worker failed the work item because it could not mount a memory store, for one of the preceding reasons. | Fix the cause on the host, then send a [`user.interrupt`](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#interrupt-the-agent) event. The session’s work is queued again, and the next worker that claims it retries the mount. |
365| Symptom | Cause | Fix |
366| ----- | ----- | ----- |
367| The worker log contains `the work item carried no sessions token` (in Go, the `ErrSessionMemoryNoToken` error) and the work item fails. | The work item’s per-session `secret` (csharp, go: `Secret`) did not reach the worker. Either your code did not forward it, or memory stores on self-hosted sandboxes are not enabled for your organization. | [Forward the work item’s secret](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-per-session#forward-the-work-items-secret). If the worker polls and runs sessions in one process and still logs this, contact support. |
368| The worker log contains `something already exists at the memory store's path`. | Another session on the same filesystem is using that path. Or a previous session’s worker was killed before its teardown ran, so the directory stayed behind. | Check whether a worker still runs a session that uses that path. If one does, do not remove the directory: the worker removes it when it finishes with the session. If none does, remove the directory that the log line names. Edits in it that had not synced are lost. To run two such sessions at once, see [Isolate sessions that share a store](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#isolate-sessions-that-share-a-store). |
369| The worker log contains `cannot create the memory store's folder` and `the worker host must make this mount path writable`. | The user the worker runs as cannot create directories under `/mnt/memory`. | Create `/mnt/memory` and `chown` it to that user. See [Prepare the host](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#prepare-the-host). On macOS, follow [Prepare a macOS host](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#prepare-a-macos-host) instead. |
370| The session sits `idle` with a `requires_action` stop reason and no error event shortly after a worker claimed it. | The worker failed the work item because it could not mount a memory store, for one of the preceding reasons. | Fix the cause on the host, then send a [`user.interrupt`](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#interrupt-the-agent) event. The session’s work is queued again, and the next worker that claims it retries the mount. |
371371
372372### A custom tool call never returns
373373
from line 377
377377
378378Without a timeout on the MCP client, a hung call to a [wrapped MCP server](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-custom-tools#wrap-an-mcp-server-as-custom-tools) becomes an error tool result only when a backstop fires:
379379
380| SDK | Backstop | Fires after |
381| ---------- | -------------------------------------------------------------- | ----------------- |
382| Python | The worker’s own tool call limit | About 2.5 minutes |
383| TypeScript | The MCP SDK’s default request timeout | About a minute |
384| Go | The worker cancels a tool call that outlives its default limit | 120 seconds |
380| SDK | Backstop | Fires after |
381| ----- | ----- | ----- |
382| Python | The worker’s own tool call limit | About 2.5 minutes |
383| TypeScript | The MCP SDK’s default request timeout | About a minute |
384| Go | The worker cancels a tool call that outlives its default limit | 120 seconds |
385385
managed-agents/self-hosted-sandboxes-per-session Changed · +4 / -4 lines
from line 174
174174
175175A worker that claims and runs sessions in one process passes the secret along itself. `EnvironmentWorker` with `run()` (go: `Run()`) is one such worker, and `ant beta:worker poll` without `--on-work` is another. When your own code sits between the claim and the worker, you forward the secret:
176176
177| You claim work with | The secret arrives as | Pass it to the worker as |
178| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
179| `ant beta:worker poll --on-work` | The `secret` field of the work item JSON on your script’s standard input | `ANTHROPIC_WORK_SECRET` in the sandbox’s environment |
180| The Python, TypeScript, or Go SDK’s `work.poller()` (typescript: `new WorkPoller()`; go: `environments.NewWorkPoller()`) | The `secret` (go: `Secret`) field of each claimed work item | `ANTHROPIC_WORK_SECRET` in the sandbox’s environment or the `work_secret` (typescript: `workSecret`; go: `WorkSecret`) argument to `handle_item()` (typescript: `handleItem()`; go: `HandleItem()`) |
177| You claim work with | The secret arrives as | Pass it to the worker as |
178| ----- | ----- | ----- |
179| `ant beta:worker poll --on-work` | The `secret` field of the work item JSON on your script’s standard input | `ANTHROPIC_WORK_SECRET` in the sandbox’s environment |
180| The Python, TypeScript, or Go SDK’s `work.poller()` (typescript: `new WorkPoller()`; go: `environments.NewWorkPoller()`) | The `secret` (go: `Secret`) field of each claimed work item | `ANTHROPIC_WORK_SECRET` in the sandbox’s environment or the `work_secret` (typescript: `workSecret`; go: `WorkSecret`) argument to `handle_item()` (typescript: `handleItem()`; go: `HandleItem()`) |
181181
182182Pass the secret only into the sandbox that serves that session, and never log it. See [Security model](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-security) for how it relates to the environment key.
183183
managed-agents/self-hosted-sandboxes-reference Changed · +55 / -55 lines
from line 40
4040
4141## CLI commands and flags
4242
43| Command | Description |
44| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
43| Command | Description |
44| ----- | ----- |
4545| `ant beta:worker poll` | Claims work items from the environment’s queue and runs each session in process. With `--on-work`, calls your script for each work item instead. |
46| `ant beta:worker run` | Handles one claimed session and exits. Use it as the entrypoint of a per-session sandbox. |
46| `ant beta:worker run` | Handles one claimed session and exits. Use it as the entrypoint of a per-session sandbox. |
4747
48| Flag | Description |
49| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
50| `--environment-id` | The environment to poll for work. Also reads from `ANTHROPIC_ENVIRONMENT_ID`. |
51| `--environment-key` | Authenticates the worker with this environment. Also reads from `ANTHROPIC_ENVIRONMENT_KEY`. |
52| `--workdir` | Directory where the worker downloads skills and where tools read and write files. Defaults to `.` (the current directory). The directory must exist before the worker starts. |
53| `--on-work` | Script to call for each claimed work item instead of running tools in process. Receives session details as environment variables and the work item as JSON on standard input. |
54| `--max-idle` | How long the worker waits while a session is idle before `ant beta:worker run` exits or `ant beta:worker poll` moves on to the next work item. Idle time with a [`requires_action` stop reason](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#respond-when-the-session-goes-idle) does not count. Defaults to `60s`. Set it to `0` to turn off the timeout. With an `--on-work` script, `ant beta:worker poll` ignores this flag. Pass it instead to the `ant beta:worker run` command that your script starts. |
55| `--log-format` | Log output format. Use `json` for structured log ingestion. Defaults to `text`. |
48| Flag | Description |
49| ----- | ----- |
50| `--environment-id` | The environment to poll for work. Also reads from `ANTHROPIC_ENVIRONMENT_ID`. |
51| `--environment-key` | Authenticates the worker with this environment. Also reads from `ANTHROPIC_ENVIRONMENT_KEY`. |
52| `--workdir` | Directory where the worker downloads skills and where tools read and write files. Defaults to `.` (the current directory). The directory must exist before the worker starts. |
53| `--on-work` | Script to call for each claimed work item instead of running tools in process. Receives session details as environment variables and the work item as JSON on standard input. |
54| `--max-idle` | How long the worker waits while a session is idle before `ant beta:worker run` exits or `ant beta:worker poll` moves on to the next work item. Idle time with a [`requires_action` stop reason](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#respond-when-the-session-goes-idle) does not count. Defaults to `60s`. Set it to `0` to turn off the timeout. With an `--on-work` script, `ant beta:worker poll` ignores this flag. Pass it instead to the `ant beta:worker run` command that your script starts. |
55| `--log-format` | Log output format. Use `json` for structured log ingestion. Defaults to `text`. |
5656
5757## Environment variables
5858
59| Variable | Description | Set by |
60| ------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
61| `ANTHROPIC_ENVIRONMENT_ID` | The environment whose queue the worker serves. | You, on the worker host. The poller passes it to the `--on-work` script. |
62| `ANTHROPIC_ENVIRONMENT_KEY` | Authenticates the worker to its queue. | You, on the worker host. The poller passes it to the `--on-work` script. |
63| `ANTHROPIC_SESSION_ID` | The session that a claimed work item represents. | The poller, for the `--on-work` script. |
64| `ANTHROPIC_WORK_ID` | The claimed work item. | The poller, for the `--on-work` script. |
65| `ANTHROPIC_WORK_SECRET` | The work item’s secret for its session. | You. The poller does not set it. See [Forward the work item’s secret](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-per-session#forward-the-work-items-secret). |
66| `ANTHROPIC_BASE_URL` | Overrides the default API endpoint. Optional. | You, on the worker host. |
67| `ANTHROPIC_WEBHOOK_SIGNING_KEY` | Verifies incoming webhook payloads. | You, on a webhook handler host. |
59| Variable | Description | Set by |
60| ----- | ----- | ----- |
61| `ANTHROPIC_ENVIRONMENT_ID` | The environment whose queue the worker serves. | You, on the worker host. The poller passes it to the `--on-work` script. |
62| `ANTHROPIC_ENVIRONMENT_KEY` | Authenticates the worker to its queue. | You, on the worker host. The poller passes it to the `--on-work` script. |
63| `ANTHROPIC_SESSION_ID` | The session that a claimed work item represents. | The poller, for the `--on-work` script. |
64| `ANTHROPIC_WORK_ID` | The claimed work item. | The poller, for the `--on-work` script. |
65| `ANTHROPIC_WORK_SECRET` | The work item’s secret for its session. | You. The poller does not set it. See [Forward the work item’s secret](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-per-session#forward-the-work-items-secret). |
66| `ANTHROPIC_BASE_URL` | Overrides the default API endpoint. Optional. | You, on the worker host. |
67| `ANTHROPIC_WEBHOOK_SIGNING_KEY` | Verifies incoming webhook payloads. | You, on a webhook handler host. |
6868
6969## Host requirements
7070
71| Worker | Requirement |
72| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
73| All workers | A Linux or macOS host with `/bin/bash` at that exact path. The worker’s `bash` tool runs it directly, without consulting `PATH`. On macOS, that is the system Bash 3.2. |
74| TypeScript SDK | `unzip` and `tar` on the `PATH`, and Node.js 22 or later. |
75| Python and Go SDKs | No additional binaries. These SDKs use their standard libraries for archive extraction. |
71| Worker | Requirement |
72| ----- | ----- |
73| All workers | A Linux or macOS host with `/bin/bash` at that exact path. The worker’s `bash` tool runs it directly, without consulting `PATH`. On macOS, that is the system Bash 3.2. |
74| TypeScript SDK | `unzip` and `tar` on the `PATH`, and Node.js 22 or later. |
75| Python and Go SDKs | No additional binaries. These SDKs use their standard libraries for archive extraction. |
7676
7777[Memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#requirements) add their own requirements.
7878
from line 80
8080
8181## Sandbox filesystem
8282
83| Path | Contents |
84| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
85| `/workspace` | The working directory in the samples on the self-hosted sandboxes pages. It is not the worker’s default: the worker uses the current directory unless you set `--workdir` or `workdir` (go: `Workdir`). Anthropic’s cloud sandboxes keep skills and repositories in `/workspace`. If you use a different working directory, update your agent’s system prompt so Claude can locate the skill files. |
86| `<workdir>/skills/<name>/` | The agent’s downloaded skills. |
87| `/mnt/memory/<store>/` | A local copy of each attached memory store, one directory per store. The API returns each directory’s full path in the `mount_path` (java, php: `mountPath`; csharp, go: `MountPath`) field of the session’s memory store resource (for example, `/mnt/memory/user-preferences/`). |
83| Path | Contents |
84| ----- | ----- |
85| `/workspace` | The working directory in the samples on the self-hosted sandboxes pages. It is not the worker’s default: the worker uses the current directory unless you set `--workdir` or `workdir` (go: `Workdir`). Anthropic’s cloud sandboxes keep skills and repositories in `/workspace`. If you use a different working directory, update your agent’s system prompt so Claude can locate the skill files. |
86| `<workdir>/skills/<name>/` | The agent’s downloaded skills. |
87| `/mnt/memory/<store>/` | A local copy of each attached memory store, one directory per store. The API returns each directory’s full path in the `mount_path` (java, php: `mountPath`; csharp, go: `MountPath`) field of the session’s memory store resource (for example, `/mnt/memory/user-preferences/`). |
8888
8989The worker creates the memory store directories when it claims a session. It removes them when it finishes with that session or when you [stop the worker gracefully](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-operations#stop-workers-gracefully). That removes only the local copies, and the memories stay in the store.
9090
from line 113
113113
114114The Python, TypeScript, and Go SDKs provide three helpers at different levels of control:
115115
116| Helper | What it does | Use it when |
117| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
118| [`EnvironmentWorker`](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-reference#environment-worker) | Handles polling, setup, and tool runs end to end. | Most cases. |
119| [`work.poller()` (typescript: `new WorkPoller()`; go: `environments.NewWorkPoller()`)](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-reference#work-poller) | Polls the work queue and gives you each claimed session. | You determine how to handle each session, for example by launching a sandbox rather than running tools in process. |
120| [`client.beta.sessions.events.tool_runner()` (typescript: `client.beta.sessions.events.toolRunner()`; go: `client.Beta.Sessions.Events.NewToolRunner()`)](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-reference#session-tool-runner) | Runs tool calls for a single session, given the session ID and a tool list. | You’ve already claimed the work and only need to run the tools. |
116| Helper | What it does | Use it when |
117| ----- | ----- | ----- |
118| [`EnvironmentWorker`](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-reference#environment-worker) | Handles polling, setup, and tool runs end to end. | Most cases. |
119| [`work.poller()` (typescript: `new WorkPoller()`; go: `environments.NewWorkPoller()`)](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-reference#work-poller) | Polls the work queue and gives you each claimed session. | You determine how to handle each session, for example by launching a sandbox rather than running tools in process. |
120| [`client.beta.sessions.events.tool_runner()` (typescript: `client.beta.sessions.events.toolRunner()`; go: `client.Beta.Sessions.Events.NewToolRunner()`)](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-reference#session-tool-runner) | Runs tool calls for a single session, given the session ID and a tool list. | You’ve already claimed the work and only need to run the tools. |
121121
122122### EnvironmentWorker
123123
124| Method | Description |
125| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
126| `run()` (go: `Run()`) | Runs indefinitely, picking up sessions as they arrive. |
124| Method | Description |
125| ----- | ----- |
126| `run()` (go: `Run()`) | Runs indefinitely, picking up sessions as they arrive. |
127127| `handle_item()` (typescript: `handleItem()`; go: `HandleItem()`) | Handles one work item already claimed by a poller. The poller can be `ant beta:worker poll --on-work` or your own code. The method returns when the worker finishes with the item’s session. You can pass `work_id` (typescript: `workId`; go: `WorkID`), `session_id` (typescript: `sessionId`; go: `SessionID`), `environment_id` (typescript: `environmentId`; go: `EnvironmentID`), and `work_secret` (typescript: `workSecret`; go: `WorkSecret`). For each one that you leave out, the method reads the matching [`ANTHROPIC_*` variable](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-reference#environment-variables). |
128128
129| Option | Description |
130| -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
131| `tools` (go: `ToolsFunc`) | A factory that receives the session’s `AgentToolContext` and returns the tool list. Defaults to the standard agent toolset. |
132| `max_idle` (typescript: `maxIdleMs`; go: `MaxIdle`) | How long the worker waits while a session is idle before it finishes with the session. Idle time with a [`requires_action` stop reason](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#respond-when-the-session-goes-idle) does not count. Defaults to 60 seconds. To wait 5 minutes, set it to `300` (typescript: `300_000`; go: `anthropic.Ptr(5 * time.Minute)`). To turn the limit off, set it to `None` (typescript: `0`; go: `new(time.Duration)`). |
133| `memory_sync_interval` (typescript: `memorySyncIntervalMs`; go: `MemorySyncInterval`) | The shortest time between two syncs of the attached memory stores while the session runs. The worker checks the interval after each call to a tool that runs in your sandbox, not on a timer. Defaults to 15 seconds. See [Sync interval](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#sync-interval). |
134| `memory_sync_deletions` (typescript: `memorySyncDeletions`; go: `MemorySyncDeletions`) | Whether files the agent deletes locally are also deleted from the store. See [Deletions](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#deletions). |
129| Option | Description |
130| ----- | ----- |
131| `tools` (go: `ToolsFunc`) | A factory that receives the session’s `AgentToolContext` and returns the tool list. Defaults to the standard agent toolset. |
132| `max_idle` (typescript: `maxIdleMs`; go: `MaxIdle`) | How long the worker waits while a session is idle before it finishes with the session. Idle time with a [`requires_action` stop reason](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#respond-when-the-session-goes-idle) does not count. Defaults to 60 seconds. To wait 5 minutes, set it to `300` (typescript: `300_000`; go: `anthropic.Ptr(5 * time.Minute)`). To turn the limit off, set it to `None` (typescript: `0`; go: `new(time.Duration)`). |
133| `memory_sync_interval` (typescript: `memorySyncIntervalMs`; go: `MemorySyncInterval`) | The shortest time between two syncs of the attached memory stores while the session runs. The worker checks the interval after each call to a tool that runs in your sandbox, not on a timer. Defaults to 15 seconds. See [Sync interval](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#sync-interval). |
134| `memory_sync_deletions` (typescript: `memorySyncDeletions`; go: `MemorySyncDeletions`) | Whether files the agent deletes locally are also deleted from the store. See [Deletions](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory#deletions). |
135135
136136`EnvironmentWorker` manages the `AgentToolContext` and the toolset automatically. Pass a `tools` (go: `ToolsFunc`) factory to customize the tool list:
137137
from line 295
295295
296296### Work poller
297297
298| Option | Description |
299| ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
300| `drain` (go: `Drain`) | Whether to stop polling once the queue is empty rather than waiting for new work. |
301| `block_ms` (typescript: `blockMs`; go: `BlockMs`) | How long each poll waits for work to arrive before returning, in milliseconds. Must be between 1 and 999. The helper polls again automatically. Pass `null` (python: `None`; go: `param.Null[int64]()`) for a non-blocking check. Defaults to a 999ms long-poll. |
302| `reclaim_older_than_ms` (typescript: `reclaimOlderThanMs`; go: `ReclaimOlderThanMs`) | Reclaims work items that were claimed but never acknowledged within this many milliseconds. |
303| `auto_stop` (typescript: `autoStop`; go: `AutoStop`) | Whether the poller posts a stop signal for each work item once your loop body finishes with it. Defaults to `true` (python: `True`). Set it to `false` (python: `False`; go: `param.NewOpt(false)`) in the two cases that follow this table. |
298| Option | Description |
299| ----- | ----- |
300| `drain` (go: `Drain`) | Whether to stop polling once the queue is empty rather than waiting for new work. |
301| `block_ms` (typescript: `blockMs`; go: `BlockMs`) | How long each poll waits for work to arrive before returning, in milliseconds. Must be between 1 and 999. The helper polls again automatically. Pass `null` (python: `None`; go: `param.Null[int64]()`) for a non-blocking check. Defaults to a 999ms long-poll. |
302| `reclaim_older_than_ms` (typescript: `reclaimOlderThanMs`; go: `ReclaimOlderThanMs`) | Reclaims work items that were claimed but never acknowledged within this many milliseconds. |
303| `auto_stop` (typescript: `autoStop`; go: `AutoStop`) | Whether the poller posts a stop signal for each work item once your loop body finishes with it. Defaults to `true` (python: `True`). Set it to `false` (python: `False`; go: `param.NewOpt(false)`) in the two cases that follow this table. |
304304
305305Set `auto_stop` (typescript: `autoStop`; go: `AutoStop`) to `false` (python: `False`; go: `param.NewOpt(false)`) in two cases:
306306
from line 376
376376
377377`AgentToolContext` is the execution context for tool calls. It defines the working directory and path policy, and can download the session’s skills.
378378
379| Option | Description |
380| -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
381| `allowed_roots` (typescript: `allowedRoots`; go: `AllowedRoots`) | Directories, in addition to the working directory, that the file tools (`read`, `write`, `edit`, `glob`, `grep`) can reach. |
382| `read_only_roots` (typescript: `readOnlyRoots`; go: `ReadOnlyRoots`) | Directories under which `write` and `edit` refuse paths. |
379| Option | Description |
380| ----- | ----- |
381| `allowed_roots` (typescript: `allowedRoots`; go: `AllowedRoots`) | Directories, in addition to the working directory, that the file tools (`read`, `write`, `edit`, `glob`, `grep`) can reach. |
382| `read_only_roots` (typescript: `readOnlyRoots`; go: `ReadOnlyRoots`) | Directories under which `write` and `edit` refuse paths. |
383383
384384`EnvironmentWorker` adds the session’s memory store directories to `allowed_roots` (typescript: `allowedRoots`; go: `AllowedRoots`) itself, and the directories of stores attached with `access: "read_only"` to `read_only_roots` (typescript: `readOnlyRoots`; go: `ReadOnlyRoots`).
385385
managed-agents/self-hosted-sandboxes-workers Changed · +13 / -13 lines
from line 54
5454
5555The CLI and SDK workers support different combinations:
5656
57| Capability | `ant` CLI | SDK (Python, TypeScript, Go) |
58| ----------------------------------------------------------------------------------------------------------- | ------------------------------- | ---------------------------- |
59| Always-on polling | Yes | Yes |
60| Webhook-triggered | No | Yes |
61| [Sandbox per session](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-per-session) | Yes | Yes |
62| [Memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory) | Yes, with default sync settings | Yes, with configurable sync |
63| [Custom tools](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-custom-tools) | No | Yes |
57| Capability | `ant` CLI | SDK (Python, TypeScript, Go) |
58| ----- | ----- | ----- |
59| Always-on polling | Yes | Yes |
60| Webhook-triggered | No | Yes |
61| [Sandbox per session](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-per-session) | Yes | Yes |
62| [Memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory) | Yes, with default sync settings | Yes, with configurable sync |
63| [Custom tools](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-custom-tools) | No | Yes |
6464
6565See [Self-hosted worker reference](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-reference) for every CLI flag and SDK option.
6666
from line 499
499499
500500* Availability: Available
501501
502| Status | Cloud platforms |
503| ------ | ------------------------------------------------------------------------------------------------------------------ |
504| Beta | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) |
502| Status | Cloud platforms |
503| ----- | ----- |
504| Beta | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) |
505505
506506### Required beta headers
507507
from line 515
515515
516516[Data handling overview](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility)
517517
518| Item | Zero data retention | HIPAA |
519| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
520| Status | Not eligible | Not eligible |
518| Item | Zero data retention | HIPAA |
519| ----- | ----- | ----- |
520| Status | Not eligible | Not eligible |
521521| Details | Not eligible for ZDR, except for self-hosted Managed Agents. Sessions are stateful resources; transcripts persist until you delete them. [Learn more](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#how-long-data-is-kept) | Not eligible for HIPAA. Applies to all Managed Agents sub-features. |
522522
523523Applicable endpoints:
managed-agents/self-hosted/call-the-api Changed · +11 / -11 lines
from line 627
627627
628628For some features, your server needs a setting first, or an example needs a change:
629629
630| Task | Hosted guide | On your server |
631| ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
632| Set an agent’s model, system prompt, and versions | [Define your agent](https://platform.claude.com/docs/en/managed-agents/agent-setup) | Some fields [depend on your inference provider](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#differences-that-depend-on-your-inference-provider). |
633| Choose built-in tools, or add custom tools | [Tools](https://platform.claude.com/docs/en/managed-agents/tools) | To use the web tools, turn them on first, as [Web tools need a server setting](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#web-tools-need-a-server-setting) describes. Which ones exist depends on your inference provider. |
634| Connect an MCP server and store its token | [MCP connector](https://platform.claude.com/docs/en/managed-agents/mcp-connector) and [Authenticate with vaults](https://platform.claude.com/docs/en/managed-agents/vaults) | Add the MCP server’s host to the [allowlist for MCP servers](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#mcp-servers-need-an-allowlist-entry). Store the token as a `static_bearer` credential. |
635| Give an agent skills | [Skills](https://platform.claude.com/docs/en/managed-agents/skills) | Upload each skill as individual files, because your server refuses a zip archive. The [prebuilt skills](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#features-that-arent-available) in that guide’s examples aren’t available. |
636| Keep memory across sessions | [Using agent memory](https://platform.claude.com/docs/en/managed-agents/memory) | If you run your own workers, give them a writable `/mnt/memory` directory, as in [Memory stores in self-hosted sandboxes](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory). |
637| Hand work to other agents | [Multiagent orchestration](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration) | Replace the `multiagent_20261001` block in that guide’s examples with a [`coordinator` block](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#features-that-behave-differently). |
638| Work in a Git repository | [Accessing GitHub](https://platform.claude.com/docs/en/managed-agents/github) | List the Git host in your server’s settings, as [Git repositories need an allowlist entry](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#git-repositories-need-an-allowlist-entry) describes. That guide’s example agent also needs `api.githubcopilot.com` on the allowlist for MCP servers. |
639| Have a grader check the work against a rubric | [Define outcomes](https://platform.claude.com/docs/en/managed-agents/define-outcomes) | Send the rubric as text. The Files API isn’t available, so [collect output files](https://platform.claude.com/docs/en/managed-agents/self-hosted/call-the-api#move-data-in-and-out-of-a-session) from the working directory. |
640| Follow a session and answer its tool calls | [Session event stream](https://platform.claude.com/docs/en/managed-agents/events-and-streaming) | That guide’s first example closes the stream at any pause, so start from the loop in [Send a message and read the reply](https://platform.claude.com/docs/en/managed-agents/self-hosted/call-the-api#send-a-message-and-read-the-reply) instead. |
630| Task | Hosted guide | On your server |
631| ----- | ----- | ----- |
632| Set an agent’s model, system prompt, and versions | [Define your agent](https://platform.claude.com/docs/en/managed-agents/agent-setup) | Some fields [depend on your inference provider](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#differences-that-depend-on-your-inference-provider). |
633| Choose built-in tools, or add custom tools | [Tools](https://platform.claude.com/docs/en/managed-agents/tools) | To use the web tools, turn them on first, as [Web tools need a server setting](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#web-tools-need-a-server-setting) describes. Which ones exist depends on your inference provider. |
634| Connect an MCP server and store its token | [MCP connector](https://platform.claude.com/docs/en/managed-agents/mcp-connector) and [Authenticate with vaults](https://platform.claude.com/docs/en/managed-agents/vaults) | Add the MCP server’s host to the [allowlist for MCP servers](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#mcp-servers-need-an-allowlist-entry). Store the token as a `static_bearer` credential. |
635| Give an agent skills | [Skills](https://platform.claude.com/docs/en/managed-agents/skills) | Upload each skill as individual files, because your server refuses a zip archive. The [prebuilt skills](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#features-that-arent-available) in that guide’s examples aren’t available. |
636| Keep memory across sessions | [Using agent memory](https://platform.claude.com/docs/en/managed-agents/memory) | If you run your own workers, give them a writable `/mnt/memory` directory, as in [Memory stores in self-hosted sandboxes](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory). |
637| Hand work to other agents | [Multiagent orchestration](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration) | Replace the `multiagent_20261001` block in that guide’s examples with a [`coordinator` block](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#features-that-behave-differently). |
638| Work in a Git repository | [Accessing GitHub](https://platform.claude.com/docs/en/managed-agents/github) | List the Git host in your server’s settings, as [Git repositories need an allowlist entry](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#git-repositories-need-an-allowlist-entry) describes. That guide’s example agent also needs `api.githubcopilot.com` on the allowlist for MCP servers. |
639| Have a grader check the work against a rubric | [Define outcomes](https://platform.claude.com/docs/en/managed-agents/define-outcomes) | Send the rubric as text. The Files API isn’t available, so [collect output files](https://platform.claude.com/docs/en/managed-agents/self-hosted/call-the-api#move-data-in-and-out-of-a-session) from the working directory. |
640| Follow a session and answer its tool calls | [Session event stream](https://platform.claude.com/docs/en/managed-agents/events-and-streaming) | That guide’s first example closes the stream at any pause, so start from the loop in [Send a message and read the reply](https://platform.claude.com/docs/en/managed-agents/self-hosted/call-the-api#send-a-message-and-read-the-reply) instead. |
641641
642642[Differences from the hosted service](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences) has the full list. Check it before you move an existing application.
643643
managed-agents/self-hosted/configuration-reference Changed · +175 / -175 lines
from line 48
4848
4949## Server and logging
5050
51| Setting<br />Environment variable | Default | Description |
52| --------------------------------------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
53| `server.addr`<br />`CMA_SERVER__ADDR` | `127.0.0.1:8400` | The address that the server listens on. |
54| `server.api_key`<br />`CMA_SERVER__API_KEY` | None | The [server API key](https://platform.claude.com/docs/en/managed-agents/self-hosted#the-three-credentials). Required with `store.backend: postgres`, unless `auth.refuse_server_api_key` is `true`. With `memory`, the server generates a key if you set none, and logs it at startup. |
55| `server.id_marker`<br />`CMA_SERVER__ID_MARKER` | `local` | What follows the prefix in each ID that the server creates. `local` gives `sesn_local_01…`, and `none` gives `sesn_01…`, as on the hosted service. |
56| `server.shutdown_delay`<br />`CMA_SERVER__SHUTDOWN_DELAY` | `0s` | How long the server keeps serving after a stop signal, while its readiness probe answers `not_ready`. The maximum is `5m`. |
57| `server.max_connections`<br />`CMA_SERVER__MAX_CONNECTIONS` | `0` | The most connections that the server holds open at once on `server.addr`. `0` means no limit. At the limit, a new connection waits until another closes or its client gives up. Event streams, worker polls, and health probes all count. On Kubernetes, the kubelet restarts a pod whose probes wait too long. |
58| `logging.format`<br />`CMA_LOGGING__FORMAT` | `text` | The log format, `text` or `json`. |
59| `logging.level`<br />`CMA_LOGGING__LEVEL` | `info` | The lowest level that the server logs. The values are `debug`, `info`, `warn`, and `error`. |
60| `logging.errors`<br />`CMA_LOGGING__ERRORS` | `false` | Whether the log includes the error messages of `4xx` and `5xx` responses. A message can quote a value that the client sent. |
61| `health.check_interval`<br />`CMA_HEALTH__CHECK_INTERVAL` | `60s` | How often the server checks its inference credential for the readiness probe. The minimum is `5s`. |
62| `health.upstream_affects_readiness`<br />`CMA_HEALTH__UPSTREAM_AFFECTS_READINESS` | `true` | Whether the readiness probe answers `503` while the inference provider rejects the server’s credential. |
51| Setting<br />Environment variable | Default | Description |
52| ----- | ----- | ----- |
53| `server.addr`<br />`CMA_SERVER__ADDR` | `127.0.0.1:8400` | The address that the server listens on. |
54| `server.api_key`<br />`CMA_SERVER__API_KEY` | None | The [server API key](https://platform.claude.com/docs/en/managed-agents/self-hosted#the-three-credentials). Required with `store.backend: postgres`, unless `auth.refuse_server_api_key` is `true`. With `memory`, the server generates a key if you set none, and logs it at startup. |
55| `server.id_marker`<br />`CMA_SERVER__ID_MARKER` | `local` | What follows the prefix in each ID that the server creates. `local` gives `sesn_local_01…`, and `none` gives `sesn_01…`, as on the hosted service. |
56| `server.shutdown_delay`<br />`CMA_SERVER__SHUTDOWN_DELAY` | `0s` | How long the server keeps serving after a stop signal, while its readiness probe answers `not_ready`. The maximum is `5m`. |
57| `server.max_connections`<br />`CMA_SERVER__MAX_CONNECTIONS` | `0` | The most connections that the server holds open at once on `server.addr`. `0` means no limit. At the limit, a new connection waits until another closes or its client gives up. Event streams, worker polls, and health probes all count. On Kubernetes, the kubelet restarts a pod whose probes wait too long. |
58| `logging.format`<br />`CMA_LOGGING__FORMAT` | `text` | The log format, `text` or `json`. |
59| `logging.level`<br />`CMA_LOGGING__LEVEL` | `info` | The lowest level that the server logs. The values are `debug`, `info`, `warn`, and `error`. |
60| `logging.errors`<br />`CMA_LOGGING__ERRORS` | `false` | Whether the log includes the error messages of `4xx` and `5xx` responses. A message can quote a value that the client sent. |
61| `health.check_interval`<br />`CMA_HEALTH__CHECK_INTERVAL` | `60s` | How often the server checks its inference credential for the readiness probe. The minimum is `5s`. |
62| `health.upstream_affects_readiness`<br />`CMA_HEALTH__UPSTREAM_AFFECTS_READINESS` | `true` | Whether the readiness probe answers `503` while the inference provider rejects the server’s credential. |
6363
6464## Database
6565
6666Every setting in this table except `store.backend` applies only with `store.backend: postgres`.
6767
68| Setting<br />Environment variable | Default | Description |
69| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
70| `store.backend`<br />`CMA_STORE__BACKEND` | `memory` | Where the server keeps its data. The values are `memory`, which a restart erases, and `postgres`. |
71| `store.database_url`<br />`CMA_STORE__DATABASE_URL` | None | The PostgreSQL connection string. Required with `postgres`. |
72| `store.control_database_url`<br />`CMA_STORE__CONTROL_DATABASE_URL` | The value of `store.database_url` | The connection string for the server’s own upkeep connections, such as its heartbeat. |
73| `store.listen_database_url`<br />`CMA_STORE__LISTEN_DATABASE_URL` | The value of `store.database_url` | The connection string for the one connection on which the server listens for notifications. A connection pooler in transaction mode can’t carry that connection. |
74| `store.migrate_database_url`<br />`CMA_STORE__MIGRATE_DATABASE_URL` | The value of `store.database_url` | The connection string that the server’s `migrate` command uses. A connection pooler in transaction mode can’t carry that connection. |
75| `store.pool_max_conns`<br />`CMA_STORE__POOL_MAX_CONNS` | `24` | The most database connections that one server’s pool opens. The minimum is `4`. |
76| `store.event_poll_interval`<br />`CMA_STORE__EVENT_POLL_INTERVAL` | `25ms` | How often each server asks the database for the latest events in the sessions that its clients are streaming. An event that another server recorded waits at most about this long to reach the stream. |
77| `store.credentials_encryption_key`<br />`CMA_STORE__CREDENTIALS_ENCRYPTION_KEY`<br />Environment only | None | The key that encrypts stored credentials in the database, as 32 random bytes in base64. The Docker Compose and Kubernetes installs set it. The server doesn’t start without it, unless `store.allow_unencrypted_credentials` is `true`. |
78| `store.allow_unencrypted_credentials`<br />`CMA_STORE__ALLOW_UNENCRYPTED_CREDENTIALS` | `false` | Whether the server can start without `store.credentials_encryption_key`. Without the key, it stores credentials in the database in plain text. `true` has no effect if `git.allowed_hostnames` lists a host, or if you install with Docker Compose or the server Helm chart. |
79| `store.credentials_encryption_keys_retiring`<br />`CMA_STORE__CREDENTIALS_ENCRYPTION_KEYS_RETIRING`<br />Environment only | None | Earlier encryption keys that the server can still decrypt with during a key rotation. This setting needs `store.credentials_encryption_key`. |
68| Setting<br />Environment variable | Default | Description |
69| ----- | ----- | ----- |
70| `store.backend`<br />`CMA_STORE__BACKEND` | `memory` | Where the server keeps its data. The values are `memory`, which a restart erases, and `postgres`. |
71| `store.database_url`<br />`CMA_STORE__DATABASE_URL` | None | The PostgreSQL connection string. Required with `postgres`. |
72| `store.control_database_url`<br />`CMA_STORE__CONTROL_DATABASE_URL` | The value of `store.database_url` | The connection string for the server’s own upkeep connections, such as its heartbeat. |
73| `store.listen_database_url`<br />`CMA_STORE__LISTEN_DATABASE_URL` | The value of `store.database_url` | The connection string for the one connection on which the server listens for notifications. A connection pooler in transaction mode can’t carry that connection. |
74| `store.migrate_database_url`<br />`CMA_STORE__MIGRATE_DATABASE_URL` | The value of `store.database_url` | The connection string that the server’s `migrate` command uses. A connection pooler in transaction mode can’t carry that connection. |
75| `store.pool_max_conns`<br />`CMA_STORE__POOL_MAX_CONNS` | `24` | The most database connections that one server’s pool opens. The minimum is `4`. |
76| `store.event_poll_interval`<br />`CMA_STORE__EVENT_POLL_INTERVAL` | `25ms` | How often each server asks the database for the latest events in the sessions that its clients are streaming. An event that another server recorded waits at most about this long to reach the stream. |
77| `store.credentials_encryption_key`<br />`CMA_STORE__CREDENTIALS_ENCRYPTION_KEY`<br />Environment only | None | The key that encrypts stored credentials in the database, as 32 random bytes in base64. The Docker Compose and Kubernetes installs set it. The server doesn’t start without it, unless `store.allow_unencrypted_credentials` is `true`. |
78| `store.allow_unencrypted_credentials`<br />`CMA_STORE__ALLOW_UNENCRYPTED_CREDENTIALS` | `false` | Whether the server can start without `store.credentials_encryption_key`. Without the key, it stores credentials in the database in plain text. `true` has no effect if `git.allowed_hostnames` lists a host, or if you install with Docker Compose or the server Helm chart. |
79| `store.credentials_encryption_keys_retiring`<br />`CMA_STORE__CREDENTIALS_ENCRYPTION_KEYS_RETIRING`<br />Environment only | None | Earlier encryption keys that the server can still decrypt with during a key rotation. This setting needs `store.credentials_encryption_key`. |
8080
8181## Inference provider
8282
8383To set up a provider, see [Inference provider](https://platform.claude.com/docs/en/managed-agents/self-hosted/inference-provider).
8484
85| Setting<br />Environment variable | Default | Description |
86| -------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
87| `inference.provider`<br />`CMA_INFERENCE__PROVIDER` | `anthropic` | Where the server sends model calls. The values are `anthropic`, `bedrock`, `vertex`, `foundry`, and `gateway`. |
88| `inference.headers`<br />File only | None | Request headers that the server adds to every model call, as a map of header name to value. Quote every value. The server refuses to start on an unquoted value that YAML doesn’t read as text, such as `true` or `0042`. With `gateway`, a value can also be `{ from: request_id }` or `{ from: session_id }`. |
89| `inference.model_fallback`<br />`CMA_INFERENCE__MODEL_FALLBACK` | `true` | `anthropic` only. Whether model calls ask for [server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). Those calls carry a `fallbacks` field and the header `anthropic-beta: server-side-fallback-2026-07-01`. A proxy that you name in `ANTHROPIC_BASE_URL` might reject the field or the header. If it answers with a `400` or a `422`, the server sends the call again without them. |
90| `inference.metadata.user_id`<br />`CMA_INFERENCE__METADATA__USER_ID` | None | `anthropic` and `foundry` only, or `gateway` with `format: anthropic-messages`. One identifier that the server sends as `metadata.user_id` with every model call. The startup log prints it. Without this setting, the server sends the label `cma-server`. You can’t turn `metadata.user_id` off. If the provider or a proxy rejects it, every model call fails. See [What leaves your network](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#what-leaves-your-network). |
85| Setting<br />Environment variable | Default | Description |
86| ----- | ----- | ----- |
87| `inference.provider`<br />`CMA_INFERENCE__PROVIDER` | `anthropic` | Where the server sends model calls. The values are `anthropic`, `bedrock`, `vertex`, `foundry`, and `gateway`. |
88| `inference.headers`<br />File only | None | Request headers that the server adds to every model call, as a map of header name to value. Quote every value. The server refuses to start on an unquoted value that YAML doesn’t read as text, such as `true` or `0042`. With `gateway`, a value can also be `{ from: request_id }` or `{ from: session_id }`. |
89| `inference.model_fallback`<br />`CMA_INFERENCE__MODEL_FALLBACK` | `true` | `anthropic` only. Whether model calls ask for [server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). Those calls carry a `fallbacks` field and the header `anthropic-beta: server-side-fallback-2026-07-01`. A proxy that you name in `ANTHROPIC_BASE_URL` might reject the field or the header. If it answers with a `400` or a `422`, the server sends the call again without them. |
90| `inference.metadata.user_id`<br />`CMA_INFERENCE__METADATA__USER_ID` | None | `anthropic` and `foundry` only, or `gateway` with `format: anthropic-messages`. One identifier that the server sends as `metadata.user_id` with every model call. The startup log prints it. Without this setting, the server sends the label `cma-server`. You can’t turn `metadata.user_id` off. If the provider or a proxy rejects it, every model call fails. See [What leaves your network](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#what-leaves-your-network). |
9191
9292### Cloud providers
9393
94| Setting<br />Environment variable | Default | Description |
95| -------------------------------------------------------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
96| `inference.region`<br />`CMA_INFERENCE__REGION` | None | `bedrock` and `vertex` only. The AWS Region, or the location in Google Cloud’s Agent Platform. Required with `vertex`. Without it, `bedrock` uses the Region that the AWS SDK’s default chain finds. |
97| `inference.project_id`<br />`CMA_INFERENCE__PROJECT_ID` | None | `vertex` only. The Google Cloud project that the calls are made in. Required unless the Google credential names a project. |
98| `inference.api`<br />`CMA_INFERENCE__API` | `invoke_model` | `bedrock` only. The Amazon Bedrock API that carries the calls, `invoke_model` or `messages`. `messages` is the endpoint that [Claude in Amazon Bedrock (`bedrock-mantle`)](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) describes. With it, the server’s AWS role needs `bedrock-mantle:CreateInference` in place of `bedrock:InvokeModel` and `bedrock:InvokeModelWithResponseStream`. |
99| `inference.list_models`<br />`CMA_INFERENCE__LIST_MODELS` | `true` | `bedrock` only. Whether the server reads Amazon Bedrock’s lists of Claude models. With those lists, agents can use a model that came out after your server’s release. |
100| `inference.model_id_prefix`<br />`CMA_INFERENCE__MODEL_ID_PREFIX` | `us.anthropic.` | `bedrock` only. The text that the server puts before each model ID. With `inference.api: messages`, the default is `anthropic.`. |
101| `inference.model_id_overrides`<br />File only | None | `bedrock`, `vertex`, and `foundry` only. A map of model ID to the exact ID that the provider expects. With `foundry`, that ID is a deployment name. |
102| `inference.foundry.resource`<br />`CMA_INFERENCE__FOUNDRY__RESOURCE` | None | `foundry` only. The name of the Foundry resource. Set this or `inference.foundry.base_url`, not both. |
103| `inference.foundry.base_url`<br />`CMA_INFERENCE__FOUNDRY__BASE_URL` | None | `foundry` only. By default, calls go to `https://<resource>.services.ai.azure.com/anthropic`. To reach the resource at another address, such as a proxy, set that URL here instead. It ends in `/anthropic`. |
94| Setting<br />Environment variable | Default | Description |
95| ----- | ----- | ----- |
96| `inference.region`<br />`CMA_INFERENCE__REGION` | None | `bedrock` and `vertex` only. The AWS Region, or the location in Google Cloud’s Agent Platform. Required with `vertex`. Without it, `bedrock` uses the Region that the AWS SDK’s default chain finds. |
97| `inference.project_id`<br />`CMA_INFERENCE__PROJECT_ID` | None | `vertex` only. The Google Cloud project that the calls are made in. Required unless the Google credential names a project. |
98| `inference.api`<br />`CMA_INFERENCE__API` | `invoke_model` | `bedrock` only. The Amazon Bedrock API that carries the calls, `invoke_model` or `messages`. `messages` is the endpoint that [Claude in Amazon Bedrock (`bedrock-mantle`)](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) describes. With it, the server’s AWS role needs `bedrock-mantle:CreateInference` in place of `bedrock:InvokeModel` and `bedrock:InvokeModelWithResponseStream`. |
99| `inference.list_models`<br />`CMA_INFERENCE__LIST_MODELS` | `true` | `bedrock` only. Whether the server reads Amazon Bedrock’s lists of Claude models. With those lists, agents can use a model that came out after your server’s release. |
100| `inference.model_id_prefix`<br />`CMA_INFERENCE__MODEL_ID_PREFIX` | `us.anthropic.` | `bedrock` only. The text that the server puts before each model ID. With `inference.api: messages`, the default is `anthropic.`. |
101| `inference.model_id_overrides`<br />File only | None | `bedrock`, `vertex`, and `foundry` only. A map of model ID to the exact ID that the provider expects. With `foundry`, that ID is a deployment name. |
102| `inference.foundry.resource`<br />`CMA_INFERENCE__FOUNDRY__RESOURCE` | None | `foundry` only. The name of the Foundry resource. Set this or `inference.foundry.base_url`, not both. |
103| `inference.foundry.base_url`<br />`CMA_INFERENCE__FOUNDRY__BASE_URL` | None | `foundry` only. By default, calls go to `https://<resource>.services.ai.azure.com/anthropic`. To reach the resource at another address, such as a proxy, set that URL here instead. It ends in `/anthropic`. |
104104
105105### Model gateway
106106
107107These settings apply only with `inference.provider: gateway`. See [Model gateway](https://platform.claude.com/docs/en/managed-agents/self-hosted/inference-provider#model-gateway).
108108
109| Setting<br />Environment variable | Default | Description |
110| ----------------------------------------------------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
111| `inference.gateway.url`<br />`CMA_INFERENCE__GATEWAY__URL` | None | Required. The URL that receives model calls. With `bedrock-invoke` and `vertex-raw-predict`, `{model}` marks where the model ID goes. With `vertex-raw-predict`, the URL must end in `/{model}:rawPredict`. |
112| `inference.gateway.format`<br />`CMA_INFERENCE__GATEWAY__FORMAT` | None | Required. The request format that the gateway accepts: `bedrock-invoke`, `anthropic-messages`, or `vertex-raw-predict`. |
113| `inference.gateway.model_map`<br />File only | None | Required. A map of each model ID that agents can name to the ID that the gateway expects. Quote every value, as for `inference.headers`. |
114| `inference.gateway.streaming`<br />`CMA_INFERENCE__GATEWAY__STREAMING` | `false` | Whether the server sends the format’s streamed call, so that replies arrive as the model produces them. With `bedrock-invoke`, that call goes to the same URL with `-with-response-stream` appended. With `vertex-raw-predict`, that call goes to the same URL with `:streamRawPredict` in place of `:rawPredict`. Leave `:rawPredict` in `inference.gateway.url`. |
115| `inference.credentials.supplier`<br />`CMA_INFERENCE__CREDENTIALS__SUPPLIER` | None | Required. Where the gateway’s credential comes from. `env` means one long-lived key, `oauth_exchange` means short-lived tokens, and `azure` means Microsoft Entra ID tokens issued to the server’s own Azure identity. |
116| `inference.credentials.env.var`<br />`CMA_INFERENCE__CREDENTIALS__ENV__VAR` | None | Required with `env`. The name of the environment variable that holds the key. |
117| `inference.credentials.azure.scope`<br />`CMA_INFERENCE__CREDENTIALS__AZURE__SCOPE` | None | Required with `azure`. The scope that the server requests tokens for: the application ID URI or the application ID of your gateway’s app registration, followed by `/.default`. |
118| `inference.credentials.send_as.header`<br />`CMA_INFERENCE__CREDENTIALS__SEND_AS__HEADER` | `Authorization` | The request header that carries the credential. |
119| `inference.credentials.send_as.scheme`<br />`CMA_INFERENCE__CREDENTIALS__SEND_AS__SCHEME` | `Bearer` | The word that precedes the credential in the header. Under any header other than `Authorization`, the default is no scheme. |
120| `inference.credentials.renew_before`<br />`CMA_INFERENCE__CREDENTIALS__RENEW_BEFORE` | `90s` | With `oauth_exchange`, how early the server replaces a token. It stops using a cached token this long before the token expires, and gets another one for the next model call. Keep the value below your tokens’ lifetime. The server refuses any token that is valid for less than this value. |
109| Setting<br />Environment variable | Default | Description |
110| ----- | ----- | ----- |
111| `inference.gateway.url`<br />`CMA_INFERENCE__GATEWAY__URL` | None | Required. The URL that receives model calls. With `bedrock-invoke` and `vertex-raw-predict`, `{model}` marks where the model ID goes. With `vertex-raw-predict`, the URL must end in `/{model}:rawPredict`. |
112| `inference.gateway.format`<br />`CMA_INFERENCE__GATEWAY__FORMAT` | None | Required. The request format that the gateway accepts: `bedrock-invoke`, `anthropic-messages`, or `vertex-raw-predict`. |
113| `inference.gateway.model_map`<br />File only | None | Required. A map of each model ID that agents can name to the ID that the gateway expects. Quote every value, as for `inference.headers`. |
114| `inference.gateway.streaming`<br />`CMA_INFERENCE__GATEWAY__STREAMING` | `false` | Whether the server sends the format’s streamed call, so that replies arrive as the model produces them. With `bedrock-invoke`, that call goes to the same URL with `-with-response-stream` appended. With `vertex-raw-predict`, that call goes to the same URL with `:streamRawPredict` in place of `:rawPredict`. Leave `:rawPredict` in `inference.gateway.url`. |
115| `inference.credentials.supplier`<br />`CMA_INFERENCE__CREDENTIALS__SUPPLIER` | None | Required. Where the gateway’s credential comes from. `env` means one long-lived key, `oauth_exchange` means short-lived tokens, and `azure` means Microsoft Entra ID tokens issued to the server’s own Azure identity. |
116| `inference.credentials.env.var`<br />`CMA_INFERENCE__CREDENTIALS__ENV__VAR` | None | Required with `env`. The name of the environment variable that holds the key. |
117| `inference.credentials.azure.scope`<br />`CMA_INFERENCE__CREDENTIALS__AZURE__SCOPE` | None | Required with `azure`. The scope that the server requests tokens for: the application ID URI or the application ID of your gateway’s app registration, followed by `/.default`. |
118| `inference.credentials.send_as.header`<br />`CMA_INFERENCE__CREDENTIALS__SEND_AS__HEADER` | `Authorization` | The request header that carries the credential. |
119| `inference.credentials.send_as.scheme`<br />`CMA_INFERENCE__CREDENTIALS__SEND_AS__SCHEME` | `Bearer` | The word that precedes the credential in the header. Under any header other than `Authorization`, the default is no scheme. |
120| `inference.credentials.renew_before`<br />`CMA_INFERENCE__CREDENTIALS__RENEW_BEFORE` | `90s` | With `oauth_exchange`, how early the server replaces a token. It stops using a cached token this long before the token expires, and gets another one for the next model call. Keep the value below your tokens’ lifetime. The server refuses any token that is valid for less than this value. |
121121
122122### Short-lived gateway tokens
123123
124124These settings apply only with `inference.credentials.supplier: oauth_exchange`. See [Short-lived tokens](https://platform.claude.com/docs/en/managed-agents/self-hosted/inference-provider#short-lived-tokens). The `exchange` settings are optional as a group. Without them, the server sends the gateway what the callback returns.
125125
126| Setting<br />Environment variable | Default | Description |
127| ----------------------------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
128| `inference.credentials.assertion.url`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__URL` | None | Required. The URL of the HTTP callback that returns a signed assertion. |
129| `inference.credentials.assertion.auth.type`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__TYPE` | None | Required. How the server authenticates to the callback, `mtls` or `bearer_file`. |
130| `inference.credentials.assertion.auth.cert_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__CERT_FILE` | None | Required with `mtls`. The path of the server’s client certificate. |
131| `inference.credentials.assertion.auth.key_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__KEY_FILE` | None | Required with `mtls`. The path of the client certificate’s private key. |
132| `inference.credentials.assertion.auth.token_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__TOKEN_FILE` | None | Required with `bearer_file`. The path of a file that holds the bearer token. |
133| `inference.credentials.assertion.auth.ca_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__CA_FILE` | None | The path of a PEM file with the certificate authorities that the server trusts for the callback. |
134| `inference.credentials.assertion.forward_metadata`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__FORWARD_METADATA` | None | The session metadata keys whose values the server sends to the callback. They arrive as `session.metadata` in the request body. The values are whatever the API caller wrote, so check them against your own records. |
135| `inference.credentials.exchange.token_url`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__TOKEN_URL` | None | Required for an exchange. The OAuth token endpoint where the server exchanges the assertion for a token. |
136| `inference.credentials.exchange.grant_type`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__GRANT_TYPE` | None | Required for an exchange. The `grant_type` that the server sends, such as `urn:ietf:params:oauth:grant-type:jwt-bearer`. |
137| `inference.credentials.exchange.encoding`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__ENCODING` | `form` | How the server encodes the exchange request, `form` or `multipart`. |
138| `inference.credentials.exchange.expiry`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__EXPIRY` | `expires_in` | Where the server reads the token’s lifetime. `expires_in` means the earlier of the response’s `expires_in` and the token’s `exp` claim. `jwt_exp` means the `exp` claim alone. |
139| `inference.credentials.exchange.headers`<br />File only | None | Extra request headers for the token endpoint, as a map of header name to value. Quote every value, as for `inference.headers`. |
140| `inference.credentials.exchange.ca_file`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__CA_FILE` | None | The path of a PEM file with the certificate authorities that the server trusts for the token endpoint. |
126| Setting<br />Environment variable | Default | Description |
127| ----- | ----- | ----- |
128| `inference.credentials.assertion.url`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__URL` | None | Required. The URL of the HTTP callback that returns a signed assertion. |
129| `inference.credentials.assertion.auth.type`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__TYPE` | None | Required. How the server authenticates to the callback, `mtls` or `bearer_file`. |
130| `inference.credentials.assertion.auth.cert_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__CERT_FILE` | None | Required with `mtls`. The path of the server’s client certificate. |
131| `inference.credentials.assertion.auth.key_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__KEY_FILE` | None | Required with `mtls`. The path of the client certificate’s private key. |
132| `inference.credentials.assertion.auth.token_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__TOKEN_FILE` | None | Required with `bearer_file`. The path of a file that holds the bearer token. |
133| `inference.credentials.assertion.auth.ca_file`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__AUTH__CA_FILE` | None | The path of a PEM file with the certificate authorities that the server trusts for the callback. |
134| `inference.credentials.assertion.forward_metadata`<br />`CMA_INFERENCE__CREDENTIALS__ASSERTION__FORWARD_METADATA` | None | The session metadata keys whose values the server sends to the callback. They arrive as `session.metadata` in the request body. The values are whatever the API caller wrote, so check them against your own records. |
135| `inference.credentials.exchange.token_url`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__TOKEN_URL` | None | Required for an exchange. The OAuth token endpoint where the server exchanges the assertion for a token. |
136| `inference.credentials.exchange.grant_type`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__GRANT_TYPE` | None | Required for an exchange. The `grant_type` that the server sends, such as `urn:ietf:params:oauth:grant-type:jwt-bearer`. |
137| `inference.credentials.exchange.encoding`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__ENCODING` | `form` | How the server encodes the exchange request, `form` or `multipart`. |
138| `inference.credentials.exchange.expiry`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__EXPIRY` | `expires_in` | Where the server reads the token’s lifetime. `expires_in` means the earlier of the response’s `expires_in` and the token’s `exp` claim. `jwt_exp` means the `exp` claim alone. |
139| `inference.credentials.exchange.headers`<br />File only | None | Extra request headers for the token endpoint, as a map of header name to value. Quote every value, as for `inference.headers`. |
140| `inference.credentials.exchange.ca_file`<br />`CMA_INFERENCE__CREDENTIALS__EXCHANGE__CA_FILE` | None | The path of a PEM file with the certificate authorities that the server trusts for the token endpoint. |
141141
142142## Single sign-on
143143
144144To set up sign-in, see [Single sign-on](https://platform.claude.com/docs/en/managed-agents/self-hosted/configure).
145145
146| Setting<br />Environment variable | Default | Description |
147| ------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
148| `auth.issuers`<br />File only | None | The OpenID Connect issuers whose tokens the server accepts. See [Issuer entries](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#issuer-entries). |
149| `auth.refuse_server_api_key`<br />File only | `false` | Whether the server refuses the server API key on every route. `true` needs at least one issuer. Every admin CLI command that takes the key then fails. |
146| Setting<br />Environment variable | Default | Description |
147| ----- | ----- | ----- |
148| `auth.issuers`<br />File only | None | The OpenID Connect issuers whose tokens the server accepts. See [Issuer entries](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#issuer-entries). |
149| `auth.refuse_server_api_key`<br />File only | `false` | Whether the server refuses the server API key on every route. `true` needs at least one issuer. Every admin CLI command that takes the key then fails. |
150150
151151### Issuer entries
152152
153153Each entry of `auth.issuers` takes these fields:
154154
155| Field | Default | Description |
156| ----------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
157| `name` | None | Required. A label for the issuer in log lines. The server also records it as part of the creator of each resource. |
158| `issuer_url` | None | Required. The issuer’s URL, exactly as in the `iss` claim of its tokens. The server fetches signing keys from this host and from the `jwks_uri` host that the issuer’s discovery document names. If your network limits outbound connections, admit both hosts. |
159| `audiences` | None | Required. The values that a token’s `aud` claim can carry. If applications forward tokens that they already hold, list each application’s client ID. |
160| `roles` | None | A list of `group` and `role` pairs. A group matches exactly, or as a pattern in which `*` stands for any run of characters and `?` for one character. A role is `admin`, `developer`, or `user`. The highest matching role wins. Set `roles`, `default_role`, or both. |
161| `default_role` | None | The role of a caller whose groups match no `roles` entry. Set it only if everyone who can get a token for this audience should have access. |
162| `subject_claim` | `sub` | The claim that identifies the caller. A name that starts with `/` is a JSON Pointer into nested claims. |
163| `stable_subject` | `false` | Applies only if `subject_claim` names a claim other than `sub` or `oid`. Set `true` to confirm that your provider never changes a person’s value of that claim and never gives it to someone else. The server doesn’t check this. With `false`, [agent tokens](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#agent-identity) omit the `actor_sub` and `actor_iss` claims. |
164| `groups_claim` | `groups` | The claim that lists the caller’s groups. A name that starts with `/` is a JSON Pointer into nested claims. |
165| `jwks_file` | None | The path of a JSON Web Key Set file. The server reads signing keys from it and never contacts the issuer. |
166| `login_client_id` | None | The client ID of the application that [terminal login](https://platform.claude.com/docs/en/managed-agents/self-hosted/configure#let-developers-log-in-from-a-terminal) uses. Only one issuer can set it. |
167| `login_scopes` | `[openid]` | The scopes that the login requests. This field needs `login_client_id`. |
155| Field | Default | Description |
156| ----- | ----- | ----- |
157| `name` | None | Required. A label for the issuer in log lines. The server also records it as part of the creator of each resource. |
158| `issuer_url` | None | Required. The issuer’s URL, exactly as in the `iss` claim of its tokens. The server fetches signing keys from this host and from the `jwks_uri` host that the issuer’s discovery document names. If your network limits outbound connections, admit both hosts. |
159| `audiences` | None | Required. The values that a token’s `aud` claim can carry. If applications forward tokens that they already hold, list each application’s client ID. |
160| `roles` | None | A list of `group` and `role` pairs. A group matches exactly, or as a pattern in which `*` stands for any run of characters and `?` for one character. A role is `admin`, `developer`, or `user`. The highest matching role wins. Set `roles`, `default_role`, or both. |
161| `default_role` | None | The role of a caller whose groups match no `roles` entry. Set it only if everyone who can get a token for this audience should have access. |
162| `subject_claim` | `sub` | The claim that identifies the caller. A name that starts with `/` is a JSON Pointer into nested claims. |
163| `stable_subject` | `false` | Applies only if `subject_claim` names a claim other than `sub` or `oid`. Set `true` to confirm that your provider never changes a person’s value of that claim and never gives it to someone else. The server doesn’t check this. With `false`, [agent tokens](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#agent-identity) omit the `actor_sub` and `actor_iss` claims. |
164| `groups_claim` | `groups` | The claim that lists the caller’s groups. A name that starts with `/` is a JSON Pointer into nested claims. |
165| `jwks_file` | None | The path of a JSON Web Key Set file. The server reads signing keys from it and never contacts the issuer. |
166| `login_client_id` | None | The client ID of the application that [terminal login](https://platform.claude.com/docs/en/managed-agents/self-hosted/configure#let-developers-log-in-from-a-terminal) uses. Only one issuer can set it. |
167| `login_scopes` | `[openid]` | The scopes that the login requests. This field needs `login_client_id`. |
168168
169169## Secret manager
170170
171171To set up a store, see [Secret manager](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#secret-manager).
172172
173| Setting<br />Environment variable | Default | Description |
174| ----------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
175| `secret_store.type`<br />`CMA_SECRET_STORE__TYPE` | None | The secret manager that holds vault credentials. The values are `aws_secrets_manager`, `gcp_secret_manager`, `azure_key_vault`, and `hashicorp_vault`. Without it, vault credentials stay in the database. |
176| `secret_store.prefix`<br />`CMA_SECRET_STORE__PREFIX` | None | Required with `secret_store.type`. The start of the name of every secret that the server creates. It must end with `/` for `aws_secrets_manager` and `hashicorp_vault`, with `-` or `_` for `gcp_secret_manager`, and with `-` for `azure_key_vault`. |
177| `secret_store.region`<br />`CMA_SECRET_STORE__REGION` | None | `aws_secrets_manager` only, and required there. The AWS Region that holds the secrets. |
178| `secret_store.project`<br />`CMA_SECRET_STORE__PROJECT` | None | `gcp_secret_manager` only, and required there. The ID of the Google Cloud project that holds the secrets. |
179| `secret_store.vault_url`<br />`CMA_SECRET_STORE__VAULT_URL` | None | `azure_key_vault` only, and required there. The key vault’s URL, such as `https://my-vault.vault.azure.net`. |
173| Setting<br />Environment variable | Default | Description |
174| ----- | ----- | ----- |
175| `secret_store.type`<br />`CMA_SECRET_STORE__TYPE` | None | The secret manager that holds vault credentials. The values are `aws_secrets_manager`, `gcp_secret_manager`, `azure_key_vault`, and `hashicorp_vault`. Without it, vault credentials stay in the database. |
176| `secret_store.prefix`<br />`CMA_SECRET_STORE__PREFIX` | None | Required with `secret_store.type`. The start of the name of every secret that the server creates. It must end with `/` for `aws_secrets_manager` and `hashicorp_vault`, with `-` or `_` for `gcp_secret_manager`, and with `-` for `azure_key_vault`. |
177| `secret_store.region`<br />`CMA_SECRET_STORE__REGION` | None | `aws_secrets_manager` only, and required there. The AWS Region that holds the secrets. |
178| `secret_store.project`<br />`CMA_SECRET_STORE__PROJECT` | None | `gcp_secret_manager` only, and required there. The ID of the Google Cloud project that holds the secrets. |
179| `secret_store.vault_url`<br />`CMA_SECRET_STORE__VAULT_URL` | None | `azure_key_vault` only, and required there. The key vault’s URL, such as `https://my-vault.vault.azure.net`. |
180180
181181### HashiCorp Vault
182182
183183These settings apply only with `secret_store.type: hashicorp_vault`. Set exactly one login method: `token_file`, `kubernetes`, or `approle`.
184184
185| Setting<br />Environment variable | Default | Description |
186| -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
187| `secret_store.address`<br />`CMA_SECRET_STORE__ADDRESS` | None | Required. The Vault server’s `https://` URL. |
188| `secret_store.namespace`<br />`CMA_SECRET_STORE__NAMESPACE` | None | The Vault Enterprise namespace that holds the mount and the login method. |
189| `secret_store.mount`<br />`CMA_SECRET_STORE__MOUNT` | `secret` | The path of the KV version 2 secrets engine. |
190| `secret_store.ca_cert_file`<br />`CMA_SECRET_STORE__CA_CERT_FILE` | None | The path of a PEM file with the certificate authority that signed Vault’s certificate. |
191| `secret_store.token_file`<br />`CMA_SECRET_STORE__TOKEN_FILE` | None | The path of a file with a Vault token that another process, such as Vault Agent, keeps current. |
192| `secret_store.kubernetes.role`<br />`CMA_SECRET_STORE__KUBERNETES__ROLE` | None | Required with `kubernetes`. The Vault role that the server logs in as. Bind it to the server’s service account. |
193| `secret_store.kubernetes.mount_path`<br />`CMA_SECRET_STORE__KUBERNETES__MOUNT_PATH` | `kubernetes` | Where Vault mounts the Kubernetes login method. |
194| `secret_store.kubernetes.service_account_token_file`<br />`CMA_SECRET_STORE__KUBERNETES__SERVICE_ACCOUNT_TOKEN_FILE` | `/var/run/secrets/kubernetes.io/serviceaccount/token` | The path of the service account token that the server presents at each login. |
195| `secret_store.approle.role_id`<br />`CMA_SECRET_STORE__APPROLE__ROLE_ID` | None | Required with `approle`. The ID of the AppRole role that the server logs in as. |
196| `secret_store.approle.secret_id_file`<br />`CMA_SECRET_STORE__APPROLE__SECRET_ID_FILE` | None | Required with `approle`. The path of a file with the role’s `secret_id`. |
197| `secret_store.approle.mount_path`<br />`CMA_SECRET_STORE__APPROLE__MOUNT_PATH` | `approle` | Where Vault mounts the AppRole login method. |
185| Setting<br />Environment variable | Default | Description |
186| ----- | ----- | ----- |
187| `secret_store.address`<br />`CMA_SECRET_STORE__ADDRESS` | None | Required. The Vault server’s `https://` URL. |
188| `secret_store.namespace`<br />`CMA_SECRET_STORE__NAMESPACE` | None | The Vault Enterprise namespace that holds the mount and the login method. |
189| `secret_store.mount`<br />`CMA_SECRET_STORE__MOUNT` | `secret` | The path of the KV version 2 secrets engine. |
190| `secret_store.ca_cert_file`<br />`CMA_SECRET_STORE__CA_CERT_FILE` | None | The path of a PEM file with the certificate authority that signed Vault’s certificate. |
191| `secret_store.token_file`<br />`CMA_SECRET_STORE__TOKEN_FILE` | None | The path of a file with a Vault token that another process, such as Vault Agent, keeps current. |
192| `secret_store.kubernetes.role`<br />`CMA_SECRET_STORE__KUBERNETES__ROLE` | None | Required with `kubernetes`. The Vault role that the server logs in as. Bind it to the server’s service account. |
193| `secret_store.kubernetes.mount_path`<br />`CMA_SECRET_STORE__KUBERNETES__MOUNT_PATH` | `kubernetes` | Where Vault mounts the Kubernetes login method. |
194| `secret_store.kubernetes.service_account_token_file`<br />`CMA_SECRET_STORE__KUBERNETES__SERVICE_ACCOUNT_TOKEN_FILE` | `/var/run/secrets/kubernetes.io/serviceaccount/token` | The path of the service account token that the server presents at each login. |
195| `secret_store.approle.role_id`<br />`CMA_SECRET_STORE__APPROLE__ROLE_ID` | None | Required with `approle`. The ID of the AppRole role that the server logs in as. |
196| `secret_store.approle.secret_id_file`<br />`CMA_SECRET_STORE__APPROLE__SECRET_ID_FILE` | None | Required with `approle`. The path of a file with the role’s `secret_id`. |
197| `secret_store.approle.mount_path`<br />`CMA_SECRET_STORE__APPROLE__MOUNT_PATH` | `approle` | Where Vault mounts the AppRole login method. |
198198
199199## Agent identity
200200
201201To set up agent tokens, see [Agent identity](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#agent-identity). Any setting in this table turns the feature on. The server then needs `agent_identity.issuer` and exactly one place for the signing key: `key_file`, `key_secret`, or `kms_key`.
202202
203| Setting<br />Environment variable | Default | Description |
204| ----------------------------------------------------------------------------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
205| `agent_identity.issuer`<br />`CMA_AGENT_IDENTITY__ISSUER` | None | The `https://` URL that agent tokens carry as their `iss` claim. |
206| `agent_identity.key_file`<br />`CMA_AGENT_IDENTITY__KEY_FILE` | None | The path of the PEM private key that signs the tokens. |
207| `agent_identity.key_secret`<br />`CMA_AGENT_IDENTITY__KEY_SECRET` | None | The name of the secret that holds the PEM private key in your secret manager, without `secret_store.prefix`. |
208| `agent_identity.kms_key.provider`<br />`CMA_AGENT_IDENTITY__KMS_KEY__PROVIDER` | None | The key management service that holds the signing key, `aws_kms` or `gcp_kms`. |
209| `agent_identity.kms_key.key`<br />`CMA_AGENT_IDENTITY__KMS_KEY__KEY` | None | Required with `kms_key.provider`. The key’s ARN for `aws_kms`, or the resource name of one key version for `gcp_kms`. |
210| `agent_identity.published_key_files`<br />`CMA_AGENT_IDENTITY__PUBLISHED_KEY_FILES` | None | The paths of extra PEM public keys for the key set. The server publishes these keys but never signs with them. Use this setting when you rotate the signing key. |
211| `agent_identity.token_lifetime`<br />`CMA_AGENT_IDENTITY__TOKEN_LIFETIME` | `5m` | The time from a token’s `iat` claim to its `exp` claim. A token already sent stays valid until its `exp`. The minimum is `limits.mcp_call_timeout` plus `1m`, and the maximum is `15m`. |
212| `agent_identity.jwks_uri`<br />`CMA_AGENT_IDENTITY__JWKS_URI` | `<issuer>/.well-known/jwks.json` | The URL that the issuer’s discovery document gives for the key set. Set it only if you host the key set somewhere other than under the issuer URL. |
213| `agent_identity.direct.audiences`<br />File only | None | The receivers that can get a token. Each entry has an `audience` URL and `urls`, the URL prefixes of that receiver’s MCP servers. |
214| `agent_identity.actor.enabled`<br />`CMA_AGENT_IDENTITY__ACTOR__ENABLED` | `true` | Whether the server adds the `actor_sub` and `actor_iss` claims to the token of a tool call. `actor_sub` is the subject of the caller that created the session. `actor_iss` is the `issuer_url` of the `auth.issuers` entry that the caller signed in through. Neither claim means that the caller approved the call. |
203| Setting<br />Environment variable | Default | Description |
204| ----- | ----- | ----- |
205| `agent_identity.issuer`<br />`CMA_AGENT_IDENTITY__ISSUER` | None | The `https://` URL that agent tokens carry as their `iss` claim. |
206| `agent_identity.key_file`<br />`CMA_AGENT_IDENTITY__KEY_FILE` | None | The path of the PEM private key that signs the tokens. |
207| `agent_identity.key_secret`<br />`CMA_AGENT_IDENTITY__KEY_SECRET` | None | The name of the secret that holds the PEM private key in your secret manager, without `secret_store.prefix`. |
208| `agent_identity.kms_key.provider`<br />`CMA_AGENT_IDENTITY__KMS_KEY__PROVIDER` | None | The key management service that holds the signing key, `aws_kms` or `gcp_kms`. |
209| `agent_identity.kms_key.key`<br />`CMA_AGENT_IDENTITY__KMS_KEY__KEY` | None | Required with `kms_key.provider`. The key’s ARN for `aws_kms`, or the resource name of one key version for `gcp_kms`. |
210| `agent_identity.published_key_files`<br />`CMA_AGENT_IDENTITY__PUBLISHED_KEY_FILES` | None | The paths of extra PEM public keys for the key set. The server publishes these keys but never signs with them. Use this setting when you rotate the signing key. |
211| `agent_identity.token_lifetime`<br />`CMA_AGENT_IDENTITY__TOKEN_LIFETIME` | `5m` | The time from a token’s `iat` claim to its `exp` claim. A token already sent stays valid until its `exp`. The minimum is `limits.mcp_call_timeout` plus `1m`, and the maximum is `15m`. |
212| `agent_identity.jwks_uri`<br />`CMA_AGENT_IDENTITY__JWKS_URI` | `<issuer>/.well-known/jwks.json` | The URL that the issuer’s discovery document gives for the key set. Set it only if you host the key set somewhere other than under the issuer URL. |
213| `agent_identity.direct.audiences`<br />File only | None | The receivers that can get a token. Each entry has an `audience` URL and `urls`, the URL prefixes of that receiver’s MCP servers. |
214| `agent_identity.actor.enabled`<br />`CMA_AGENT_IDENTITY__ACTOR__ENABLED` | `true` | Whether the server adds the `actor_sub` and `actor_iss` claims to the token of a tool call. `actor_sub` is the subject of the caller that created the session. `actor_iss` is the `issuer_url` of the `auth.issuers` entry that the caller signed in through. Neither claim means that the caller approved the call. |
215215
216216## Egress gateway
217217
218218To set up the gateway, see [Environment variable credentials](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#environment-variable-credentials). Set the other settings in this table only with `egress.gateway_enabled: true`. Without it, the server doesn’t start if any of them is set.
219219
220| Setting<br />Environment variable | Default | Description |
221| ----------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
222| `egress.gateway_enabled`<br />`CMA_EGRESS__GATEWAY_ENABLED` | `false` | Whether the server works with the egress gateway and accepts `environment_variable` vault credentials. |
223| `egress.allowed_hostnames`<br />`CMA_EGRESS__ALLOWED_HOSTNAMES` | None | The exact public hostnames that sandboxes can reach through the gateway. An entry with no port, such as `api.example.com`, allows port 443 for `https` URLs and port 80 for `http` URLs. An entry with a port, such as `api.example.com:8443`, allows that port alone. |
224| `egress.swap_header_names`<br />`CMA_EGRESS__SWAP_HEADER_NAMES` | `Authorization` | The request headers in which the gateway can put a credential’s value. A list of your own replaces the default, so include `Authorization` in it. |
225| `egress.gateway_listen`<br />`CMA_EGRESS__GATEWAY_LISTEN` | `:8410` | The address of the server’s second listener, which serves only the gateway. The default listens on every interface. |
226| `egress.gateway_key_file`<br />`CMA_EGRESS__GATEWAY_KEY_FILE` | None | Required. The path of a file with the key that the gateway presents to the server. |
227| `egress.ca_cert_file`<br />`CMA_EGRESS__CA_CERT_FILE` | None | Required. The path of the PEM certificate of the gateway’s certificate authority. |
228| `egress.gateway_proxy_address`<br />`CMA_EGRESS__GATEWAY_PROXY_ADDRESS` | None | Required. The `host:port` at which sandboxes reach the gateway’s proxy port. |
220| Setting<br />Environment variable | Default | Description |
221| ----- | ----- | ----- |
222| `egress.gateway_enabled`<br />`CMA_EGRESS__GATEWAY_ENABLED` | `false` | Whether the server works with the egress gateway and accepts `environment_variable` vault credentials. |
223| `egress.allowed_hostnames`<br />`CMA_EGRESS__ALLOWED_HOSTNAMES` | None | The exact public hostnames that sandboxes can reach through the gateway. An entry with no port, such as `api.example.com`, allows port 443 for `https` URLs and port 80 for `http` URLs. An entry with a port, such as `api.example.com:8443`, allows that port alone. |
224| `egress.swap_header_names`<br />`CMA_EGRESS__SWAP_HEADER_NAMES` | `Authorization` | The request headers in which the gateway can put a credential’s value. A list of your own replaces the default, so include `Authorization` in it. |
225| `egress.gateway_listen`<br />`CMA_EGRESS__GATEWAY_LISTEN` | `:8410` | The address of the server’s second listener, which serves only the gateway. The default listens on every interface. |
226| `egress.gateway_key_file`<br />`CMA_EGRESS__GATEWAY_KEY_FILE` | None | Required. The path of a file with the key that the gateway presents to the server. |
227| `egress.ca_cert_file`<br />`CMA_EGRESS__CA_CERT_FILE` | None | Required. The path of the PEM certificate of the gateway’s certificate authority. |
228| `egress.gateway_proxy_address`<br />`CMA_EGRESS__GATEWAY_PROXY_ADDRESS` | None | Required. The `host:port` at which sandboxes reach the gateway’s proxy port. |
229229
230230## MCP servers
231231
232232See [MCP servers need an allowlist entry](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#mcp-servers-need-an-allowlist-entry).
233233
234| Setting<br />Environment variable | Default | Description |
235| --------------------------------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------- |
236| `mcp.allowed_hostnames`<br />`CMA_MCP__ALLOWED_HOSTNAMES` | None | The exact hostnames of the MCP servers that the server can connect to. Without it, the server connects to none. |
237| `mcp.private_hostnames`<br />File only | None | The hostnames from `mcp.allowed_hostnames` that can resolve to a private address. |
238| `mcp.max_result_bytes`<br />`CMA_MCP__MAX_RESULT_BYTES` | `102400` (100 KiB) | The most bytes of one MCP tool result that the model sees. The minimum is `1024`. |
234| Setting<br />Environment variable | Default | Description |
235| ----- | ----- | ----- |
236| `mcp.allowed_hostnames`<br />`CMA_MCP__ALLOWED_HOSTNAMES` | None | The exact hostnames of the MCP servers that the server can connect to. Without it, the server connects to none. |
237| `mcp.private_hostnames`<br />File only | None | The hostnames from `mcp.allowed_hostnames` that can resolve to a private address. |
238| `mcp.max_result_bytes`<br />`CMA_MCP__MAX_RESULT_BYTES` | `102400` (100 KiB) | The most bytes of one MCP tool result that the model sees. The minimum is `1024`. |
239239
240240## Git repositories
241241
242242See [Git repositories need an allowlist entry](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#git-repositories-need-an-allowlist-entry).
243243
244| Setting<br />Environment variable | Default | Description |
245| --------------------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
246| `git.allowed_hostnames`<br />`CMA_GIT__ALLOWED_HOSTNAMES` | None | The Git hosts that a session’s repositories can be on. Hostnames match exactly, with no wildcards, and an entry doesn’t cover its subdomains. An entry allows port 443, or the one port that it names, as in `git.example.com:8443`. Without this setting, the server accepts no repositories. |
247| `git.private_hostnames`<br />File only | None | The hostnames from `git.allowed_hostnames` that resolve to a private address, written without a port. For any other hostname, the server connects only to its public addresses. |
248| `git.allowed_push_refs`<br />`CMA_GIT__ALLOWED_PUSH_REFS` | None | The branches that agents can push to, each under `refs/heads/`. An entry that ends in `/` allows every branch under it. Any other entry allows that one branch. Without this setting, agents can’t push. |
249| `git.commit_author_name`<br />`CMA_GIT__COMMIT_AUTHOR_NAME` | `Claude` | The author name on the agent’s commits. Set it together with `git.commit_author_email`. |
250| `git.commit_author_email`<br />`CMA_GIT__COMMIT_AUTHOR_EMAIL` | `[email protected]` | The author email address on the agent’s commits. Set it together with `git.commit_author_name`. |
251| `git.max_concurrent_transfers`<br />`CMA_GIT__MAX_CONCURRENT_TRANSFERS` | `32` | The most Git requests that one server carries at once. The minimum is `1`. |
252| `git.max_session_transfer_bytes`<br />`CMA_GIT__MAX_SESSION_TRANSFER_BYTES` | `8589934592` (8 GiB) | The most Git traffic, in bytes, that one server carries for one session, uploads and downloads together. The count restarts at zero each time a sandbox picks up the session. At the limit, the server refuses the session’s next Git requests with a `403`. `0` means no limit. Otherwise, the minimum is `1048576`. |
253| `git.max_push_bytes`<br />`CMA_GIT__MAX_PUSH_BYTES` | `2147483648` (2 GiB) | The most bytes that one push can send. The minimum is `1048576`. |
244| Setting<br />Environment variable | Default | Description |
245| ----- | ----- | ----- |
246| `git.allowed_hostnames`<br />`CMA_GIT__ALLOWED_HOSTNAMES` | None | The Git hosts that a session’s repositories can be on. Hostnames match exactly, with no wildcards, and an entry doesn’t cover its subdomains. An entry allows port 443, or the one port that it names, as in `git.example.com:8443`. Without this setting, the server accepts no repositories. |
247| `git.private_hostnames`<br />File only | None | The hostnames from `git.allowed_hostnames` that resolve to a private address, written without a port. For any other hostname, the server connects only to its public addresses. |
248| `git.allowed_push_refs`<br />`CMA_GIT__ALLOWED_PUSH_REFS` | None | The branches that agents can push to, each under `refs/heads/`. An entry that ends in `/` allows every branch under it. Any other entry allows that one branch. Without this setting, agents can’t push. |
249| `git.commit_author_name`<br />`CMA_GIT__COMMIT_AUTHOR_NAME` | `Claude` | The author name on the agent’s commits. Set it together with `git.commit_author_email`. |
250| `git.commit_author_email`<br />`CMA_GIT__COMMIT_AUTHOR_EMAIL` | `[email protected]` | The author email address on the agent’s commits. Set it together with `git.commit_author_name`. |
251| `git.max_concurrent_transfers`<br />`CMA_GIT__MAX_CONCURRENT_TRANSFERS` | `32` | The most Git requests that one server carries at once. The minimum is `1`. |
252| `git.max_session_transfer_bytes`<br />`CMA_GIT__MAX_SESSION_TRANSFER_BYTES` | `8589934592` (8 GiB) | The most Git traffic, in bytes, that one server carries for one session, uploads and downloads together. The count restarts at zero each time a sandbox picks up the session. At the limit, the server refuses the session’s next Git requests with a `403`. `0` means no limit. Otherwise, the minimum is `1048576`. |
253| `git.max_push_bytes`<br />`CMA_GIT__MAX_PUSH_BYTES` | `2147483648` (2 GiB) | The most bytes that one push can send. The minimum is `1048576`. |
254254
255255These limits apply to Git repositories:
256256
from line 264
264264
265265See [Web tools need a server setting](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#web-tools-need-a-server-setting).
266266
267| Setting<br />Environment variable | Default | Description |
268| ----------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
269| `web_tools.enabled`<br />`CMA_WEB_TOOLS__ENABLED` | `false` | Whether agents can use the `web_search` and `web_fetch` tools. If you set another `web_tools` setting, the default is `true`. |
270| `web_tools.allowed_domains`<br />`CMA_WEB_TOOLS__ALLOWED_DOMAINS` | None | The only domains that agents can read through the web tools. An entry covers its subdomains. |
271| `web_tools.blocked_domains`<br />`CMA_WEB_TOOLS__BLOCKED_DOMAINS` | None | Domains that no agent can read through the web tools. Set this or `web_tools.allowed_domains`, not both. |
272| `web_tools.max_content_tokens`<br />`CMA_WEB_TOOLS__MAX_CONTENT_TOKENS` | None | The most tokens of one fetched page that `web_fetch` returns to the model. |
273| `skills.max_name_chars`<br />`CMA_SKILLS__MAX_NAME_CHARS` | `64` | The longest `name` that a `SKILL.md` file can have. The maximum is `255`. |
274| `skills.max_description_chars`<br />`CMA_SKILLS__MAX_DESCRIPTION_CHARS` | `1024` | The longest `description` that a `SKILL.md` file can have. |
267| Setting<br />Environment variable | Default | Description |
268| ----- | ----- | ----- |
269| `web_tools.enabled`<br />`CMA_WEB_TOOLS__ENABLED` | `false` | Whether agents can use the `web_search` and `web_fetch` tools. If you set another `web_tools` setting, the default is `true`. |
270| `web_tools.allowed_domains`<br />`CMA_WEB_TOOLS__ALLOWED_DOMAINS` | None | The only domains that agents can read through the web tools. An entry covers its subdomains. |
271| `web_tools.blocked_domains`<br />`CMA_WEB_TOOLS__BLOCKED_DOMAINS` | None | Domains that no agent can read through the web tools. Set this or `web_tools.allowed_domains`, not both. |
272| `web_tools.max_content_tokens`<br />`CMA_WEB_TOOLS__MAX_CONTENT_TOKENS` | None | The most tokens of one fetched page that `web_fetch` returns to the model. |
273| `skills.max_name_chars`<br />`CMA_SKILLS__MAX_NAME_CHARS` | `64` | The longest `name` that a `SKILL.md` file can have. The maximum is `255`. |
274| `skills.max_description_chars`<br />`CMA_SKILLS__MAX_DESCRIPTION_CHARS` | `1024` | The longest `description` that a `SKILL.md` file can have. |
275275
276276## Limits, timeouts, and scheduling
277277
278| Setting<br />Environment variable | Default | Description |
279| ------------------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
280| `limits.max_active_sessions`<br />`CMA_LIMITS__MAX_ACTIVE_SESSIONS` | `64` | `store.backend: memory` only. The most sessions that run a turn at once. `0` means no limit. |
281| `limits.max_live_subagent_threads`<br />`CMA_LIMITS__MAX_LIVE_SUBAGENT_THREADS` | `25` | The most subagent threads that one session can hold at once. A thread counts until it’s archived or terminated, so an idle thread counts. At the limit, the agent can’t start another subagent. The minimum is `1`, and the maximum is `4000`. |
282| `scheduler.max_concurrent_turns`<br />`CMA_SCHEDULER__MAX_CONCURRENT_TURNS` | `64` | `store.backend: postgres` only. The most turns that one server runs at once. The minimum is `1`. The server keeps extra slots for subagent turns alone. Their number is a quarter of this value, and at least `4`. With the default, one server can run 64 turns plus 16 subagent turns. |
283| `scheduler.claim_poll_interval`<br />`CMA_SCHEDULER__CLAIM_POLL_INTERVAL` | `1s` | `store.backend: postgres` only. How often a server with a free turn slot looks in the database for waiting work. The minimum is `50ms`. |
284| `scheduler.sandbox_claim`<br />`CMA_SCHEDULER__SANDBOX_CLAIM` | `immediate` | When a worker can start a session’s sandbox. `immediate` means as soon as the session is created, so the first tool call waits least. `tool_call` means at the session’s first tool call that needs the sandbox, so a session that makes none uses no sandbox. |
285| `limits.model_call_timeout`<br />`CMA_LIMITS__MODEL_CALL_TIMEOUT` | `20m` | How long one model call can run, retries included, before the server cancels it. |
286| `limits.stream_idle_timeout`<br />`CMA_LIMITS__STREAM_IDLE_TIMEOUT` | `5m` | How long a model call’s response can deliver nothing before the server gives up that attempt. |
287| `limits.mcp_call_timeout`<br />`CMA_LIMITS__MCP_CALL_TIMEOUT` | `4m` | How long one MCP tool call can run before the server gives it up. |
278| Setting<br />Environment variable | Default | Description |
279| ----- | ----- | ----- |
280| `limits.max_active_sessions`<br />`CMA_LIMITS__MAX_ACTIVE_SESSIONS` | `64` | `store.backend: memory` only. The most sessions that run a turn at once. `0` means no limit. |
281| `limits.max_live_subagent_threads`<br />`CMA_LIMITS__MAX_LIVE_SUBAGENT_THREADS` | `25` | The most subagent threads that one session can hold at once. A thread counts until it’s archived or terminated, so an idle thread counts. At the limit, the agent can’t start another subagent. The minimum is `1`, and the maximum is `4000`. |
282| `scheduler.max_concurrent_turns`<br />`CMA_SCHEDULER__MAX_CONCURRENT_TURNS` | `64` | `store.backend: postgres` only. The most turns that one server runs at once. The minimum is `1`. The server keeps extra slots for subagent turns alone. Their number is a quarter of this value, and at least `4`. With the default, one server can run 64 turns plus 16 subagent turns. |
283| `scheduler.claim_poll_interval`<br />`CMA_SCHEDULER__CLAIM_POLL_INTERVAL` | `1s` | `store.backend: postgres` only. How often a server with a free turn slot looks in the database for waiting work. The minimum is `50ms`. |
284| `scheduler.sandbox_claim`<br />`CMA_SCHEDULER__SANDBOX_CLAIM` | `immediate` | When a worker can start a session’s sandbox. `immediate` means as soon as the session is created, so the first tool call waits least. `tool_call` means at the session’s first tool call that needs the sandbox, so a session that makes none uses no sandbox. |
285| `limits.model_call_timeout`<br />`CMA_LIMITS__MODEL_CALL_TIMEOUT` | `20m` | How long one model call can run, retries included, before the server cancels it. |
286| `limits.stream_idle_timeout`<br />`CMA_LIMITS__STREAM_IDLE_TIMEOUT` | `5m` | How long a model call’s response can deliver nothing before the server gives up that attempt. |
287| `limits.mcp_call_timeout`<br />`CMA_LIMITS__MCP_CALL_TIMEOUT` | `4m` | How long one MCP tool call can run before the server gives it up. |
288288
289289## Models and compaction
290290
291| Setting<br />Environment variable | Default | Description |
292| ------------------------------------ | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
293| `models.settings`<br />File only | None | Changes to the server’s built-in model catalog, keyed by model ID. See [Model entries](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#model-entries). |
294| `compaction.triggers`<br />File only | About 90% of each model’s context window | The context size, in tokens, at which a turn on a model compacts its history, keyed by model ID. The minimum is `50000`. Each model must support compaction. |
291| Setting<br />Environment variable | Default | Description |
292| ----- | ----- | ----- |
293| `models.settings`<br />File only | None | Changes to the server’s built-in model catalog, keyed by model ID. See [Model entries](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#model-entries). |
294| `compaction.triggers`<br />File only | About 90% of each model’s context window | The context size, in tokens, at which a turn on a model compacts its history, keyed by model ID. The minimum is `50000`. Each model must support compaction. |
295295
296296### Model entries
297297
298298Each entry of `models.settings` changes a model in the catalog or adds one. For a model in the catalog, a field that you leave out keeps its built-in value.
299299
300| Field | Description |
301| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
302| `fast_supported` | Whether the model accepts `speed: "fast"`. Required for a model that you add. |
303| `inference_geo_supported` | Whether the model accepts `inference_geo`. |
300| Field | Description |
301| ----- | ----- |
302| `fast_supported` | Whether the model accepts `speed: "fast"`. Required for a model that you add. |
303| `inference_geo_supported` | Whether the model accepts `inference_geo`. |
304304| `forced_tool_choice_supported` | Whether the model accepts a request that forces it to call one tool. The server sends such a request only to run a `web_search` or `web_fetch` call that was approved. With `false`, it never forces a tool on this model. |
305| `effort_supported` | Whether the model accepts an effort level. |
306| `effort_levels` | The effort levels that the model accepts, from `low`, `medium`, `high`, `xhigh`, and `max`. Required with `effort_supported: true` on a model with no built-in levels. |
307| `effort_default` | The effort level of a session whose agent names none. It must be one of `effort_levels`. Required with `effort_supported: true` on a model with no built-in default. |
308| `thinking` | The thinking mode that the server requests, `enabled` or `adaptive`. |
309| `thinking_budget` | The thinking budget, in tokens, that the server sends with `thinking: enabled`. |
310| `max_tokens` | The `max_tokens` value of each model call. |
305| `effort_supported` | Whether the model accepts an effort level. |
306| `effort_levels` | The effort levels that the model accepts, from `low`, `medium`, `high`, `xhigh`, and `max`. Required with `effort_supported: true` on a model with no built-in levels. |
307| `effort_default` | The effort level of a session whose agent names none. It must be one of `effort_levels`. Required with `effort_supported: true` on a model with no built-in default. |
308| `thinking` | The thinking mode that the server requests, `enabled` or `adaptive`. |
309| `thinking_budget` | The thinking budget, in tokens, that the server sends with `thinking: enabled`. |
310| `max_tokens` | The `max_tokens` value of each model call. |
311311
312312## Console on your server
313313
314| Setting<br />Environment variable | Default | Description |
315| ----------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
316| `console.serve`<br />`CMA_CONSOLE__SERVE` | `true` | Whether to serve the [console on your server](https://platform.claude.com/docs/en/managed-agents/self-hosted/console). |
314| Setting<br />Environment variable | Default | Description |
315| ----- | ----- | ----- |
316| `console.serve`<br />`CMA_CONSOLE__SERVE` | `true` | Whether to serve the [console on your server](https://platform.claude.com/docs/en/managed-agents/self-hosted/console). |
317317
managed-agents/self-hosted/configure Changed · +12 / -12 lines
from line 52
5252
5353### If sign-in fails
5454
55| Response | Cause | The server’s log line contains |
56| -------------------------------------- | ------------------------------------------------------ | ------------------------------ |
57| `401`, the same as for a wrong API key | The token failed a check. The log line has the reason. | `oidc token` |
58| `403` | The token’s groups match no `roles` entry | `token holds no role` |
55| Response | Cause | The server’s log line contains |
56| ----- | ----- | ----- |
57| `401`, the same as for a wrong API key | The token failed a check. The log line has the reason. | `oidc token` |
58| `403` | The token’s groups match no `roles` entry | `token holds no role` |
5959
6060### Microsoft Entra ID
6161
from line 66
6666
6767## What each role can do
6868
69| Role | Agents, skills, sessions, vaults, and memory stores | Environments |
70| ------------------------------- | --------------------------------------------------- | ---------------------------------------------------------- |
71| `admin`, and the server API key | Sees and changes everything | Creates, changes, and deletes them, and creates their keys |
72| `developer` or `user` | Sees and changes only what that caller created | Lists them, reads them, and runs sessions in them |
69| Role | Agents, skills, sessions, vaults, and memory stores | Environments |
70| ----- | ----- | ----- |
71| `admin`, and the server API key | Sees and changes everything | Creates, changes, and deletes them, and creates their keys |
72| `developer` or `user` | Sees and changes only what that caller created | Lists them, reads them, and runs sessions in them |
7373
7474`developer` and `user` have the same access. A caller with either role:
7575
from line 121
121121
122122### Other redirect URIs
123123
124| Provider | Redirect URI to register | Flag that developers add to the `login` command |
125| ---------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------- |
126| Microsoft Entra ID | `http://localhost/callback` | `-listen localhost:0` |
127| One that requires the port in the redirect URI | A URI with a fixed port, such as `http://127.0.0.1:8123/callback` | `-listen 127.0.0.1:8123` |
124| Provider | Redirect URI to register | Flag that developers add to the `login` command |
125| ----- | ----- | ----- |
126| Microsoft Entra ID | `http://localhost/callback` | `-listen localhost:0` |
127| One that requires the port in the redirect URI | A URI with a fixed port, such as `http://127.0.0.1:8123/callback` | `-listen 127.0.0.1:8123` |
128128
129129To list the other flags, add `-h` to the `login` command.
130130
managed-agents/self-hosted/differences Changed · +44 / -44 lines
from line 12
1212
1313## Features that only your server has
1414
15| Feature | What it does | How to set it up |
16| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
17| A choice of inference provider | The server can send model calls to a cloud provider or your own model gateway instead of the Claude API. | [Inference provider](https://platform.claude.com/docs/en/managed-agents/self-hosted/inference-provider) |
18| Single sign-on | People call the server with a token from your OpenID Connect identity provider. The server gives each caller a role from the groups in the token. The server API key keeps working. | [Single sign-on](https://platform.claude.com/docs/en/managed-agents/self-hosted/configure#single-sign-on) |
19| Your own secret manager | The server can store the secret of each new vault credential in your secret manager instead of its own database. | [Secret manager](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#secret-manager) |
20| Agent identity | The server can sign a short-lived token and send it with an agent’s calls to an MCP server. The MCP server or gateway checks the token against public keys that you publish. | [Agent identity](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#agent-identity) |
15| Feature | What it does | How to set it up |
16| ----- | ----- | ----- |
17| A choice of inference provider | The server can send model calls to a cloud provider or your own model gateway instead of the Claude API. | [Inference provider](https://platform.claude.com/docs/en/managed-agents/self-hosted/inference-provider) |
18| Single sign-on | People call the server with a token from your OpenID Connect identity provider. The server gives each caller a role from the groups in the token. The server API key keeps working. | [Single sign-on](https://platform.claude.com/docs/en/managed-agents/self-hosted/configure#single-sign-on) |
19| Your own secret manager | The server can store the secret of each new vault credential in your secret manager instead of its own database. | [Secret manager](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#secret-manager) |
20| Agent identity | The server can sign a short-lived token and send it with an agent’s calls to an MCP server. The MCP server or gateway checks the token against public keys that you publish. | [Agent identity](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#agent-identity) |
2121
2222## Features that aren’t available
2323
24| Feature | What happens | What to do instead |
25| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
26| [Cloud environments](https://platform.claude.com/docs/en/managed-agents/environments) | Only `self_hosted` environments exist. A request for a cloud environment returns a `400` error. | [Deploy self-hosted workers](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-workers) for every environment. |
27| The rest of the Claude API, such as the [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) and the Models API | The server doesn’t serve it. The SDK’s calls to `/v1/messages` and `/v1/models` return a `404` error. | Send those requests to the Claude API or to your provider, from a client that doesn’t point at your server. |
28| [File session resources](https://platform.claude.com/docs/en/managed-agents/files) and the Files API | The server rejects `file` resources, and `/v1/files` doesn’t exist. `memory_store` resources work. | Put files in the worker’s working directory. See [Move data in and out of a session](https://platform.claude.com/docs/en/managed-agents/self-hosted/call-the-api#move-data-in-and-out-of-a-session). To show the model an image or a PDF, send it as `base64` in a message. |
29| [`mcp_oauth` vault credentials](https://platform.claude.com/docs/en/managed-agents/vaults) | The server rejects them when you create them, because it has no OAuth flow to refresh a token. | Store the token as a `static_bearer` credential. Update the credential with a new token before the old one expires. |
30| [Prebuilt `docx`, `pdf`, `pptx`, and `xlsx` skills](https://platform.claude.com/docs/en/managed-agents/skills) | The server rejects an agent that declares them. Only skills you upload exist. | Download their sources from the [skills repository](https://github.com/anthropics/skills) and upload them as custom skills. |
31| [Scheduled deployments](https://platform.claude.com/docs/en/managed-agents/scheduled-deployments) and [dreams](https://platform.claude.com/docs/en/managed-agents/dreams) | The server has no routes for them. | Start sessions from your own scheduler, such as a cron job. Dreams have no replacement. |
32| [Webhooks](https://platform.claude.com/docs/en/managed-agents/webhooks) | The server sends no webhooks, so a worker that starts on a webhook never starts. | Follow a session through its [event stream](https://platform.claude.com/docs/en/managed-agents/events-and-streaming), or list its events. Keep your workers running so that they can poll. |
24| Feature | What happens | What to do instead |
25| ----- | ----- | ----- |
26| [Cloud environments](https://platform.claude.com/docs/en/managed-agents/environments) | Only `self_hosted` environments exist. A request for a cloud environment returns a `400` error. | [Deploy self-hosted workers](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-workers) for every environment. |
27| The rest of the Claude API, such as the [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) and the Models API | The server doesn’t serve it. The SDK’s calls to `/v1/messages` and `/v1/models` return a `404` error. | Send those requests to the Claude API or to your provider, from a client that doesn’t point at your server. |
28| [File session resources](https://platform.claude.com/docs/en/managed-agents/files) and the Files API | The server rejects `file` resources, and `/v1/files` doesn’t exist. `memory_store` resources work. | Put files in the worker’s working directory. See [Move data in and out of a session](https://platform.claude.com/docs/en/managed-agents/self-hosted/call-the-api#move-data-in-and-out-of-a-session). To show the model an image or a PDF, send it as `base64` in a message. |
29| [`mcp_oauth` vault credentials](https://platform.claude.com/docs/en/managed-agents/vaults) | The server rejects them when you create them, because it has no OAuth flow to refresh a token. | Store the token as a `static_bearer` credential. Update the credential with a new token before the old one expires. |
30| [Prebuilt `docx`, `pdf`, `pptx`, and `xlsx` skills](https://platform.claude.com/docs/en/managed-agents/skills) | The server rejects an agent that declares them. Only skills you upload exist. | Download their sources from the [skills repository](https://github.com/anthropics/skills) and upload them as custom skills. |
31| [Scheduled deployments](https://platform.claude.com/docs/en/managed-agents/scheduled-deployments) and [dreams](https://platform.claude.com/docs/en/managed-agents/dreams) | The server has no routes for them. | Start sessions from your own scheduler, such as a cron job. Dreams have no replacement. |
32| [Webhooks](https://platform.claude.com/docs/en/managed-agents/webhooks) | The server sends no webhooks, so a worker that starts on a webhook never starts. | Follow a session through its [event stream](https://platform.claude.com/docs/en/managed-agents/events-and-streaming), or list its events. Keep your workers running so that they can poll. |
3333
3434## Features that behave differently
3535
36| Feature | What’s different | What to do |
37| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
38| Claude Console | The Claude Console at platform.claude.com doesn’t show what is on your server. | Use the [console on your server](https://platform.claude.com/docs/en/managed-agents/self-hosted/console). |
39| Tool calls | A session’s model turns run even when no worker is polling its environment. The first tool call then waits, with no error, until a worker runs it. | If a session stops at a tool call, check that a worker is polling its environment. |
40| [Memory stores](https://platform.claude.com/docs/en/managed-agents/memory) | The API is complete. The worker, not the server, copies each attached store into the sandbox and writes changes back. See [Memory stores in self-hosted sandboxes](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory). | Run your workers on the [latest version of `ant`](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart#installation), with a writable `/mnt/memory` directory. |
41| [Custom skill](https://platform.claude.com/docs/en/managed-agents/skills#create-a-custom-skill) uploads | The server doesn’t unpack a zip archive. An upload of one returns a `400` error that says `SKILL.md not found in uploaded files`. | `ant apply` and the Python SDK’s `files_from_dir` helper work as they are. With anything else, upload the skill’s files as separate parts, and start each part’s file name with the skill’s folder, as in `my-skill/SKILL.md`. |
36| Feature | What’s different | What to do |
37| ----- | ----- | ----- |
38| Claude Console | The Claude Console at platform.claude.com doesn’t show what is on your server. | Use the [console on your server](https://platform.claude.com/docs/en/managed-agents/self-hosted/console). |
39| Tool calls | A session’s model turns run even when no worker is polling its environment. The first tool call then waits, with no error, until a worker runs it. | If a session stops at a tool call, check that a worker is polling its environment. |
40| [Memory stores](https://platform.claude.com/docs/en/managed-agents/memory) | The API is complete. The worker, not the server, copies each attached store into the sandbox and writes changes back. See [Memory stores in self-hosted sandboxes](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory). | Run your workers on the [latest version of `ant`](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart#installation), with a writable `/mnt/memory` directory. |
41| [Custom skill](https://platform.claude.com/docs/en/managed-agents/skills#create-a-custom-skill) uploads | The server doesn’t unpack a zip archive. An upload of one returns a `400` error that says `SKILL.md not found in uploaded files`. | `ant apply` and the Python SDK’s `files_from_dir` helper work as they are. With anything else, upload the skill’s files as separate parts, and start each part’s file name with the skill’s folder, as in `my-skill/SKILL.md`. |
4242| [Multiagent orchestration](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration) | An agent can delegate only to subagents that you list. Dynamic workflows, the advisor, and subagents that the agent defines itself aren’t available. The server accepts a `multiagent` (csharp, go: `Multiagent`) block only if its `type` is `coordinator`. The examples in Multiagent orchestration set `type` to `multiagent_20261001`, which returns a `400` error. A block with an `advisor` (csharp, go: `Advisor`) setting returns a `400` error too. | Set `multiagent` (csharp, go: `Multiagent`) to `{"type": "coordinator", "agents": [...]}`. List 1 to 20 agents in `agents` (csharp, go: `Agents`). Each entry takes one of the [forms of a predefined agent](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration#predefined-and-inline-agents). |
43| [GitHub repository](https://platform.claude.com/docs/en/managed-agents/github) session resources | The server rejects `github_repository` resources until you list their Git hosts in its settings. The server doesn’t discover skills in a repository’s `.claude/skills` directory, so attach skills to the agent. | See [Git repositories need an allowlist entry](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#git-repositories-need-an-allowlist-entry). |
44| [MCP servers](https://platform.claude.com/docs/en/managed-agents/mcp-connector) | The server connects only to the MCP hosts that you list in its settings. | See [MCP servers need an allowlist entry](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#mcp-servers-need-an-allowlist-entry). |
45| [Web tools](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions) | The `web_search` and `web_fetch` tools are off until you turn them on in the server’s settings. | See [Web tools need a server setting](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#web-tools-need-a-server-setting). |
46| [`environment_variable` vault credentials](https://platform.claude.com/docs/en/managed-agents/vaults) | The server rejects them until you turn on the egress gateway, a proxy between your sandboxes and the internet. | See [Environment variable credentials](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#environment-variable-credentials). Without the gateway, give your sandbox the CLI and API credentials it needs through your own tooling. |
47| Custom tool results | The server sends the model the whole text of a custom tool result. If a result is too large for the model’s context window, the server still answers with `200`, and the session then ends with a `session.error`. | Shorten long results in your client before you send them. |
48| MCP tool results | The server cuts a result that is larger than its `mcp.max_result_bytes` setting, which is 100 KiB by default. It tells the model that the result was cut, and the rest is lost. The hosted service cuts long results too, but can [save the full result to a file](https://platform.claude.com/docs/en/managed-agents/mcp-connector#mcp-tool-output-handling) for a session in a cloud sandbox. | To change the limit, set `mcp.max_result_bytes` in the [settings file](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#where-settings-go). |
49| Images and documents sent by URL | The server accepts an `image` or `document` block with a `url` source, but the model never sees it, and there is no error. The same happens to an `image` block with a `file` source. | Send the data as `base64`, or as `text` for a document. |
50| The `rescheduling` session status | The server retries a model call that fails for a temporary reason and reports each attempt on the event stream, as the hosted service does. The session’s status stays `running` between attempts, so a `statuses[]=rescheduling` filter matches no sessions. | Read retries from the event stream. |
51| Session metadata, with a model gateway | If the server’s `inference.credentials.assertion.forward_metadata` setting lists session metadata keys, an update that adds, removes, or changes one of them returns a `400` error. | Set those keys when you create the session. For the setting, see [Short-lived gateway tokens](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#short-lived-gateway-tokens). |
43| [GitHub repository](https://platform.claude.com/docs/en/managed-agents/github) session resources | The server rejects `github_repository` resources until you list their Git hosts in its settings. The server doesn’t discover skills in a repository’s `.claude/skills` directory, so attach skills to the agent. | See [Git repositories need an allowlist entry](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#git-repositories-need-an-allowlist-entry). |
44| [MCP servers](https://platform.claude.com/docs/en/managed-agents/mcp-connector) | The server connects only to the MCP hosts that you list in its settings. | See [MCP servers need an allowlist entry](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#mcp-servers-need-an-allowlist-entry). |
45| [Web tools](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions) | The `web_search` and `web_fetch` tools are off until you turn them on in the server’s settings. | See [Web tools need a server setting](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#web-tools-need-a-server-setting). |
46| [`environment_variable` vault credentials](https://platform.claude.com/docs/en/managed-agents/vaults) | The server rejects them until you turn on the egress gateway, a proxy between your sandboxes and the internet. | See [Environment variable credentials](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#environment-variable-credentials). Without the gateway, give your sandbox the CLI and API credentials it needs through your own tooling. |
47| Custom tool results | The server sends the model the whole text of a custom tool result. If a result is too large for the model’s context window, the server still answers with `200`, and the session then ends with a `session.error`. | Shorten long results in your client before you send them. |
48| MCP tool results | The server cuts a result that is larger than its `mcp.max_result_bytes` setting, which is 100 KiB by default. It tells the model that the result was cut, and the rest is lost. The hosted service cuts long results too, but can [save the full result to a file](https://platform.claude.com/docs/en/managed-agents/mcp-connector#mcp-tool-output-handling) for a session in a cloud sandbox. | To change the limit, set `mcp.max_result_bytes` in the [settings file](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#where-settings-go). |
49| Images and documents sent by URL | The server accepts an `image` or `document` block with a `url` source, but the model never sees it, and there is no error. The same happens to an `image` block with a `file` source. | Send the data as `base64`, or as `text` for a document. |
50| The `rescheduling` session status | The server retries a model call that fails for a temporary reason and reports each attempt on the event stream, as the hosted service does. The session’s status stays `running` between attempts, so a `statuses[]=rescheduling` filter matches no sessions. | Read retries from the event stream. |
51| Session metadata, with a model gateway | If the server’s `inference.credentials.assertion.forward_metadata` setting lists session metadata keys, an update that adds, removes, or changes one of them returns a `400` error. | Set those keys when you create the session. For the setting, see [Short-lived gateway tokens](https://platform.claude.com/docs/en/managed-agents/self-hosted/configuration-reference#short-lived-gateway-tokens). |
5252
5353## Features that need a server setting
5454
from line 71
7171* It must use `https`, unless the MCP server is on the loopback address.
7272* If its host is a name that resolves only to private or reserved addresses, your server refuses to connect by default. Pick the fix that fits your case:
7373
74| Your case | Fix |
75| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
76| The address is in `10.0.0.0/8`, `172.16.0.0/12`, or `192.168.0.0/16`, and you control the name’s DNS records | Keep the name, and also list it under `mcp.private_hostnames` in the settings file. |
77| Any other case | Use the IP address in place of the name, in the URL and on the allowlist. The MCP server’s certificate must name that address. |
74| Your case | Fix |
75| ----- | ----- |
76| The address is in `10.0.0.0/8`, `172.16.0.0/12`, or `192.168.0.0/16`, and you control the name’s DNS records | Keep the name, and also list it under `mcp.private_hostnames` in the settings file. |
77| Any other case | Use the IP address in place of the name, in the URL and on the allowlist. The MCP server’s certificate must name that address. |
7878
7979### Git repositories need an allowlist entry
8080
from line 112
112112
113113While the tools are off, what happens to an agent depends on the `web_search` and `web_fetch` entries in its toolset:
114114
115| The toolset has | What happens |
116| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
117| No entry for either tool | The agent runs without the tools, and no error says so. |
118| An entry that only turns its tool off, such as `{"name": "web_fetch", "enabled": false}` | The same. |
115| The toolset has | What happens |
116| ----- | ----- |
117| No entry for either tool | The agent runs without the tools, and no error says so. |
118| An entry that only turns its tool off, such as `{"name": "web_fetch", "enabled": false}` | The same. |
119119| An entry that leaves its tool on, or that sets its domain lists, content limit, or location | The server refuses to save the agent, or to start a session for it. |
120120
121121Which web tools exist also [depends on your inference provider](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#differences-that-depend-on-your-inference-provider).
from line 126
126126
127127The `web_search` and `web_fetch` rows apply after you [turn the web tools on](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#web-tools-need-a-server-setting). Until then, neither tool works under any provider.
128128
129| Feature | Works when `inference.provider` is | Under the other values | What to do |
130| ----------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
131| `web_search` tool | `anthropic`, `vertex`, `foundry` | The server never offers the tool to the model. Agents still save and run, and still list the tool, but the model can’t call it. | Give the agent a custom tool or an MCP server that searches. |
132| `web_fetch` tool | `anthropic`, `foundry` | The same as for `web_search`. | Give the agent a custom tool or an MCP server that fetches pages. |
133| `inference_geo` (java, php: `inferenceGeo`; csharp, go: `InferenceGeo`) | `anthropic` | The server refuses to save an agent that sets it. | Remove `inference_geo` (java, php: `inferenceGeo`; csharp, go: `InferenceGeo`) from the agent. |
134| Fast mode (`speed: "fast"`) | Depends on the provider and on the agent’s model | An agent that sets it has to pass two checks.<br />**When you save the agent:** The server’s model catalog must list the agent’s model as one that accepts fast mode. Otherwise, the server refuses to save the agent.<br />**On each turn:** If the provider doesn’t serve fast mode for that model or deployment, the turn ends with an error. | Remove `speed` (csharp, go: `Speed`) from the agent. See [Models that accept fast mode](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#models-that-accept-fast-mode). |
129| Feature | Works when `inference.provider` is | Under the other values | What to do |
130| ----- | ----- | ----- | ----- |
131| `web_search` tool | `anthropic`, `vertex`, `foundry` | The server never offers the tool to the model. Agents still save and run, and still list the tool, but the model can’t call it. | Give the agent a custom tool or an MCP server that searches. |
132| `web_fetch` tool | `anthropic`, `foundry` | The same as for `web_search`. | Give the agent a custom tool or an MCP server that fetches pages. |
133| `inference_geo` (java, php: `inferenceGeo`; csharp, go: `InferenceGeo`) | `anthropic` | The server refuses to save an agent that sets it. | Remove `inference_geo` (java, php: `inferenceGeo`; csharp, go: `InferenceGeo`) from the agent. |
134| Fast mode (`speed: "fast"`) | Depends on the provider and on the agent’s model | An agent that sets it has to pass two checks.<br />**When you save the agent:** The server’s model catalog must list the agent’s model as one that accepts fast mode. Otherwise, the server refuses to save the agent.<br />**On each turn:** If the provider doesn’t serve fast mode for that model or deployment, the turn ends with an error. | Remove `speed` (csharp, go: `Speed`) from the agent. See [Models that accept fast mode](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences#models-that-accept-fast-mode). |
135135
136136Under `anthropic`, the server asks for the Claude API’s [server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) by default. When a safety classifier declines a request, another Claude model, possibly a less capable one, can then answer it. Anthropic picks the model, and no event reports the change, but a read of the session shows that model’s ID. To turn fallback off, set `inference.model_fallback: false`. Under the other providers, such a request ends the turn with a refusal.
137137
managed-agents/self-hosted/inference-provider Changed · +7 / -7 lines
from line 17
1717
1818The `inference.provider` setting takes these values:
1919
20| `inference.provider` | Model calls go to | The server authenticates with |
21| --------------------- | ---------------------------------------------- | ---------------------------------------- |
22| `anthropic` (default) | The Claude API | `ANTHROPIC_API_KEY` |
23| `bedrock` | Amazon Bedrock | Your AWS credential |
24| `vertex` | Claude Models on Google Cloud (Google managed) | Google Application Default Credentials |
25| `foundry` | Microsoft Foundry | A Foundry API key, or Microsoft Entra ID |
26| `gateway` | A model gateway that you run | A key or token that your gateway accepts |
20| `inference.provider` | Model calls go to | The server authenticates with |
21| ----- | ----- | ----- |
22| `anthropic` (default) | The Claude API | `ANTHROPIC_API_KEY` |
23| `bedrock` | Amazon Bedrock | Your AWS credential |
24| `vertex` | Claude Models on Google Cloud (Google managed) | Google Application Default Credentials |
25| `foundry` | Microsoft Foundry | A Foundry API key, or Microsoft Entra ID |
26| `gateway` | A model gateway that you run | A key or token that your gateway accepts |
2727
2828Under every value except `anthropic`, the server needs no Claude API key. It ignores `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, and `ANTHROPIC_BASE_URL`. The one exception is a [model gateway](https://platform.claude.com/docs/en/managed-agents/self-hosted/inference-provider#model-gateway) whose key you tell the server to read from one of those variables.
2929
managed-agents/self-hosted/kubernetes Changed · +8 / -8 lines
from line 230
230230
231231This table compares it with the two other modes:
232232
233| `egress.mode` | What sandboxes can reach |
234| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
235| `closed`, the default | Your servers and the dispatcher, and no DNS server |
236| `publicInternet` | Your servers, the dispatcher, a DNS server, and the public internet |
237| `gateway` | Your servers, the dispatcher, and, through the egress gateway, the hosts that you list. See [Turn on the gateway on Kubernetes](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#turn-on-the-gateway-on-kubernetes). |
233| `egress.mode` | What sandboxes can reach |
234| ----- | ----- |
235| `closed`, the default | Your servers and the dispatcher, and no DNS server |
236| `publicInternet` | Your servers, the dispatcher, a DNS server, and the public internet |
237| `gateway` | Your servers, the dispatcher, and, through the egress gateway, the hosts that you list. See [Turn on the gateway on Kubernetes](https://platform.claude.com/docs/en/managed-agents/self-hosted/agent-identity#turn-on-the-gateway-on-kubernetes). |
238238
239239## Other clusters
240240
from line 250
250250
251251By the chart’s defaults, each session has a 10 GiB volume for `/workspace`. The volume stays after the session’s pod goes away, so the session’s next message finds its files.
252252
253| To free | Do this |
254| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
255| One session’s volume | Archive the session after its turn ends. The dispatcher usually deletes the volume within about 5 minutes. |
253| To free | Do this |
254| ----- | ----- |
255| One session’s volume | Archive the session after its turn ends. The dispatcher usually deletes the volume within about 5 minutes. |
256256| The volumes of sessions that nobody archives | Set `dispatcher.retentionDays` in `cma-values.yaml`. The dispatcher then deletes a volume once its session has been idle for that many days, and the session’s next message starts with an empty `/workspace`. The chart’s default, `0`, keeps every volume. |
257257
258258The commands in this section are for GKE. On another cluster, use `sandboxclaims` in place of `sandboxes`.
managed-agents/self-hosted/upgrade Changed · +20 / -20 lines
from line 10
1010
1111This page shows how to upgrade a deployment on Kubernetes or Docker Compose, and how to roll back. On Kubernetes, the downtime depends on how far the upgrade goes:
1212
13| Upgrade | Back up the database first | Downtime on Kubernetes |
14| ------------------------------------------------------------------------------ | --------------------------------------- | --------------------------------------------------------------------- |
15| Patch: only the third number changes | No. The database schema stays the same. | None |
16| Minor: the second number goes up by one, such as `1.2.0` to `1.3.0` | Yes. The schema changes. | None, unless a `CHANGELOG.md` section says that the servers must stop |
17| Skips a minor release, such as `1.1.0` to `1.3.0`, or changes the first number | Yes. The schema changes. | From when you stop the old servers until the new ones are ready |
13| Upgrade | Back up the database first | Downtime on Kubernetes |
14| ----- | ----- | ----- |
15| Patch: only the third number changes | No. The database schema stays the same. | None |
16| Minor: the second number goes up by one, such as `1.2.0` to `1.3.0` | Yes. The schema changes. | None, unless a `CHANGELOG.md` section says that the servers must stop |
17| Skips a minor release, such as `1.1.0` to `1.3.0`, or changes the first number | Yes. The schema changes. | From when you stop the old servers until the new ones are ready |
1818
1919A Docker Compose stack is down while it restarts, for every kind of upgrade.
2020
from line 166
166166* **Kubernetes:** If the migration Job fails, `helm upgrade` waits a few minutes while the Job retries, and then it fails. During that wait, run `kubectl -n cma-server logs job/$server-migrate` in a second terminal, with `$server` set as in [Upgrade on Kubernetes](https://platform.claude.com/docs/en/managed-agents/self-hosted/upgrade#upgrade-on-kubernetes). Kubernetes deletes the log when the Job stops retrying. If you missed it, run `helm upgrade` again, which starts the Job again.
167167* **Docker Compose:** The output of `docker compose up --build -d` might not show the reason. Run `docker compose logs` to find it.
168168
169| What the log shows | What it means | What to do |
170| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
169| What the log shows | What it means | What to do |
170| ----- | ----- | ----- |
171171| A line that contains `refusing to migrate: servers of another release are still running against this database` | Some upgrades need every server stopped first, and a server of the old release is still running. The migration changed nothing. | Stop every server, as in [Upgrade on Kubernetes](https://platform.claude.com/docs/en/managed-agents/self-hosted/upgrade#upgrade-on-kubernetes), and run `helm upgrade` again. If a server didn’t shut down cleanly, wait 20 seconds first: until then, the migration still counts that server as running. |
172| A line that contains `cannot downgrade`, when you deploy the old release again | The old release can’t run on the changed schema. | Restore the backup, as in [Roll back](https://platform.claude.com/docs/en/managed-agents/self-hosted/upgrade#roll-back). |
173| Another error from the migration | You don’t need to roll back. On Kubernetes, the servers stay as they were until the migration succeeds. | Fix the cause, and run `helm upgrade` or `docker compose up --build -d` again. |
172| A line that contains `cannot downgrade`, when you deploy the old release again | The old release can’t run on the changed schema. | Restore the backup, as in [Roll back](https://platform.claude.com/docs/en/managed-agents/self-hosted/upgrade#roll-back). |
173| Another error from the migration | You don’t need to roll back. On Kubernetes, the servers stay as they were until the migration succeeds. | Fix the cause, and run `helm upgrade` or `docker compose up --build -d` again. |
174174
175175The migration can succeed while the new servers don’t become ready. To find the cause, read the servers’ log:
176176
from line 354
354354`cma-server-values.yaml` has to say which names your install has, in its `earlierNames` setting. To find the name of the server’s Deployment, run `kubectl -n cma-server get deployment -l anthropic.com/role=server`.
355355
356356| The Deployment’s name | The line in `cma-server-values.yaml` |
357| --------------------- | ------------------------------------ |
358| `cma-onprem` | `earlierNames: true` |
359| `cma-server` | `earlierNames: false` |
357| ----- | ----- |
358| `cma-onprem` | `earlierNames: true` |
359| `cma-server` | `earlierNames: false` |
360360
361361If the file doesn’t have the line, add it before you upgrade, and keep it there for every later upgrade. Without it, the server chart’s `helm upgrade` command stops with an error that names `earlierNames`, and changes nothing.
362362
363363With `earlierNames: true`, the chart’s objects keep their `cma-onprem` names, and the servers still find the Secrets that you created under those names. These pages use the names in the middle column. With `earlierNames: true`, use the names in the last column instead:
364364
365| Object | Name on these pages | Name with `earlierNames: true` |
366| --------------------------------------------------------- | ------------------------------- | ------------------------------- |
367| The server’s Deployment and Service | `cma-server` | `cma-onprem` |
368| The migration Job | `cma-server-migrate` | `cma-onprem-migrate` |
369| The Job of each environment | `cma-server-environment-<name>` | `cma-onprem-environment-<name>` |
370| The Secret with the database password | `cma-server-db` | `cma-onprem-db` |
371| The Secret with the inference provider’s credential | `cma-server-upstream` | `cma-onprem-upstream` |
372| The Secret with the server API key and the encryption key | `cma-server-keys` | `cma-onprem-server` |
365| Object | Name on these pages | Name with `earlierNames: true` |
366| ----- | ----- | ----- |
367| The server’s Deployment and Service | `cma-server` | `cma-onprem` |
368| The migration Job | `cma-server-migrate` | `cma-onprem-migrate` |
369| The Job of each environment | `cma-server-environment-<name>` | `cma-onprem-environment-<name>` |
370| The Secret with the database password | `cma-server-db` | `cma-onprem-db` |
371| The Secret with the inference provider’s credential | `cma-server-upstream` | `cma-onprem-upstream` |
372| The Secret with the server API key and the encryption key | `cma-server-keys` | `cma-onprem-server` |
373373
374374Whatever `earlierNames` says, the namespace is named `cma-server`, and the server’s image is named `cma-server-image`.
375375
managed-agents/session-observability Changed · +21 / -21 lines
from line 48
4848* **Transcript:** The conversation grouped by model request, including thinking, tool calls with their inputs and results, and message text as it streams. You can filter the events and copy or download them as JSON.
4949* **Inspector:** A resizable side panel with details about the session, in five tabs.
5050
51| Inspector tab | What it shows |
52| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
53| **Session** | The session’s details and metadata, its cumulative cost over time, and spend against the session’s [budget](https://platform.claude.com/docs/en/managed-agents/budgets) when one is set. |
54| **Events** | Every raw event on the current thread, in the order the server sent it. Select an event to see its JSON. A message that streamed while the page was open also has a **Deltas** view of its [event deltas](https://platform.claude.com/docs/en/managed-agents/event-deltas). |
55| **Tools** | The tools the session’s agents are configured with, along with call counts, failures, and median duration. Select a tool to see its calls and jump to one in the transcript. |
51| Inspector tab | What it shows |
52| ----- | ----- |
53| **Session** | The session’s details and metadata, its cumulative cost over time, and spend against the session’s [budget](https://platform.claude.com/docs/en/managed-agents/budgets) when one is set. |
54| **Events** | Every raw event on the current thread, in the order the server sent it. Select an event to see its JSON. A message that streamed while the page was open also has a **Deltas** view of its [event deltas](https://platform.claude.com/docs/en/managed-agents/event-deltas). |
55| **Tools** | The tools the session’s agents are configured with, along with call counts, failures, and median duration. Select a tool to see its calls and jump to one in the transcript. |
5656| **Resources** | Mounted [files](https://platform.claude.com/docs/en/managed-agents/files), [repositories](https://platform.claude.com/docs/en/managed-agents/github), and [memory stores](https://platform.claude.com/docs/en/managed-agents/memory) at their container paths, including the memories in each store and the changes this session made to them. Also lists files the agent wrote to `/mnt/session/outputs` and the [skills](https://platform.claude.com/docs/en/managed-agents/skills) attached to the session’s agents. |
57| **Threads** | Every thread with its status, context size, and cost. Select a thread to view its details, such as the agent, model, context usage, and cost. |
57| **Threads** | Every thread with its status, context size, and cost. Select a thread to view its details, such as the agent, model, context usage, and cost. |
5858
5959Append `?event={event_id}` to a session URL to open the session at a specific event.
6060
from line 89
8989}
9090```
9191
92| Field | Description |
93| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
94| `input_tokens` | Uncached input tokens across all model calls in the session. |
95| `output_tokens` | Total output tokens across all model calls in the session. |
96| `cache_read_input_tokens` | Tokens read from the prompt cache. |
97| `cache_creation` | Cache-creation tokens, broken down by cache lifetime (`ephemeral_5m_input_tokens` and `ephemeral_1h_input_tokens`). |
98| `list_cost` | The session’s cumulative consumption priced at public list rates, as a whole number of cents in a string, with a currency code. |
99| `active_seconds` | The cumulative time during which the session had at least one thread running. Overlapping activity from concurrent threads is counted once. The session’s runtime cost is priced on this duration. |
100| `server_tool_use` | Counts of server-executed tool requests, for pricing. Web search requests are priced into list cost per request. Web fetch requests carry no per-request charge and aren’t metered, so `web_fetch_requests` reads `0`. |
92| Field | Description |
93| ----- | ----- |
94| `input_tokens` | Uncached input tokens across all model calls in the session. |
95| `output_tokens` | Total output tokens across all model calls in the session. |
96| `cache_read_input_tokens` | Tokens read from the prompt cache. |
97| `cache_creation` | Cache-creation tokens, broken down by cache lifetime (`ephemeral_5m_input_tokens` and `ephemeral_1h_input_tokens`). |
98| `list_cost` | The session’s cumulative consumption priced at public list rates, as a whole number of cents in a string, with a currency code. |
99| `active_seconds` | The cumulative time during which the session had at least one thread running. Overlapping activity from concurrent threads is counted once. The session’s runtime cost is priced on this duration. |
100| `server_tool_use` | Counts of server-executed tool requests, for pricing. Web search requests are priced into list cost per request. Web fetch requests carry no per-request charge and aren’t metered, so `web_fetch_requests` reads `0`. |
101101
102102Cache entries use a 5-minute TTL by default, so back-to-back turns within that window benefit from cache reads, which reduce per-token cost.
103103
from line 162
162162
163163* Availability: Always on
164164
165| Status | Cloud platforms |
166| ------ | ------------------------------------------------------------------------------------------------------------------ |
167| Beta | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) |
165| Status | Cloud platforms |
166| ----- | ----- |
167| Beta | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) |
168168
169169### Required beta headers
170170
from line 178
178178
179179[Data handling overview](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility)
180180
181| Item | Zero data retention | HIPAA |
182| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
183| Status | Not eligible | Not eligible |
181| Item | Zero data retention | HIPAA |
182| ----- | ----- | ----- |
183| Status | Not eligible | Not eligible |
184184| Details | Not eligible for ZDR, except for self-hosted Managed Agents. Sessions are stateful resources; transcripts persist until you delete them. [Learn more](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#how-long-data-is-kept) | Not eligible for HIPAA. Applies to all Managed Agents sub-features. |
185185
186186Applicable endpoints:
managed-agents/session-operations Changed · +6 / -6 lines
from line 43
4343
4444Sessions progress through these statuses. See [Start a session](https://platform.claude.com/docs/en/managed-agents/sessions) for the session lifecycle.
4545
46| Status | Description |
47| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
48| `idle` | Agent is waiting for input, including user messages or tool confirmations. Sessions created without `initial_events` (java, php: `initialEvents`; csharp, go: `InitialEvents`) start in `idle`. A session can be `idle` while a [workflow run](https://platform.claude.com/docs/en/managed-agents/workflow-runs#while-a-run-is-open) is still open, so `idle` alone doesn’t mean that the work is done. See [Know when the work is done](https://platform.claude.com/docs/en/managed-agents/workflow-runs#know-when-the-work-is-done). |
49| `running` | Agent is actively executing. |
50| `rescheduling` | Transient error occurred, retrying automatically. |
51| `terminated` | Session has ended, either because of an unrecoverable error or because it was archived. A session that completes its work goes `idle`, not `terminated`. |
46| Status | Description |
47| ----- | ----- |
48| `idle` | Agent is waiting for input, including user messages or tool confirmations. Sessions created without `initial_events` (java, php: `initialEvents`; csharp, go: `InitialEvents`) start in `idle`. A session can be `idle` while a [workflow run](https://platform.claude.com/docs/en/managed-agents/workflow-runs#while-a-run-is-open) is still open, so `idle` alone doesn’t mean that the work is done. See [Know when the work is done](https://platform.claude.com/docs/en/managed-agents/workflow-runs#know-when-the-work-is-done). |
49| `running` | Agent is actively executing. |
50| `rescheduling` | Transient error occurred, retrying automatically. |
51| `terminated` | Session has ended, either because of an unrecoverable error or because it was archived. A session that completes its work goes `idle`, not `terminated`. |
5252
5353## Updating the agent configuration
5454
managed-agents/session-threads Changed · +14 / -14 lines
from line 403
403403
404404These events surface multiagent activity on the primary thread at `/v1/sessions/{session_id}/events/stream`. Message-direction events are named relative to the thread whose stream they appear on: `agent.thread_message_received` means a message arrived on this thread from another thread, and `agent.thread_message_sent` means this thread sent one. The task that the primary thread’s agent delegates, for example, arrives on the child’s own stream as an `agent.thread_message_received` event.
405405
406| Type | Description |
407| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
408| `session.thread_created` | A thread was created. Includes `session_thread_id` (java: `sessionThreadId`; php: `sessionThreadID`; csharp, go: `SessionThreadID`) and `agent_name` (java, php: `agentName`; csharp, go: `AgentName`). |
409| `session.thread_status_running` | A thread started activity. |
410| `session.thread_status_idle` | The agent associated with the thread is awaiting input. Includes a `stop_reason` (java, php: `stopReason`; csharp, go: `StopReason`) indicating why the agent stopped. |
411| `session.thread_status_terminated` | A thread terminated and accepts no further input, for example, because it was archived or encountered an unrecoverable error. An advisor thread also terminates when its consultation ends. |
412| `agent.thread_message_received` | On the primary thread, a subagent sent the primary thread’s agent a report or question. Includes `from_session_thread_id` (java: `fromSessionThreadId`; php: `fromSessionThreadID`; csharp, go: `FromSessionThreadID`), `from_agent_name` (java, php: `fromAgentName`; csharp, go: `FromAgentName`), and `content` (csharp, go: `Content`). |
413| `agent.thread_message_sent` | On the primary thread, the primary thread’s agent sent a subagent a task or follow-up message. Includes `to_session_thread_id` (java: `toSessionThreadId`; php: `toSessionThreadID`; csharp, go: `ToSessionThreadID`), `to_agent_name` (java, php: `toAgentName`; csharp, go: `ToAgentName`), and `content` (csharp, go: `Content`). |
406| Type | Description |
407| ----- | ----- |
408| `session.thread_created` | A thread was created. Includes `session_thread_id` (java: `sessionThreadId`; php: `sessionThreadID`; csharp, go: `SessionThreadID`) and `agent_name` (java, php: `agentName`; csharp, go: `AgentName`). |
409| `session.thread_status_running` | A thread started activity. |
410| `session.thread_status_idle` | The agent associated with the thread is awaiting input. Includes a `stop_reason` (java, php: `stopReason`; csharp, go: `StopReason`) indicating why the agent stopped. |
411| `session.thread_status_terminated` | A thread terminated and accepts no further input, for example, because it was archived or encountered an unrecoverable error. An advisor thread also terminates when its consultation ends. |
412| `agent.thread_message_received` | On the primary thread, a subagent sent the primary thread’s agent a report or question. Includes `from_session_thread_id` (java: `fromSessionThreadId`; php: `fromSessionThreadID`; csharp, go: `FromSessionThreadID`), `from_agent_name` (java, php: `fromAgentName`; csharp, go: `FromAgentName`), and `content` (csharp, go: `Content`). |
413| `agent.thread_message_sent` | On the primary thread, the primary thread’s agent sent a subagent a task or follow-up message. Includes `to_session_thread_id` (java: `toSessionThreadId`; php: `toSessionThreadID`; csharp, go: `ToSessionThreadID`), `to_agent_name` (java, php: `toAgentName`; csharp, go: `ToAgentName`), and `content` (csharp, go: `Content`). |
414414
415415Advisor consultations emit these same thread events under the reserved name `anthropic.advisor`. The name appears as `agent_name` (java, php: `agentName`; csharp, go: `AgentName`) on the thread lifecycle events and as `from_agent_name` (java, php: `fromAgentName`; csharp, go: `FromAgentName`) on the advice delivery. See [Give the session an advisor](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration#give-the-session-an-advisor) for the sequence.
416416
from line 815
815815
816816* Availability: Always on
817817
818| Status | Cloud platforms |
819| ------ | ----------------------- |
820| Beta | All supported platforms |
818| Status | Cloud platforms |
819| ----- | ----- |
820| Beta | All supported platforms |
821821
822822### Required beta headers
823823
from line 831
831831
832832[Data handling overview](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility)
833833
834| Item | Zero data retention | HIPAA |
835| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
836| Status | Not eligible | Not eligible |
834| Item | Zero data retention | HIPAA |
835| ----- | ----- | ----- |
836| Status | Not eligible | Not eligible |
837837| Details | Not eligible for ZDR, except for self-hosted Managed Agents. Sessions are stateful resources; transcripts persist until you delete them. [Learn more](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#how-long-data-is-kept) | Not eligible for HIPAA. Applies to all Managed Agents sub-features. |
838838
839839Applicable endpoints:
managed-agents/sessions Changed · +6 / -6 lines
from line 439
439439
440440The create request is rejected in the following cases:
441441
442| Condition | Status |
443| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
444| More than one `user.define_outcome` event | 400 |
445| A `user.define_outcome` event without a `rubric` | 400 |
446| More than 100 file-sourced [`document` content blocks](https://platform.claude.com/docs/en/build-with-claude/files#document-blocks) across the whole list | 400 |
447| A request body over 32 MB | 413 |
442| Condition | Status |
443| ----- | ----- |
444| More than one `user.define_outcome` event | 400 |
445| A `user.define_outcome` event without a `rubric` | 400 |
446| More than 100 file-sourced [`document` content blocks](https://platform.claude.com/docs/en/build-with-claude/files#document-blocks) across the whole list | 400 |
447| A request body over 32 MB | 413 |
448448
449449A `user.define_outcome` event in `initial_events` (java, php: `initialEvents`; csharp, go: `InitialEvents`) is accepted under the same conditions as sending one to an existing session; see [Define outcomes](https://platform.claude.com/docs/en/managed-agents/define-outcomes).
450450
managed-agents/skills Changed · +4 / -4 lines
from line 237
237237
238238Each entry in the `skills` (csharp, go: `Skills`) array uses the following fields:
239239
240| Field | Description |
241| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
242| `type` (csharp, go: `Type`) | Either `anthropic` for pre-built skills or `custom` for workspace-authored skills. |
240| Field | Description |
241| ----- | ----- |
242| `type` (csharp, go: `Type`) | Either `anthropic` for pre-built skills or `custom` for workspace-authored skills. |
243243| `skill_id` (java: `skillId`; php: `skillID`; csharp, go: `SkillID`) | The skill identifier. For Anthropic skills, use the short name (for example, `xlsx`). For custom skills, use the `skill_*` ID returned at creation (see [Create a custom skill](https://platform.claude.com/docs/en/managed-agents/skills#create-a-custom-skill)). |
244| `version` (csharp, go: `Version`) | Pin to a specific version or use `latest`. Optional. Defaults to `latest` when omitted. Applies to both Anthropic and custom skills. |
244| `version` (csharp, go: `Version`) | Pin to a specific version or use `latest`. Optional. Defaults to `latest` when omitted. Applies to both Anthropic and custom skills. |
245245
246246<CodeGroup defaultLanguage="CLI">
247247 ```bash cURL
managed-agents/tools Changed · +16 / -16 lines
from line 44
4444
4545The agent toolset includes the following tools. All are enabled by default when you include the toolset in the agent configuration.
4646
47| Tool | Name | Description |
48| ---------- | ------------ | ------------------------------------------------------ |
49| Bash | `bash` | Run bash commands in a shell session |
50| Read | `read` | Read a file from the sandbox filesystem |
51| Write | `write` | Write a file to the sandbox filesystem |
52| Edit | `edit` | Perform string replacement in a file |
53| Glob | `glob` | Perform fast file pattern matching using glob patterns |
54| Grep | `grep` | Search text using regex patterns |
55| Web fetch | `web_fetch` | Fetch content from a URL |
56| Web search | `web_search` | Search the web for information |
47| Tool | Name | Description |
48| ----- | ----- | ----- |
49| Bash | `bash` | Run bash commands in a shell session |
50| Read | `read` | Read a file from the sandbox filesystem |
51| Write | `write` | Write a file to the sandbox filesystem |
52| Edit | `edit` | Perform string replacement in a file |
53| Glob | `glob` | Perform fast file pattern matching using glob patterns |
54| Grep | `grep` | Search text using regex patterns |
55| Web fetch | `web_fetch` | Fetch content from a URL |
56| Web search | `web_search` | Search the web for information |
5757
5858When a tool output exceeds 100,000 characters (about 25,000 tokens), it is automatically written to a file in the [sandbox](https://platform.claude.com/docs/en/managed-agents/environments). The model receives a truncated preview with the file path and can read the full content from there.
5959
from line 538
538538
539539* Availability: Available
540540
541| Status | Cloud platforms |
542| ------ | ------------------------------------------------------------------------------------------------------------------ |
543| Beta | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) |
541| Status | Cloud platforms |
542| ----- | ----- |
543| Beta | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) |
544544
545545### Required beta headers
546546
from line 554
554554
555555[Data handling overview](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility)
556556
557| Item | Zero data retention | HIPAA |
558| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
559| Status | Not eligible | Not eligible |
557| Item | Zero data retention | HIPAA |
558| ----- | ----- | ----- |
559| Status | Not eligible | Not eligible |
560560| Details | Not eligible for ZDR, except for self-hosted Managed Agents. Sessions are stateful resources; transcripts persist until you delete them. [Learn more](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#how-long-data-is-kept) | Not eligible for HIPAA. Applies to all Managed Agents sub-features. |
561561
562562Applicable endpoints:
managed-agents/tools-web-restrictions Changed · +31 / -31 lines
from line 404
404404
405405In addition to `enabled` (csharp, go: `Enabled`) and `permission_policy` (java, php: `permissionPolicy`; csharp, go: `PermissionPolicy`), the web tool entries accept the following settings:
406406
407| Setting | Applies to | Description |
408| ------------------------------------------------------------------------------------ | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
409| `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`) | `web_search`, `web_fetch` | The only hosts the tool can reach. See [Domain list rules](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions#domain-list-rules). |
410| `blocked_domains` (java, php: `blockedDomains`; csharp, go: `BlockedDomains`) | `web_search`, `web_fetch` | Hosts the tool cannot reach. See [Domain list rules](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions#domain-list-rules). |
411| `max_content_tokens` (java, php: `maxContentTokens`; csharp, go: `MaxContentTokens`) | `web_fetch` | Caps the amount of fetched page content included in the context. Must be a positive integer. See [content limits](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#content-limits). |
412| `user_location` (java, php: `userLocation`; csharp, go: `UserLocation`) | `web_search` | Localizes search results. An object with the same fields as the Messages API [`user_location`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool#localization) parameter. |
407| Setting | Applies to | Description |
408| ----- | ----- | ----- |
409| `allowed_domains` (java, php: `allowedDomains`; csharp, go: `AllowedDomains`) | `web_search`, `web_fetch` | The only hosts the tool can reach. See [Domain list rules](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions#domain-list-rules). |
410| `blocked_domains` (java, php: `blockedDomains`; csharp, go: `BlockedDomains`) | `web_search`, `web_fetch` | Hosts the tool cannot reach. See [Domain list rules](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions#domain-list-rules). |
411| `max_content_tokens` (java, php: `maxContentTokens`; csharp, go: `MaxContentTokens`) | `web_fetch` | Caps the amount of fetched page content included in the context. Must be a positive integer. See [content limits](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#content-limits). |
412| `user_location` (java, php: `userLocation`; csharp, go: `UserLocation`) | `web_search` | Localizes search results. An object with the same fields as the Messages API [`user_location`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool#localization) parameter. |
413413
414414For the types the SDK uses for these entries, see [Config entry types in the SDKs](https://platform.claude.com/docs/en/managed-agents/tools#config-entry-types-in-the-sdks).
415415
from line 438
438438
439439Each domain is a registrable domain name, or a subdomain of one, written as a plain hostname. It can contain ASCII letters, digits, hyphens, underscores, and dots. A single trailing `/` is ignored. A `web_search` domain can also carry a path, as [Path suffixes on web search domains](https://platform.claude.com/docs/en/managed-agents/tools-web-restrictions#path-suffixes-on-web-search-domains) describes.
440440
441| Not accepted | Example | Use instead |
442| ------------------------------------------------------------------------------ | ------------------------ | ------------------------------------- |
443| A scheme | `https://example.com` | `example.com` |
444| A port | `example.com:443` | `example.com` |
445| A wildcard | `*.example.com` | `example.com` |
446| A path on a `web_fetch` domain | `example.com/*` | `example.com` |
447| An IP address in any form, whether IPv4, IPv6, bracketed, or numeric shorthand | `127.1` | The site’s domain name |
448| A bare top-level domain or registry suffix | `com`, `co.uk`, `gov.uk` | A full domain such as `example.co.uk` |
449| A single-label name | `intranet` | A full domain such as `example.co.uk` |
450| Non-ASCII characters, as in an internationalized domain name | | The `xn--` (Punycode) form |
441| Not accepted | Example | Use instead |
442| ----- | ----- | ----- |
443| A scheme | `https://example.com` | `example.com` |
444| A port | `example.com:443` | `example.com` |
445| A wildcard | `*.example.com` | `example.com` |
446| A path on a `web_fetch` domain | `example.com/*` | `example.com` |
447| An IP address in any form, whether IPv4, IPv6, bracketed, or numeric shorthand | `127.1` | The site’s domain name |
448| A bare top-level domain or registry suffix | `com`, `co.uk`, `gov.uk` | A full domain such as `example.co.uk` |
449| A single-label name | `intranet` | A full domain such as `example.co.uk` |
450| Non-ASCII characters, as in an internationalized domain name | | The `xn--` (Punycode) form |
451451
452452The API also rejects a domain that contains credentials or whitespace, or that has a label starting or ending with a hyphen. It rejects `localhost` and hosts ending in `.localhost`, `.local`, `.internal`, `.localdomain`, or `.invalid` too.
453453
from line 463
463463
464464The API rejects format and limit violations with a 400 `invalid_request_error`:
465465
466| Violation | Error message |
467| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
468| An entry sets both lists. | Includes `Only one of allowed_domains or blocked_domains may be set.` |
469| A list is empty. | Includes `allowed_domains: Empty list of domains is ambiguous. Provide at least one domain or null.` |
466| Violation | Error message |
467| ----- | ----- |
468| An entry sets both lists. | Includes `Only one of allowed_domains or blocked_domains may be set.` |
469| A list is empty. | Includes `allowed_domains: Empty list of domains is ambiguous. Provide at least one domain or null.` |
470470| A domain breaks a format rule. | Names the domain’s list and zero-based position, as in `allowed_domains.0: IP addresses are not supported; provide a plain hostname like "example.com"` |
471471
472472On the same requests, the API also rejects three settings that depend on the search and fetch providers:
from line 497
497497
498498The settings combine as follows:
499499
500| Setting | How it combines |
501| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
502| `allowed_domains` | The tool can reach a host only if every list covers it. |
503| `blocked_domains` | The lists add together. |
500| Setting | How it combines |
501| ----- | ----- |
502| `allowed_domains` | The tool can reach a host only if every list covers it. |
503| `blocked_domains` | The lists add together. |
504504| `max_content_tokens`, `user_location` | Not combined. A thread uses the value from its own tool configuration if set. Otherwise it uses the value from the agent that called it, and otherwise the current configuration of the session’s agent. |
505505
506506A listed agent can therefore narrow what a tool reaches but never widen it:
from line 560
560560* Availability: Available
561561* Usage: Set `allowed_domains` or `blocked_domains` on the `web_search` or `web_fetch` tool in the request.
562562
563| Status | Cloud platforms |
564| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
563| Status | Cloud platforms |
564| ----- | ----- |
565565| Available | Claude API, [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) |
566566
567567#### [Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview)
from line 569
569569* Availability: Available
570570* Usage: Set the same fields on the `web_search` and `web_fetch` entries of the agent toolset. Unlike the Messages API, each list holds at most 64 ASCII domains, and `web_fetch` domains cannot include a path.
571571
572| Status | Cloud platforms | Models |
573| ------ | ----------------------- | ----------------------------------------------------------------- |
574| Beta | All supported platforms | [All models](https://platform.claude.com/docs/en/models/overview) |
572| Status | Cloud platforms | Models |
573| ----- | ----- | ----- |
574| Beta | All supported platforms | [All models](https://platform.claude.com/docs/en/models/overview) |
575575
576576### Required beta headers
577577
from line 579
579579
580580Beta headers allow you to access experimental features and new model capabilities before they become part of the standard API.
581581
582| Header | APIs |
583| --------------------------- | ----------------------------------------------------------------------------- |
582| Header | APIs |
583| ----- | ----- |
584584| `managed-agents-2026-04-01` | [Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) |
585585
managed-agents/vaults Changed · +15 / -15 lines
from line 716
716716
717717 `injection_location` (java, php: `injectionLocation`; csharp, go: `InjectionLocation`) behaves differently on create and on update:
718718
719 | Operation | `injection_location` behavior |
720 | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
719 | Operation | `injection_location` behavior |
720 | ----- | ----- |
721721 | Create credential | If you provide the object, any field you omit inside it defaults to `false`: `{"header": true}` creates a header-only credential. Omit the object entirely and both locations are enabled. |
722 | Update credential | Fields merge individually: `{"body": false}` disables body substitution and leaves `header` unchanged. |
722 | Update credential | Fields merge individually: `{"body": false}` disables body substitution and leaves `header` unchanged. |
723723
724724 A credential must have at least one location enabled, so a create or update that would disable both locations returns a 400 error. Passing an explicit `null` for the `injection_location` (java, php: `injectionLocation`; csharp, go: `InjectionLocation`) object or for either field also returns a 400 error (“omit the field instead”). The response always returns both fields with their resolved values.
725725
from line 991
991991
992992To be notified if a credential is archived, deleted, or fails to refresh, you can subscribe to the vault and credential [webhooks](https://platform.claude.com/docs/en/managed-agents/webhooks) associated with those lifecycle changes.
993993
994| Event | Trigger |
995| --------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
996| `vault.archived` | Vault archived. A `vault_credential.archived` event is also emitted for each underlying credential. |
997| `vault.deleted` | Vault deleted. A `vault_credential.deleted` event is also emitted for each underlying credential. |
998| `vault_credential.archived` | Credential archived, either directly or as a result of vault archival. |
999| `vault_credential.deleted` | Credential deleted, either directly or as a result of vault deletion. |
994| Event | Trigger |
995| ----- | ----- |
996| `vault.archived` | Vault archived. A `vault_credential.archived` event is also emitted for each underlying credential. |
997| `vault.deleted` | Vault deleted. A `vault_credential.deleted` event is also emitted for each underlying credential. |
998| `vault_credential.archived` | Credential archived, either directly or as a result of vault archival. |
999| `vault_credential.deleted` | Credential deleted, either directly or as a result of vault deletion. |
10001000| `vault_credential.refresh_failed` | An `mcp_oauth` credential cannot be refreshed (invalid refresh token, or irrecoverable error from the OAuth server). |
10011001
10021002<Note>
from line 1131
11311131
11321132* Availability: Available
11331133
1134| Status | Cloud platforms | Models |
1135| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------- |
1136| Beta | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | [All models](https://platform.claude.com/docs/en/models/overview) |
1134| Status | Cloud platforms | Models |
1135| ----- | ----- | ----- |
1136| Beta | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | [All models](https://platform.claude.com/docs/en/models/overview) |
11371137
11381138### Required beta headers
11391139
from line 1147
11471147
11481148[Data handling overview](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility)
11491149
1150| Item | Zero data retention | HIPAA |
1151| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
1152| Status | Not eligible | Not eligible |
1150| Item | Zero data retention | HIPAA |
1151| ----- | ----- | ----- |
1152| Status | Not eligible | Not eligible |
11531153| Details | Not eligible for ZDR, except for self-hosted Managed Agents. Sessions are stateful resources; transcripts persist until you delete them. [Learn more](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#how-long-data-is-kept) | Not eligible for HIPAA. Applies to all Managed Agents sub-features. |
11541154
11551155Applicable endpoints:
managed-agents/webhooks Changed · +57 / -57 lines
from line 46
4646 <Tab title="Session events">
4747 Some of these events are named differently from the matching events on the session’s [event stream](https://platform.claude.com/docs/en/managed-agents/events-and-streaming). For example, the stream’s `session.status_idle` and `session.status_running` correspond to the `session.status_idled` and `session.status_run_started` webhook events.
4848
49 | Event | Trigger |
50 | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
51 | `session.status_run_started` | The agent started running. This triggers at every session status transition to `running`. |
52 | `session.status_idled` | Agent awaiting input, for example, a tool permission approval or a new user message. |
53 | `session.budget_reached` | The session reached its [budget](https://platform.claude.com/docs/en/managed-agents/budgets) and paused. Fires at most once for each budget value you set; changing the budget arms it again. |
54 | `session.status_rescheduled` | A transient error occurred and the session is retrying automatically. |
55 | `session.status_terminated` | The session terminated, either because of an unrecoverable error or because it was archived. |
56 | `session.thread_created` | New [multiagent thread](https://platform.claude.com/docs/en/managed-agents/session-threads) opened: an additional agent called by the agent that the session runs is starting work, or the session’s [advisor](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration#give-the-session-an-advisor) is being consulted. It also fires for each thread of a [workflow run](https://platform.claude.com/docs/en/managed-agents/workflow-runs#a-runs-threads), and so do the other two thread events in this table. |
57 | `session.thread_idled` | An agent in a [multiagent interaction](https://platform.claude.com/docs/en/managed-agents/session-threads) is waiting for input. |
58 | `session.thread_terminated` | A [multiagent thread](https://platform.claude.com/docs/en/managed-agents/session-threads) terminated, either because the thread was archived or because it exhausted its retries. A subagent that finishes its work goes `idle`, not `terminated` (an advisor thread terminates once its consultation completes, and a workflow run’s threads terminate when the server archives them, by the end of the run). Fires for child threads only; the primary thread’s end, including archiving the whole session, surfaces only as `session.status_terminated`. |
59 | `session.outcome_evaluation_ended` | [Outcome evaluation](https://platform.claude.com/docs/en/managed-agents/define-outcomes) for a single iteration completed. |
60 | `session.updated` | Session properties changed (for example, its name or configuration was updated). |
61 | `session.deleted` | Session permanently deleted. There is no object left to fetch, so treat the event itself as final. |
49 | Event | Trigger |
50 | ----- | ----- |
51 | `session.status_run_started` | The agent started running. This triggers at every session status transition to `running`. |
52 | `session.status_idled` | Agent awaiting input, for example, a tool permission approval or a new user message. |
53 | `session.budget_reached` | The session reached its [budget](https://platform.claude.com/docs/en/managed-agents/budgets) and paused. Fires at most once for each budget value you set; changing the budget arms it again. |
54 | `session.status_rescheduled` | A transient error occurred and the session is retrying automatically. |
55 | `session.status_terminated` | The session terminated, either because of an unrecoverable error or because it was archived. |
56 | `session.thread_created` | New [multiagent thread](https://platform.claude.com/docs/en/managed-agents/session-threads) opened: an additional agent called by the agent that the session runs is starting work, or the session’s [advisor](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration#give-the-session-an-advisor) is being consulted. It also fires for each thread of a [workflow run](https://platform.claude.com/docs/en/managed-agents/workflow-runs#a-runs-threads), and so do the other two thread events in this table. |
57 | `session.thread_idled` | An agent in a [multiagent interaction](https://platform.claude.com/docs/en/managed-agents/session-threads) is waiting for input. |
58 | `session.thread_terminated` | A [multiagent thread](https://platform.claude.com/docs/en/managed-agents/session-threads) terminated, either because the thread was archived or because it exhausted its retries. A subagent that finishes its work goes `idle`, not `terminated` (an advisor thread terminates once its consultation completes, and a workflow run’s threads terminate when the server archives them, by the end of the run). Fires for child threads only; the primary thread’s end, including archiving the whole session, surfaces only as `session.status_terminated`. |
59 | `session.outcome_evaluation_ended` | [Outcome evaluation](https://platform.claude.com/docs/en/managed-agents/define-outcomes) for a single iteration completed. |
60 | `session.updated` | Session properties changed (for example, its name or configuration was updated). |
61 | `session.deleted` | Session permanently deleted. There is no object left to fetch, so treat the event itself as final. |
6262 </Tab>
6363
6464 <Tab title="Vault events">
65 | Event | Trigger |
66 | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
67 | `vault.created` | Vault created. |
68 | `vault.archived` | Vault archived. A `vault_credential.archived` event is also emitted for each underlying credential. |
69 | `vault.deleted` | Vault deleted. A `vault_credential.deleted` event is also emitted for each underlying credential. There is no object left to fetch, so treat the event itself as final. |
70 | `vault_credential.created` | Credential created. |
71 | `vault_credential.archived` | Credential archived, either directly or as a result of vault archival. |
72 | `vault_credential.deleted` | Credential deleted, either directly or as a result of vault deletion. There is no object left to fetch, so treat the event itself as final. |
73 | `vault_credential.refresh_failed` | An `mcp_oauth` credential cannot be refreshed (invalid refresh token, or irrecoverable error from the OAuth server). |
65 | Event | Trigger |
66 | ----- | ----- |
67 | `vault.created` | Vault created. |
68 | `vault.archived` | Vault archived. A `vault_credential.archived` event is also emitted for each underlying credential. |
69 | `vault.deleted` | Vault deleted. A `vault_credential.deleted` event is also emitted for each underlying credential. There is no object left to fetch, so treat the event itself as final. |
70 | `vault_credential.created` | Credential created. |
71 | `vault_credential.archived` | Credential archived, either directly or as a result of vault archival. |
72 | `vault_credential.deleted` | Credential deleted, either directly or as a result of vault deletion. There is no object left to fetch, so treat the event itself as final. |
73 | `vault_credential.refresh_failed` | An `mcp_oauth` credential cannot be refreshed (invalid refresh token, or irrecoverable error from the OAuth server). |
7474 </Tab>
7575
7676 <Tab title="Agent events">
7777 These events track the lifecycle of the agent resources in your workspace, and are distinct from the agent events delivered on a session’s event stream.
7878
79 | Event | Trigger |
80 | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
81 | `agent.created` | Agent created. |
82 | `agent.updated` | A [new version of the agent](https://platform.claude.com/docs/en/managed-agents/agent-setup#update-an-agent) was published. Updates that do not create a new version do not trigger this event. |
83 | `agent.archived` | Agent archived. |
84 | `agent.deleted` | Agent permanently deleted. There is no object left to fetch, so treat the event itself as final. |
79 | Event | Trigger |
80 | ----- | ----- |
81 | `agent.created` | Agent created. |
82 | `agent.updated` | A [new version of the agent](https://platform.claude.com/docs/en/managed-agents/agent-setup#update-an-agent) was published. Updates that do not create a new version do not trigger this event. |
83 | `agent.archived` | Agent archived. |
84 | `agent.deleted` | Agent permanently deleted. There is no object left to fetch, so treat the event itself as final. |
8585 </Tab>
8686
8787 <Tab title="Deployment events">
88 | Event | Trigger |
89 | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
90 | `deployment.created` | [Scheduled deployment](https://platform.claude.com/docs/en/managed-agents/scheduled-deployments) created. |
91 | `deployment.updated` | Deployment properties changed (for example, its schedule was updated). |
92 | `deployment.paused` | Deployment paused, either by request or automatically when a scheduled run fails with an unrecoverable error, such as an archived subagent or an archived environment. Recoverable failures, including rate limits, don’t pause the deployment. See [Failure behavior](https://platform.claude.com/docs/en/managed-agents/scheduled-deployments#failure-behavior). |
93 | `deployment.unpaused` | Deployment unpaused, resuming its schedule. |
94 | `deployment.archived` | Deployment archived, either directly or because its agent was archived. If the agent is deleted instead, a scheduled deployment is archived at its next scheduled run; a deployment without a schedule is not archived automatically. |
95 | `deployment.deleted` | Deployment permanently deleted. There is no object left to fetch, so treat the event itself as final. |
88 | Event | Trigger |
89 | ----- | ----- |
90 | `deployment.created` | [Scheduled deployment](https://platform.claude.com/docs/en/managed-agents/scheduled-deployments) created. |
91 | `deployment.updated` | Deployment properties changed (for example, its schedule was updated). |
92 | `deployment.paused` | Deployment paused, either by request or automatically when a scheduled run fails with an unrecoverable error, such as an archived subagent or an archived environment. Recoverable failures, including rate limits, don’t pause the deployment. See [Failure behavior](https://platform.claude.com/docs/en/managed-agents/scheduled-deployments#failure-behavior). |
93 | `deployment.unpaused` | Deployment unpaused, resuming its schedule. |
94 | `deployment.archived` | Deployment archived, either directly or because its agent was archived. If the agent is deleted instead, a scheduled deployment is archived at its next scheduled run; a deployment without a schedule is not archived automatically. |
95 | `deployment.deleted` | Deployment permanently deleted. There is no object left to fetch, so treat the event itself as final. |
9696 </Tab>
9797
9898 <Tab title="Deployment run events">
99 | Event | Trigger |
100 | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
101 | `deployment_run.started` | A scheduled run started. Only scheduled runs emit `deployment_run` events; [manual runs](https://platform.claude.com/docs/en/managed-agents/scheduled-deployments#trigger-a-manual-run) do not. |
99 | Event | Trigger |
100 | ----- | ----- |
101 | `deployment_run.started` | A scheduled run started. Only scheduled runs emit `deployment_run` events; [manual runs](https://platform.claude.com/docs/en/managed-agents/scheduled-deployments#trigger-a-manual-run) do not. |
102102 | `deployment_run.succeeded` | A scheduled run created its session. The event carries the same `data.id` (the run ID) as the run’s `deployment_run.started` event. To follow the session’s work, subscribe to its session events (the **Session events** tab), or fetch the [deployment run](https://platform.claude.com/docs/en/managed-agents/scheduled-deployments#deployment-runs) for its `session_id` (java: `sessionId`; php: `sessionID`; csharp, go: `SessionID`). |
103 | `deployment_run.failed` | A scheduled run did not create a session. The event carries the same `data.id` as the run’s `deployment_run.started` event. Fetch the [deployment run](https://platform.claude.com/docs/en/managed-agents/scheduled-deployments#deployment-runs) for the error details. |
103 | `deployment_run.failed` | A scheduled run did not create a session. The event carries the same `data.id` as the run’s `deployment_run.started` event. Fetch the [deployment run](https://platform.claude.com/docs/en/managed-agents/scheduled-deployments#deployment-runs) for the error details. |
104104 </Tab>
105105
106106 <Tab title="Environment events">
107 | Event | Trigger |
108 | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
109 | `environment.created` | Environment created. |
110 | `environment.updated` | Environment updated with at least one changed field. A no-op update emits nothing. |
111 | `environment.archived` | Environment archived. Re-archiving an already-archived environment emits nothing. |
112 | `environment.deleted` | Environment deleted, including delete of an already-archived environment. There is no object left to fetch, so treat the event itself as final. |
107 | Event | Trigger |
108 | ----- | ----- |
109 | `environment.created` | Environment created. |
110 | `environment.updated` | Environment updated with at least one changed field. A no-op update emits nothing. |
111 | `environment.archived` | Environment archived. Re-archiving an already-archived environment emits nothing. |
112 | `environment.deleted` | Environment deleted, including delete of an already-archived environment. There is no object left to fetch, so treat the event itself as final. |
113113
114114 An environment’s [work items](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes) emit no webhook events.
115115 </Tab>
116116
117117 <Tab title="Memory store events">
118 | Event | Trigger |
119 | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
120 | `memory_store.created` | Memory store created, either by you or by an Anthropic-operated process that clones one of your existing stores. |
121 | `memory_store.archived` | Memory store archived. Re-archiving an already-archived store emits nothing. |
122 | `memory_store.deleted` | Memory store deleted, including delete of an already-archived store. Deleting a store cascades to its memories and memory versions without emitting per-memory events; the single `memory_store.deleted` event is the signal. There is no object left to fetch, so treat the event itself as final. |
118 | Event | Trigger |
119 | ----- | ----- |
120 | `memory_store.created` | Memory store created, either by you or by an Anthropic-operated process that clones one of your existing stores. |
121 | `memory_store.archived` | Memory store archived. Re-archiving an already-archived store emits nothing. |
122 | `memory_store.deleted` | Memory store deleted, including delete of an already-archived store. Deleting a store cascades to its memories and memory versions without emitting per-memory events; the single `memory_store.deleted` event is the signal. There is no object left to fetch, so treat the event itself as final. |
123123
124124 Individual [memories](https://platform.claude.com/docs/en/managed-agents/memory) and memory versions emit no webhook events.
125125 </Tab>
from line 449
449449
450450* Availability: Available
451451
452| Status | Cloud platforms |
453| ------ | ------------------------------------------------------------------------------------------------------------------ |
454| Beta | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) |
452| Status | Cloud platforms |
453| ----- | ----- |
454| Beta | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) |
455455
456456### Required beta headers
457457
from line 465
465465
466466[Data handling overview](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility)
467467
468| Item | Zero data retention | HIPAA |
469| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
470| Status | Not eligible | Not eligible |
468| Item | Zero data retention | HIPAA |
469| ----- | ----- | ----- |
470| Status | Not eligible | Not eligible |
471471| Details | Not eligible for ZDR, except for self-hosted Managed Agents. Sessions are stateful resources; transcripts persist until you delete them. [Learn more](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#how-long-data-is-kept) | Not eligible for HIPAA. Applies to all Managed Agents sub-features. |
472472
473473Applicable endpoints:
managed-agents/workflow-runs Changed · +43 / -43 lines
from line 83
8383
8484Run events arrive on the session’s event stream, which is the primary thread’s stream, and listing the session’s events returns them too. Run events don’t [trigger webhooks](https://platform.claude.com/docs/en/managed-agents/webhooks). Status events from the run’s threads arrive on the same stream. Each names its thread in `session_thread_id` (java: `sessionThreadId`; php: `sessionThreadID`; csharp, go: `SessionThreadID`), and a run’s threads are the ones whose `session.thread_created` event had the run’s `workflow_run_id` (java: `workflowRunId`; php: `workflowRunID`; csharp, go: `WorkflowRunID`).
8585
86| Event | When it arrives | What to do |
87| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
88| `workflow_run.created` | The agent started a run. Includes `workflow_run_id` (java: `workflowRunId`; php: `workflowRunID`; csharp, go: `WorkflowRunID`) (`wrun_…`), the run’s `name` (csharp, go: `Name`) and `description` (csharp, go: `Description`), and `phases` (csharp, go: `Phases`), the phases the workflow declares, each with an `id` (csharp, go: `ID`), a `name` (csharp, go: `Name`), and a `description` (csharp, go: `Description`). A `description` (csharp, go: `Description`) is `null` (python: `None`; ruby: `nil`; java: `Optional.empty()`; go: `""`) when the workflow gives none. `phases` (csharp, go: `Phases`) is always present and can be empty. The run’s and phases’ `name` (csharp, go: `Name`) and `description` (csharp, go: `Description`) are text the model wrote, so they can repeat words from your request. A run’s `name` (csharp, go: `Name`) can also be one the server assigned. | Track the run as open. Show its `name` (csharp, go: `Name`), and progress against `phases` (csharp, go: `Phases`). |
89| `workflow_run.status_running` | When the run starts its work, which can be a while after `created`, and each time it resumes after a pause at the budget. A resume after an interrupt might not send it. A run that starts idle might get `workflow_run.status_idle` first. | Show the run as running. |
90| `workflow_run.status_idle` | The run paused, for example, at the session’s budget. The event doesn’t say why. A pause after an interrupt might not send it. | To continue, see [Cost and budgets](https://platform.claude.com/docs/en/managed-agents/workflow-runs#cost-and-budgets) or [Interrupt a session with runs open](https://platform.claude.com/docs/en/managed-agents/workflow-runs#interrupt-a-session-with-runs-open). |
91| `workflow_run.phase_started`, `workflow_run.phase_ended` | The workflow entered or left a phase, or the run’s end closed a phase that was still open. The end event doesn’t say whether the phase’s work completed. Both include `workflow_run_phase_id` (java: `workflowRunPhaseId`; php: `workflowRunPhaseID`; csharp, go: `WorkflowRunPhaseID`). The end also has `phase_started_id` (java: `phaseStartedId`; php: `phaseStartedID`; csharp, go: `PhaseStartedID`), the `id` (csharp, go: `ID`) of the start event it closes. Neither has the phase’s name: look it up by `workflow_run_phase_id` (java: `workflowRunPhaseId`; php: `workflowRunPhaseID`; csharp, go: `WorkflowRunPhaseID`) in the `phases` (csharp, go: `Phases`) of `workflow_run.created`. | Update progress. Phases run one at a time, in the order of `phases` (csharp, go: `Phases`), each at most once, but the API doesn’t guarantee it. Match a phase’s end to its start by `phase_started_id` (java: `phaseStartedId`; php: `phaseStartedID`; csharp, go: `PhaseStartedID`). Handle more than one open phase, a phase that isn’t in `phases` (csharp, go: `Phases`), and a listed phase that never starts, even in a run that completes. Every phase that starts also ends, before the run’s `workflow_run.status_ended`. |
92| `workflow_run.status_ended` | The run ended. Always the last of the run’s `workflow_run.*` events. Includes `result` (csharp, go: `Result`). | Read `result` (csharp, go: `Result`) (next table). The agent then gets a turn to read how the run ended. At the budget, or while the primary thread waits on your client, that turn comes later. After an interrupt, that turn might not come: send a `user.message`, or read `result` (csharp, go: `Result`) yourself. After an archive or termination, it doesn’t come. |
93| `workflow_run.error` | The server reports an error of a run, or a start that it refused. A run that ends in `error` gets this event, with the same error, before its `workflow_run.status_ended`. Includes `error` (csharp, go: `Error`): a `type` (csharp, go: `Type`) and a `message` (csharp, go: `Message`) that is safe to log. `workflow_run_id` (java: `workflowRunId`; php: `workflowRunID`; csharp, go: `WorkflowRunID`) is `null` (python: `None`; ruby: `nil`; java: `Optional.empty()`; go: `""`) when no run was created. | Log it, and don’t take it as the run’s end. If `workflow_run_id` (java: `workflowRunId`; php: `workflowRunID`; csharp, go: `WorkflowRunID`) is `null` (python: `None`; ruby: `nil`; java: `Optional.empty()`; go: `""`), no run started. Otherwise keep tracking the run until its `workflow_run.status_ended`. |
86| Event | When it arrives | What to do |
87| ----- | ----- | ----- |
88| `workflow_run.created` | The agent started a run. Includes `workflow_run_id` (java: `workflowRunId`; php: `workflowRunID`; csharp, go: `WorkflowRunID`) (`wrun_…`), the run’s `name` (csharp, go: `Name`) and `description` (csharp, go: `Description`), and `phases` (csharp, go: `Phases`), the phases the workflow declares, each with an `id` (csharp, go: `ID`), a `name` (csharp, go: `Name`), and a `description` (csharp, go: `Description`). A `description` (csharp, go: `Description`) is `null` (python: `None`; ruby: `nil`; java: `Optional.empty()`; go: `""`) when the workflow gives none. `phases` (csharp, go: `Phases`) is always present and can be empty. The run’s and phases’ `name` (csharp, go: `Name`) and `description` (csharp, go: `Description`) are text the model wrote, so they can repeat words from your request. A run’s `name` (csharp, go: `Name`) can also be one the server assigned. | Track the run as open. Show its `name` (csharp, go: `Name`), and progress against `phases` (csharp, go: `Phases`). |
89| `workflow_run.status_running` | When the run starts its work, which can be a while after `created`, and each time it resumes after a pause at the budget. A resume after an interrupt might not send it. A run that starts idle might get `workflow_run.status_idle` first. | Show the run as running. |
90| `workflow_run.status_idle` | The run paused, for example, at the session’s budget. The event doesn’t say why. A pause after an interrupt might not send it. | To continue, see [Cost and budgets](https://platform.claude.com/docs/en/managed-agents/workflow-runs#cost-and-budgets) or [Interrupt a session with runs open](https://platform.claude.com/docs/en/managed-agents/workflow-runs#interrupt-a-session-with-runs-open). |
91| `workflow_run.phase_started`, `workflow_run.phase_ended` | The workflow entered or left a phase, or the run’s end closed a phase that was still open. The end event doesn’t say whether the phase’s work completed. Both include `workflow_run_phase_id` (java: `workflowRunPhaseId`; php: `workflowRunPhaseID`; csharp, go: `WorkflowRunPhaseID`). The end also has `phase_started_id` (java: `phaseStartedId`; php: `phaseStartedID`; csharp, go: `PhaseStartedID`), the `id` (csharp, go: `ID`) of the start event it closes. Neither has the phase’s name: look it up by `workflow_run_phase_id` (java: `workflowRunPhaseId`; php: `workflowRunPhaseID`; csharp, go: `WorkflowRunPhaseID`) in the `phases` (csharp, go: `Phases`) of `workflow_run.created`. | Update progress. Phases run one at a time, in the order of `phases` (csharp, go: `Phases`), each at most once, but the API doesn’t guarantee it. Match a phase’s end to its start by `phase_started_id` (java: `phaseStartedId`; php: `phaseStartedID`; csharp, go: `PhaseStartedID`). Handle more than one open phase, a phase that isn’t in `phases` (csharp, go: `Phases`), and a listed phase that never starts, even in a run that completes. Every phase that starts also ends, before the run’s `workflow_run.status_ended`. |
92| `workflow_run.status_ended` | The run ended. Always the last of the run’s `workflow_run.*` events. Includes `result` (csharp, go: `Result`). | Read `result` (csharp, go: `Result`) (next table). The agent then gets a turn to read how the run ended. At the budget, or while the primary thread waits on your client, that turn comes later. After an interrupt, that turn might not come: send a `user.message`, or read `result` (csharp, go: `Result`) yourself. After an archive or termination, it doesn’t come. |
93| `workflow_run.error` | The server reports an error of a run, or a start that it refused. A run that ends in `error` gets this event, with the same error, before its `workflow_run.status_ended`. Includes `error` (csharp, go: `Error`): a `type` (csharp, go: `Type`) and a `message` (csharp, go: `Message`) that is safe to log. `workflow_run_id` (java: `workflowRunId`; php: `workflowRunID`; csharp, go: `WorkflowRunID`) is `null` (python: `None`; ruby: `nil`; java: `Optional.empty()`; go: `""`) when no run was created. | Log it, and don’t take it as the run’s end. If `workflow_run_id` (java: `workflowRunId`; php: `workflowRunID`; csharp, go: `WorkflowRunID`) is `null` (python: `None`; ruby: `nil`; java: `Optional.empty()`; go: `""`), no run started. Otherwise keep tracking the run until its `workflow_run.status_ended`. |
9494
95| `result` | Meaning |
96| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
97| `{"type": "completed"}` | The workflow finished running. The result doesn’t say whether the work passed. A run can end `completed` even though work on its threads failed, or a thread couldn’t be created. To find failed work, read the events of each of the [run’s threads](https://platform.claude.com/docs/en/managed-agents/workflow-runs#a-runs-threads). |
98| `{"type": "stopped"}` | The agent stopped the run, or the session was archived. The event doesn’t say which. Don’t treat these as the only causes. |
99| `error` with `timeout_error` | The run reached its [lifetime limit](https://platform.claude.com/docs/en/managed-agents/workflow-runs#limits), which the agent can set. |
100| `error` with `program_error` | The workflow failed. Its code failed, or it broke a rule for workflows, other than a limit. Or one of the run’s threads failed, or couldn’t be created, and the workflow let that end the run. |
101| `error` with `thread_limit_error` | The run went over its [limit on the agents that a workflow starts](https://platform.claude.com/docs/en/managed-agents/workflow-runs#limits). |
102| `error` with `unknown_error` | The server couldn’t continue the run, or the run went over one of the server’s other limits on workflows. |
95| `result` | Meaning |
96| ----- | ----- |
97| `{"type": "completed"}` | The workflow finished running. The result doesn’t say whether the work passed. A run can end `completed` even though work on its threads failed, or a thread couldn’t be created. To find failed work, read the events of each of the [run’s threads](https://platform.claude.com/docs/en/managed-agents/workflow-runs#a-runs-threads). |
98| `{"type": "stopped"}` | The agent stopped the run, or the session was archived. The event doesn’t say which. Don’t treat these as the only causes. |
99| `error` with `timeout_error` | The run reached its [lifetime limit](https://platform.claude.com/docs/en/managed-agents/workflow-runs#limits), which the agent can set. |
100| `error` with `program_error` | The workflow failed. Its code failed, or it broke a rule for workflows, other than a limit. Or one of the run’s threads failed, or couldn’t be created, and the workflow let that end the run. |
101| `error` with `thread_limit_error` | The run went over its [limit on the agents that a workflow starts](https://platform.claude.com/docs/en/managed-agents/workflow-runs#limits). |
102| `error` with `unknown_error` | The server couldn’t continue the run, or the run went over one of the server’s other limits on workflows. |
103103
104104An error result looks like `{"type": "error", "error": {"type": "timeout_error", "message": "..."}}`, where `message` is safe to log. Treat an unrecognized `result.type` as a run that ended some other way, and an unrecognized `error.type` as an error. When something the session depends on fails, such as the model, an MCP server, credentials, or billing, the failing thread’s stream gets a `session.error`. That doesn’t end a run by itself. But if it makes one of the run’s threads fail, and the workflow lets that end the run, the run ends with `program_error`.
105105
from line 792
792792
793793## While a run is open
794794
795| Request | While a run is open | What to do |
796| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
797| Archive or delete the session | Might return 400 while a run is open, whatever the session’s status. The error’s `error.details.error_code` can be `"workflow_run_open"`. Might also succeed. | Ask the agent to stop its runs, or wait until each run has ended. A paused run ends by itself only when its lifetime passes. Then send the request once the session is `idle`. An archive that succeeds ends each open run with `{"type": "stopped"}`. After an archive, a run’s `workflow_run.status_ended`, and the `workflow_run.phase_ended` of a phase that was still open, don’t arrive on the stream. List the session’s events to read them. After a delete that succeeds, no `workflow_run` event reports the end of the session’s runs. |
798| Archive one of a run’s threads | Returns 400 with `error.details.error_code: "workflow_run_open"` while the run is open, running or idle, unless the server has already archived the thread. | Nothing. The server archives a run’s threads. |
799| Update the session’s `agent` (csharp, go: `Agent`) | Returns 400 with `error.details.error_code: "workflow_run_open"` while any run is open, even a paused one. Updating the underlying agent is still accepted, and the session keeps its own copy. A request that also sends other fields, such as `budget` (csharp, go: `Budget`), is rejected whole. | Wait until every run has its `workflow_run.status_ended`, or ask the agent to stop its runs. |
800| Answer a tool call or tool confirmation from a run’s thread | Allowed. It arrives on the primary stream, and its `session_thread_id` (java: `sessionThreadId`; php: `sessionThreadID`; csharp, go: `SessionThreadID`) names the thread. | Answer as soon as the event arrives, passing the event’s `id` (csharp, go: `ID`) as `tool_use_id` (java: `toolUseId`; php: `toolUseID`; csharp, go: `ToolUseID`) or `custom_tool_use_id` (java: `customToolUseId`; php: `customToolUseID`; csharp, go: `CustomToolUseID`). Don’t wait for `session.status_idle`: the session can stay `running` while the run’s other threads work. Once the server has archived the thread, a tool result for one of its calls has no effect, and it can return 400. When a tool result returns 400, find the call’s thread in the thread list. If its status is `terminated`, the result came too late, so drop it. Send each tool result in a request of its own, because the server refuses a whole request when it refuses one of its events. A tool confirmation that comes too late returns 200, which doesn’t mean that the tool ran. |
795| Request | While a run is open | What to do |
796| ----- | ----- | ----- |
797| Archive or delete the session | Might return 400 while a run is open, whatever the session’s status. The error’s `error.details.error_code` can be `"workflow_run_open"`. Might also succeed. | Ask the agent to stop its runs, or wait until each run has ended. A paused run ends by itself only when its lifetime passes. Then send the request once the session is `idle`. An archive that succeeds ends each open run with `{"type": "stopped"}`. After an archive, a run’s `workflow_run.status_ended`, and the `workflow_run.phase_ended` of a phase that was still open, don’t arrive on the stream. List the session’s events to read them. After a delete that succeeds, no `workflow_run` event reports the end of the session’s runs. |
798| Archive one of a run’s threads | Returns 400 with `error.details.error_code: "workflow_run_open"` while the run is open, running or idle, unless the server has already archived the thread. | Nothing. The server archives a run’s threads. |
799| Update the session’s `agent` (csharp, go: `Agent`) | Returns 400 with `error.details.error_code: "workflow_run_open"` while any run is open, even a paused one. Updating the underlying agent is still accepted, and the session keeps its own copy. A request that also sends other fields, such as `budget` (csharp, go: `Budget`), is rejected whole. | Wait until every run has its `workflow_run.status_ended`, or ask the agent to stop its runs. |
800| Answer a tool call or tool confirmation from a run’s thread | Allowed. It arrives on the primary stream, and its `session_thread_id` (java: `sessionThreadId`; php: `sessionThreadID`; csharp, go: `SessionThreadID`) names the thread. | Answer as soon as the event arrives, passing the event’s `id` (csharp, go: `ID`) as `tool_use_id` (java: `toolUseId`; php: `toolUseID`; csharp, go: `ToolUseID`) or `custom_tool_use_id` (java: `customToolUseId`; php: `customToolUseID`; csharp, go: `CustomToolUseID`). Don’t wait for `session.status_idle`: the session can stay `running` while the run’s other threads work. Once the server has archived the thread, a tool result for one of its calls has no effect, and it can return 400. When a tool result returns 400, find the call’s thread in the thread list. If its status is `terminated`, the result came too late, so drop it. Send each tool result in a request of its own, because the server refuses a whole request when it refuses one of its events. A tool confirmation that comes too late returns 200, which doesn’t mean that the tool ran. |
801801
802802### Rebuild run state after you reconnect
803803
from line 812
812812
813813## Limits
814814
815| Limit | Value | At the limit |
816| -------------------------------------------------- | --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
817| Threads working at once in one run | 64 | The run creates no more until one finishes. The API doesn’t guarantee this number. |
818| Agents a workflow starts over the run’s whole life | 1,000 | When the workflow asks for more, the server doesn’t start another agent, and the run ends with `thread_limit_error`. The server can run a failed agent again on a new thread, so a run might have more than 1,000 threads. |
819| Run lifetime | 24 hours by default, or the lifetime the agent sets | The run ends with `timeout_error`. No event says what lifetime the agent set. |
820| Runs open at once in a session | 10 by default | The server refuses to start another run. The agent’s tool call gets an error, and you get a `workflow_run.error` whose `error.type` is `max_workflow_runs_error`. Idle runs count toward the limit. |
815| Limit | Value | At the limit |
816| ----- | ----- | ----- |
817| Threads working at once in one run | 64 | The run creates no more until one finishes. The API doesn’t guarantee this number. |
818| Agents a workflow starts over the run’s whole life | 1,000 | When the workflow asks for more, the server doesn’t start another agent, and the run ends with `thread_limit_error`. The server can run a failed agent again on a new thread, so a run might have more than 1,000 threads. |
819| Run lifetime | 24 hours by default, or the lifetime the agent sets | The run ends with `timeout_error`. No event says what lifetime the agent set. |
820| Runs open at once in a session | 10 by default | The server refuses to start another run. The agent’s tool call gets an error, and you get a `workflow_run.error` whose `error.type` is `max_workflow_runs_error`. Idle runs count toward the limit. |
821821
822822The server shortens a run’s or phase’s `name` (csharp, go: `Name`) to 64 characters and its `description` (csharp, go: `Description`) to 256. The server has other limits on workflows, and rules for them, that aren’t listed here. What you see depends on when the server finds the problem:
823823
824| What occurs | What you see |
825| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
826| The workflow is over one of the other limits when the agent starts the run | The server refuses the start. You get a `workflow_run.error`, and no run. |
827| The run goes over one of the other limits later | You get a `workflow_run.error`, and then the run can end with `unknown_error`. |
824| What occurs | What you see |
825| ----- | ----- |
826| The workflow is over one of the other limits when the agent starts the run | The server refuses the start. You get a `workflow_run.error`, and no run. |
827| The run goes over one of the other limits later | You get a `workflow_run.error`, and then the run can end with `unknown_error`. |
828828| The server finds after the start that the workflow breaks a rule for workflows, other than a limit | You get a `workflow_run.error`, and the run can then end with `program_error`. |
829829
830830A session can start any number of runs over its life.
from line 839
839839
840840A run’s work counts toward rate limits that your organization already has.
841841
842| What | Counts toward | What to do |
843| ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
844| Your client’s requests to retrieve or list the session, its threads, and their events | The read limit for [Managed Agents endpoints](https://platform.claude.com/docs/en/managed-agents/reference#rate-limits) | Follow a run on the session’s event stream instead of polling. |
845| Model requests from a run’s threads | Your [Messages API rate limits](https://platform.claude.com/docs/en/api/rate-limits) for the model each thread uses, along with your other traffic | Leave room for a run in those limits, or [request higher limits](https://platform.claude.com/docs/en/api/rate-limits#requesting-higher-limits). |
842| What | Counts toward | What to do |
843| ----- | ----- | ----- |
844| Your client’s requests to retrieve or list the session, its threads, and their events | The read limit for [Managed Agents endpoints](https://platform.claude.com/docs/en/managed-agents/reference#rate-limits) | Follow a run on the session’s event stream instead of polling. |
845| Model requests from a run’s threads | Your [Messages API rate limits](https://platform.claude.com/docs/en/api/rate-limits) for the model each thread uses, along with your other traffic | Leave room for a run in those limits, or [request higher limits](https://platform.claude.com/docs/en/api/rate-limits#requesting-higher-limits). |
846846
847847A thread’s own stream can get a `session.error` when one of its model requests is rate limited or the model is overloaded. The error’s type is `model_rate_limited_error` or `model_overloaded_error`:
848848
from line 861
861861
862862* Availability: Available
863863
864| Status | Cloud platforms |
865| ------ | ----------------------- |
866| Beta | All supported platforms |
864| Status | Cloud platforms |
865| ----- | ----- |
866| Beta | All supported platforms |
867867
868868### Required beta headers
869869
from line 877
877877
878878[Data handling overview](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility)
879879
880| Item | Zero data retention | HIPAA |
881| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
882| Status | Not eligible | Not eligible |
880| Item | Zero data retention | HIPAA |
881| ----- | ----- | ----- |
882| Status | Not eligible | Not eligible |
883883| Details | Not eligible for ZDR, except for self-hosted Managed Agents. Sessions are stateful resources; transcripts persist until you delete them. [Learn more](https://platform.claude.com/docs/en/managed-agents/self-hosted-data-and-access#how-long-data-is-kept) | Not eligible for HIPAA. Applies to all Managed Agents sub-features. |
884884
885885Applicable endpoints:
models/fable-5-1/overview Changed · +38 / -38 lines
from line 20
2020
2121## How it compares to the current lineup
2222
23| Model | Context | Max output | Price / MTok | Thinking | Default effort | Knowledge cutoff |
24| :---------------------------------------------------------------------------------- | :------ | :--------- | :----------------- | :------------------- | :------------- | :--------------- |
25| [Claude Fable 5.2](https://platform.claude.com/docs/en/models/fable-5-2/overview) | 1M | 128K | $8 / $40 | Adaptive (always on) | `high` | Jun 2026 |
26| **Claude Fable 5.1** (this model) | 1M | 128K | $10 / $50 | Adaptive (always on) | `high` | Jun 2026 |
27| [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview) | 1M | 128K | $4 / $20 | Adaptive (always on) | `medium` | Jun 2026 |
28| [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview) | 1M | 128K | $2 / $10 | Adaptive | `high` | Jun 2026 |
29| [Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/overview) | 1M | 128K | From $0.10 / $0.50 | Adaptive | `medium` | Jun 2026 |
23| Model | Context | Max output | Price / MTok | Thinking | Default effort | Knowledge cutoff |
24| :---- | :---- | :---- | :---- | :---- | :---- | :---- |
25| [Claude Fable 5.2](https://platform.claude.com/docs/en/models/fable-5-2/overview) | 1M | 128K | $8 / $40 | Adaptive (always on) | `high` | Jun 2026 |
26| **Claude Fable 5.1** (this model) | 1M | 128K | $10 / $50 | Adaptive (always on) | `high` | Jun 2026 |
27| [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview) | 1M | 128K | $4 / $20 | Adaptive (always on) | `medium` | Jun 2026 |
28| [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview) | 1M | 128K | $2 / $10 | Adaptive | `high` | Jun 2026 |
29| [Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/overview) | 1M | 128K | From $0.10 / $0.50 | Adaptive | `medium` | Jun 2026 |
3030
3131* **Context:** 1M tokens is roughly 555k words or 2.5M Unicode characters on the current tokenizer (introduced with Claude Opus 4.7); models before it fit about 750k words in 1M tokens. 200k tokens is roughly 150k words.
3232* **Max output:** Synchronous Messages API limit. On the Message Batches API, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Sonnet 5, Claude Haiku 5.5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 4.6 support up to 300k output tokens with the output-300k-2026-03-24 beta header.
from line 39
3939
4040### Model IDs
4141
42| Platform | Model ID |
43| :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------- |
44| Claude API | `claude-fable-5-1` |
45| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-fable-5-1` |
46| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-fable-5-1` |
47| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-fable-5-1` |
48| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-fable-5-1` |
49| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-fable-5-1` |
42| Platform | Model ID |
43| :---- | :---- |
44| Claude API | `claude-fable-5-1` |
45| [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-fable-5-1` |
46| [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-fable-5-1` |
47| [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-fable-5-1` |
48| [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-fable-5-1` |
49| [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-fable-5-1` |
5050
5151### Pricing
5252
53| Feature | Value |
54| :------------------------------------------------------------------------------------- | :------------------------------- |
55| Input | $10 / MTok |
56| Output | $50 / MTok |
57| [5m cache write](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) | $12.50 / MTok |
58| [1h cache write](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) | $20 / MTok |
59| [Cache read](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) | $0.25 / MTok |
60| [Batch API](https://platform.claude.com/docs/en/build-with-claude/batch-processing) | 50% discount on input and output |
53| Feature | Value |
54| :---- | :---- |
55| Input | $10 / MTok |
56| Output | $50 / MTok |
57| [5m cache write](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) | $12.50 / MTok |
58| [1h cache write](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) | $20 / MTok |
59| [Cache read](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) | $0.25 / MTok |
60| [Batch API](https://platform.claude.com/docs/en/build-with-claude/batch-processing) | 50% discount on input and output |
6161
6262[Full price list](https://platform.claude.com/docs/en/about-claude/pricing)
6363
6464### Capabilities
6565
66| Feature | Value |
67| :-------------------------------------------------------------------------------------- | :--------------------- |
68| [Context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) | 1M tokens |
69| Max output | 128K tokens |
70| [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) | Adaptive (always on) |
71| [Default effort](https://platform.claude.com/docs/en/build-with-claude/effort) | `high` |
72| Input → output | Text and images → text |
73| Reliable knowledge cutoff | Jun 2026 |
74| Training data cutoff | Jun 2026 |
66| Feature | Value |
67| :---- | :---- |
68| [Context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) | 1M tokens |
69| Max output | 128K tokens |
70| [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) | Adaptive (always on) |
71| [Default effort](https://platform.claude.com/docs/en/build-with-claude/effort) | `high` |
72| Input → output | Text and images → text |
73| Reliable knowledge cutoff | Jun 2026 |
74| Training data cutoff | Jun 2026 |
7575
7676### Availability
7777
78| Feature | Value |
79| :---------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
80| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) |
81| Released | September 1, 2026 |
82| Retirement | Not sooner than September 1, 2027 |
83| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) |
78| Feature | Value |
79| :---- | :---- |
80| [Status](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Active (legacy) |
81| Released | September 1, 2026 |
82| Retirement | Not sooner than September 1, 2027 |
83| Platforms | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) |
8484
8585## Resources
8686