/v1 routes use the object model of the Anthropic Managed Agents API (beta managed-agents-2026-04-01): agents, environments, sessions and events. Point the official SDK (Python ≥ 2.3 or TypeScript ≥ 1.3) at BMA by setting base_url and using a BMA API key, and the capabilities listed below work. The routes serve a subset of that API: the unsupported list and the behavior differences below apply. The quickstart uses exactly this connection.
The rule BMA follows for requests: a field BMA cannot honor is rejected with 400 and an error.code that names it (usually unsupported or unsupported_session_override) instead of being accepted and ignored. The known exceptions are listed below until they are fixed.
Checked with the official
anthropic Python SDK 2.6.0 and TypeScript SDK 1.6.0 against the hosted deployment./v1 API shape. BMA runs the models configured for your organization (model ids are BMA model names, not Claude model ids), and its sandboxes use BMA’s own machine images and sizes, not the Claude cloud sandbox (Ubuntu 24.04, 8 GB memory, 10 GB disk). See Machines.
Supported subset
Not supported
- Endpoints: Skill version endpoints, Deployments and deployment runs, Dreams, Tunnels, User profiles,
GET /v1/agents/{id}/versions, session thread endpoints, session resource retrieve/update, memory store archive, memory versions. - Multi-agent orchestration and threads, outcomes (
user.define_outcome), budgets, creatingself_hostedenvironments, and theworkqueue endpoints. github_repositorysession resources.- Agent history: retrieving or starting a session on an older agent version.
- Image and document content blocks in
user.message;system.message. - On create:
vault_ids,budget; tool, skill and MCP overrides inagent_with_overrides(400 unsupported_session_override). - Agent fields: the
read,write,edit,globandgrepbuilt-in tools (accepted only withenabled: false; the agent works on files throughbash);web_fetch/web_searchoptionsallowed_domains,blocked_domains,max_content_tokens,url_sources,user_location; pinned skill versions andtype: "anthropic"skills;execution_identityother thanservice_account; anymultiagent. - Environment fields:
networking.type: "limited"(BMA cannot enforce an egress allowlist on its sandbox provider);cargo,gemandgopackages. created_at[…]filters on the event list (400).
400 and error.code = "unsupported". Paths outside the served endpoints (for example /v1/deployments) return 404 with a plain {"error": "not found"} body instead of the Anthropic error envelope; the SDKs still raise their not-found error.
Known exceptions
These requests are currently ignored instead of rejected, until they are fixed:expires_in_secondson file upload is ignored when sent after the file part (rejected when sent before it).
Behavior differences
- IDs use BMA prefixes (
aprf_for agents,mpo_for environments,ses_for sessions). - Model ids are BMA model names.
- Tool events: built-in tools that have an official name (
bash,web_fetch,web_search) are reported asagent.tool_useunder that name; a BMA tool without an official counterpart (for examplecreate_machine) keeps its BMA name and itsmachine_idargument. MCP calls areagent.mcp_tool_useand custom tool calls areagent.custom_tool_use, as in the official API. - Errors in a session:
session.erroruses the official error types; a failure with no official type isunknown_error, anderror.codecarries the BMA detail (for examplecontext_too_large). A turn that ends in an error ends withsession.status_idlestop_reason: {"type": "retries_exhausted"}. - Session list: one project-wide sequence of pages, newest first by default (
order=ascreverses it); each agent’s internal default session never appears and archived sessions appear only withinclude_archived=true. Thestatuses,created_atandagent_versionfilters act on the fetched page, so a page can be short whilenext_pageis still set. - Event ids: a streaming preview has a different id from the final
agent.message, and theuser.messageid in the send response differs from the id in the stream and history. Useagent_input_idandbma_sequenceto correlate. - Usage is counted per BMA agent, so every session of the same agent reports the agent total.
- Agents: archive keeps the agent: a later retrieve returns it with
archived_at, lists exclude it unlessinclude_archived=true, and it rejects updates and new sessions. Changing onlydescriptionormetadatadoes not create a new version. Permission policyautobecomesalways_ask. - Environments: the stored config is limited to 512 bytes.
- Sessions: delete archives instead of deleting (retrieve still returns the session with status
terminated). Machines start on the first tool call that needs one, not at session create, so chat-only sessions never hold a machine. Statusreschedulingmeans work is queued while the machine is provisioned, resumed or restored. - Session lifecycle events:
session.status_rescheduled,session.status_terminated,session.deleted,session.usage, span events andagent.thread_context_compactedare not emitted. - Memory stores: the store
nameis stored as a slug and storemetadatais not kept; a memory id changes when its path changes; the returnedmount_pathis where the store is mounted on machines that can mount (/mnt/memory/<store>). - SSE: after the opening
: okcomment the stream sends apingevent whenever it has been silent for 15 seconds. - HTTP: responses carry a
request-idheader and errors arequest_id; error bodies adderror.code; no rate-limit orretry-afterheaders; an oversized body (over 8 MiB) is400, not413; an unknown route or wrong method is404, never405. - Sessions without a
titleget one generated after the first turn (session.updated).
How BMA maps the objects
Authentication and headers
Agents
descriptionandmetadataare stored (16 keys, key ≤ 64, value ≤ 512 characters).systemis optional;tools: []clears the toolset.- Built-in tools:
bashmaps to BMA’srun_command;web_fetchandweb_searchmap to BMA’s web tools. - Permission policies:
always_allowandalways_askmap directly;autobecomesalways_ask. - Skills:
{type: "custom", skill_id, version}withversionomitted or"latest"; BMA always runs the latest revision. - MCP: URL servers. BMA adds
mcp_servers[].bma_auth(bearer,oauth,sigv4) that references a project secret.
Sessions and events
- Stream start: a stream opened without
Last-Event-IDdelivers events emitted after it opens, like Anthropic. If you send first and subscribe second while a turn is running, the stream starts just before that turn’s input so you still get the whole turn. - Resume: durable events carry
bma_sequence(BMA extension). Resume history fromnext_pageand the stream withLast-Event-ID: <bma_sequence>or the opaqueidof the last durable frame.Last-Event-ID: 0replays the whole session. user.interruptstops only that session’s turn; the nextuser.messagecontinues the conversation.- See Machines for when machines start, pause and resume.
BMA extensions
All optional. A client that only implements the Anthropic contract can ignore them.
Call them with the generic request methods of the official SDKs; the schemas are in the API reference.