SPB Git

Repository Public

events.md 435.0 KB 15,176 lines markdown

1---2title: Events3url: https://platform.claude.com/docs/en/api/beta/sessions/events4---56# Events78## List Events910**GET** `/v1/sessions/{session_id}/events`1112List Events1314### Path parameters1516- `session_id: string`1718### Query parameters1920- `"created_at[gt]": optional string`2122  Return events created after this time (exclusive). Compared against the event's `processed_at` value.2324  format: date-time2526- `"created_at[gte]": optional string`2728  Return events created at or after this time (inclusive). Compared against the event's `processed_at` value.2930  format: date-time3132- `"created_at[lt]": optional string`3334  Return events created before this time (exclusive). Compared against the event's `processed_at` value.3536  format: date-time3738- `"created_at[lte]": optional string`3940  Return events created at or before this time (inclusive). Compared against the event's `processed_at` value.4142  format: date-time4344- `limit: optional number`4546  Query parameter for limit4748  format: int324950- `order: optional "asc" or "desc"`5152  Sort direction for results, ordered by the event's `processed_at`. Defaults to `asc` (chronological).5354  - `"asc"`5556  - `"desc"`5758- `page: optional string`5960  Opaque pagination cursor from a previous response's `next_page`.6162- `types: optional array of string`6364  Filter by event type. Values match the `type` field on returned events (for example, `user.message` or `agent.tool_use`). Omit to return all event types.6566### Headers6768- `"anthropic-beta": optional array of AnthropicBeta`6970  Optional header to specify the beta version(s) you want to use.7172  - `string`7374  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`7576    - `"message-batches-2024-09-24"`7778    - `"prompt-caching-2024-07-31"`7980    - `"computer-use-2024-10-22"`8182    - `"computer-use-2025-01-24"`8384    - `"pdfs-2024-09-25"`8586    - `"token-counting-2024-11-01"`8788    - `"token-efficient-tools-2025-02-19"`8990    - `"output-128k-2025-02-19"`9192    - `"files-api-2025-04-14"`9394    - `"mcp-client-2025-04-04"`9596    - `"mcp-client-2025-11-20"`9798    - `"dev-full-thinking-2025-05-14"`99100    - `"interleaved-thinking-2025-05-14"`101102    - `"code-execution-2025-05-22"`103104    - `"extended-cache-ttl-2025-04-11"`105106    - `"context-1m-2025-08-07"`107108    - `"context-management-2025-06-27"`109110    - `"model-context-window-exceeded-2025-08-26"`111112    - `"skills-2025-10-02"`113114    - `"fast-mode-2026-02-01"`115116    - `"output-300k-2026-03-24"`117118    - `"user-profiles-2026-03-24"`119120    - `"user-profiles-2026-08-18"`121122    - `"user-profiles-2026-09-04"`123124    - `"advisor-tool-2026-03-01"`125126    - `"managed-agents-2026-04-01"`127128    - `"cache-diagnosis-2026-04-07"`129130    - `"dreaming-2026-04-21"`131132    - `"thinking-token-count-2026-05-13"`133134    - `"server-side-fallback-2026-06-01"`135136    - `"server-side-fallback-2026-07-01"`137138    - `"fallback-credit-2026-06-01"`139140    - `"fallback-credit-2026-07-01"`141142    - `"agent-memory-2026-07-22"`143144    - `"mid-conversation-tool-changes-2026-07-01"`145146    - `"compact-2026-01-12"`147148    - `"computer-use-2025-11-24"`149150    - `"mcp-tunnels-2026-06-22"`151152    - `"structured-outputs-2025-11-13"`153154    - `"task-budgets-2026-03-13"`155156    - `"thinking-display-updates-2026-08-18"`157158    - `"ce-user-management-2026-07-13"`159160    - `"mid-conversation-output-config-2026-07-01"`161162    - `"thinking-binding-controls-2026-08-01"`163164    - `"mid-conversation-system-clear-at-2026-08-21"`165166    - `"compact-2026-09-04"`167168- `"anthropic-workspace-id": optional string`169170### Returns171172- `data: optional array of BetaManagedAgentsSessionEvent`173174  Events for the session, ordered by `processed_at`.175176  - `BetaManagedAgentsUserMessageEvent object`177178    A user message event in the session conversation.179180    - `type: "user.message"`181182    - `id: string`183184      Unique identifier for this event.185186    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`187188      Array of content blocks comprising the user message.189190      - `BetaManagedAgentsTextBlock object`191192        Regular text content.193194        - `type: "text"`195196        - `text: string`197198          The text content.199200          minLength: 1201202      - `BetaManagedAgentsImageBlock object`203204        Image content specified directly as base64 data or as a reference via a URL.205206        - `type: "image"`207208        - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`209210          Union type for image source variants.211212          - `BetaManagedAgentsBase64ImageSource object`213214            Base64-encoded image data.215216            - `type: "base64"`217218            - `data: string`219220              Base64-encoded image data.221222              minLength: 1223224            - `media_type: string`225226              MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").227228              minLength: 1229230          - `BetaManagedAgentsURLImageSource object`231232            Image referenced by URL.233234            - `type: "url"`235236            - `url: string`237238              URL of the image to fetch.239240              minLength: 1241242          - `BetaManagedAgentsFileImageSource object`243244            Image referenced by file ID.245246            - `type: "file"`247248            - `file_id: string`249250              ID of a previously uploaded file.251252              minLength: 1253254      - `BetaManagedAgentsDocumentBlock object`255256        Document content, either specified directly as base64 data, as text, or as a reference via a URL.257258        - `type: "document"`259260        - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`261262          Union type for document source variants.263264          - `BetaManagedAgentsBase64DocumentSource object`265266            Base64-encoded document data.267268            - `type: "base64"`269270            - `data: string`271272              Base64-encoded document data.273274              minLength: 1275276            - `media_type: string`277278              MIME type of the document (e.g., "application/pdf").279280              minLength: 1281282          - `BetaManagedAgentsPlainTextDocumentSource object`283284            Plain text document content.285286            - `type: "text"`287288            - `data: string`289290              The plain text content.291292              minLength: 1293294            - `media_type: "text/plain"`295296              MIME type of the text content. Must be "text/plain".297298          - `BetaManagedAgentsURLDocumentSource object`299300            Document referenced by URL.301302            - `type: "url"`303304            - `url: string`305306              URL of the document to fetch.307308              minLength: 1309310          - `BetaManagedAgentsFileDocumentSource object`311312            Document referenced by file ID.313314            - `type: "file"`315316            - `file_id: string`317318              ID of a previously uploaded file.319320              minLength: 1321322        - `context: optional string or null`323324          Additional context about the document for the model.325326        - `title: optional string or null`327328          The title of the document.329330      - `BetaManagedAgentsRedactedBlock object`331332        Placeholder for content withheld by Anthropic model policy.333334        - `type: "redacted"`335336    - `processed_at: optional string or null`337338      A timestamp in RFC 3339 format339340      format: date-time341342  - `BetaManagedAgentsUserInterruptEvent object`343344    An interrupt event that pauses agent execution and returns control to the user.345346    - `type: "user.interrupt"`347348    - `id: string`349350      Unique identifier for this event.351352    - `processed_at: optional string or null`353354      A timestamp in RFC 3339 format355356      format: date-time357358    - `session_thread_id: optional string or null`359360      If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread.361362  - `BetaManagedAgentsUserToolConfirmationEvent object`363364    A tool confirmation event that approves or denies a pending tool execution.365366    - `type: "user.tool_confirmation"`367368    - `id: string`369370      Unique identifier for this event.371372    - `result: "allow" or "deny"`373374      UserToolConfirmationResult enum375376      - `"allow"`377378      - `"deny"`379380    - `tool_use_id: string`381382      The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.383384    - `deny_message: optional string or null`385386      Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.387388      maxLength: 10000389390    - `processed_at: optional string or null`391392      A timestamp in RFC 3339 format393394      format: date-time395396    - `session_thread_id: optional string or null`397398      Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread.399400  - `BetaManagedAgentsUserCustomToolResultEvent object`401402    Event sent by the client providing the result of a custom tool execution.403404    - `type: "user.custom_tool_result"`405406    - `id: string`407408      Unique identifier for this event.409410    - `custom_tool_use_id: string`411412      The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.413414    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`415416      The result content returned by the tool.417418      - `BetaManagedAgentsTextBlock object`419420        Regular text content.421422      - `BetaManagedAgentsImageBlock object`423424        Image content specified directly as base64 data or as a reference via a URL.425426      - `BetaManagedAgentsDocumentBlock object`427428        Document content, either specified directly as base64 data, as text, or as a reference via a URL.429430      - `BetaManagedAgentsSearchResultBlock object`431432        A block containing a web search result.433434        - `type: "search_result"`435436        - `citations: BetaManagedAgentsSearchResultCitations`437438          Citation settings for a search result.439440          - `enabled: boolean`441442            Whether citations are enabled for this search result.443444        - `content: array of BetaManagedAgentsSearchResultContent`445446          Array of text content blocks from the search result.447448          - `type: "text"`449450          - `text: string`451452            The text content.453454            minLength: 1455456        - `source: string`457458          The URL source of the search result.459460          minLength: 1461462        - `title: string`463464          The title of the search result.465466          minLength: 1467468    - `is_error: optional boolean or null`469470      Whether the tool execution resulted in an error.471472    - `processed_at: optional string or null`473474      A timestamp in RFC 3339 format475476      format: date-time477478    - `session_thread_id: optional string or null`479480      Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.481482  - `BetaManagedAgentsAgentCustomToolUseEvent object`483484    Event emitted when the agent calls a custom tool. The session goes idle until the client sends a `user.custom_tool_result` event with the result.485486    - `type: "agent.custom_tool_use"`487488    - `id: string`489490      Unique identifier for this event.491492    - `input: map[unknown]`493494      Input parameters for the tool call.495496    - `name: string`497498      Name of the custom tool being called.499500    - `processed_at: string`501502      A timestamp in RFC 3339 format503504      format: date-time505506    - `session_thread_id: optional string or null`507508      When set, this event was cross-posted from a subagent's thread to surface its custom tool use on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.custom_tool_result` by `custom_tool_use_id`, so clients do not send it back.509510  - `BetaManagedAgentsAgentMessageEvent object`511512    An agent response event in the session conversation.513514    - `type: "agent.message"`515516    - `id: string`517518      Unique identifier for this event.519520    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsRedactedBlock`521522      Array of text blocks comprising the agent response.523524      - `BetaManagedAgentsTextBlock object`525526        Regular text content.527528      - `BetaManagedAgentsRedactedBlock object`529530        Placeholder for content withheld by Anthropic model policy.531532    - `processed_at: string`533534      A timestamp in RFC 3339 format535536      format: date-time537538  - `BetaManagedAgentsAgentThinkingEvent object`539540    Indicates the agent is making forward progress via extended thinking. A progress signal, not a content carrier.541542    - `type: "agent.thinking"`543544    - `id: string`545546      Unique identifier for this event.547548    - `processed_at: string`549550      A timestamp in RFC 3339 format551552      format: date-time553554  - `BetaManagedAgentsAgentMCPToolUseEvent object`555556    Event emitted when the agent invokes a tool provided by an MCP server.557558    - `type: "agent.mcp_tool_use"`559560    - `id: string`561562      Unique identifier for this event.563564    - `input: map[unknown]`565566      Input parameters for the tool call.567568    - `mcp_server_name: string`569570      Name of the MCP server providing the tool.571572    - `name: string`573574      Name of the MCP tool being used.575576    - `processed_at: string`577578      A timestamp in RFC 3339 format579580      format: date-time581582    - `evaluated_permission: optional "allow" or "ask" or "deny"`583584      AgentEvaluatedPermission enum585586      - `"allow"`587588      - `"ask"`589590      - `"deny"`591592    - `evaluation: optional BetaManagedAgentsAgentToolEvaluation`593594      Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.595596      - `BetaManagedAgentsAgentToolEvaluationAlwaysAllow object`597598        The resolved permission_policy was always_allow; accompanies evaluated_permission "allow".599600        - `type: "always_allow"`601602      - `BetaManagedAgentsAgentToolEvaluationAlwaysAsk object`603604        The resolved permission_policy was always_ask; accompanies evaluated_permission "ask".605606        - `type: "always_ask"`607608      - `BetaManagedAgentsAgentToolEvaluationAuto object`609610        The resolved permission_policy was auto: the server judged this invocation individually.611612        - `type: "auto"`613614        - `evaluated_permission: BetaManagedAgentsAgentAutoEvaluatedPermission`615616          The server's per-invocation judgement under the auto permission policy. Its type always equals the event's top-level evaluated_permission. Open union: clients must tolerate unknown variants.617618          - `BetaManagedAgentsAgentAutoEvaluatedPermissionAllow object`619620            The server judged the invocation safe to execute without client approval.621622            - `type: "allow"`623624          - `BetaManagedAgentsAgentAutoEvaluatedPermissionAsk object`625626            The server reached no judgement; the invocation is held for client approval.627628            - `type: "ask"`629630            - `reason_code: string`631632              The judgement's grounds in registry-bound terms, for client branching and audit rather than end-user display. Open registry; currently "indeterminate" (no judgement was reached). Clients must tolerate values outside this set.633634              maxLength: 64635636          - `BetaManagedAgentsAgentAutoEvaluatedPermissionDeny object`637638            The server judged the invocation high-risk; it does not execute and a synthetic error tool result is appended.639640            - `type: "deny"`641642            - `reason_code: string`643644              The judgement's grounds in registry-bound terms. Open registry; currently "high_risk" (judged high-risk; the call does not run). Clients must tolerate values outside this set.645646              maxLength: 64647648    - `session_thread_id: optional string or null`649650      When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` by `tool_use_id`, so clients do not send it back.651652  - `BetaManagedAgentsAgentMCPToolResultEvent object`653654    Event representing the result of an MCP tool execution.655656    - `type: "agent.mcp_tool_result"`657658    - `id: string`659660      Unique identifier for this event.661662    - `mcp_tool_use_id: string`663664      The id of the `agent.mcp_tool_use` event this result corresponds to.665666    - `processed_at: string`667668      A timestamp in RFC 3339 format669670      format: date-time671672    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`673674      The result content returned by the tool.675676      - `BetaManagedAgentsTextBlock object`677678        Regular text content.679680      - `BetaManagedAgentsImageBlock object`681682        Image content specified directly as base64 data or as a reference via a URL.683684      - `BetaManagedAgentsDocumentBlock object`685686        Document content, either specified directly as base64 data, as text, or as a reference via a URL.687688      - `BetaManagedAgentsSearchResultBlock object`689690        A block containing a web search result.691692    - `is_error: optional boolean or null`693694      Whether the tool execution resulted in an error.695696  - `BetaManagedAgentsAgentToolUseEvent object`697698    Event emitted when the agent invokes a built-in agent tool.699700    - `type: "agent.tool_use"`701702    - `id: string`703704      Unique identifier for this event.705706    - `input: map[unknown]`707708      Input parameters for the tool call.709710    - `name: string`711712      Name of the agent tool being used.713714    - `processed_at: string`715716      A timestamp in RFC 3339 format717718      format: date-time719720    - `evaluated_permission: optional "allow" or "ask" or "deny"`721722      AgentEvaluatedPermission enum723724      - `"allow"`725726      - `"ask"`727728      - `"deny"`729730    - `evaluation: optional BetaManagedAgentsAgentToolEvaluation`731732      Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.733734    - `session_thread_id: optional string or null`735736      When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` or `user.tool_result` by `tool_use_id`, so clients do not send it back.737738  - `BetaManagedAgentsAgentToolResultEvent object`739740    Event representing the result of an agent tool execution.741742    - `type: "agent.tool_result"`743744    - `id: string`745746      Unique identifier for this event.747748    - `processed_at: string`749750      A timestamp in RFC 3339 format751752      format: date-time753754    - `tool_use_id: string`755756      The id of the `agent.tool_use` event this result corresponds to.757758    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`759760      The result content returned by the tool.761762      - `BetaManagedAgentsTextBlock object`763764        Regular text content.765766      - `BetaManagedAgentsImageBlock object`767768        Image content specified directly as base64 data or as a reference via a URL.769770      - `BetaManagedAgentsDocumentBlock object`771772        Document content, either specified directly as base64 data, as text, or as a reference via a URL.773774      - `BetaManagedAgentsSearchResultBlock object`775776        A block containing a web search result.777778    - `is_error: optional boolean or null`779780      Whether the tool execution resulted in an error.781782  - `BetaManagedAgentsAgentThreadMessageReceivedEvent object`783784    Delivery event written to the target thread's input stream when an agent-to-agent message arrives.785786    - `type: "agent.thread_message_received"`787788    - `id: string`789790      Unique identifier for this event.791792    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`793794      Message content blocks.795796      - `BetaManagedAgentsTextBlock object`797798        Regular text content.799800      - `BetaManagedAgentsImageBlock object`801802        Image content specified directly as base64 data or as a reference via a URL.803804      - `BetaManagedAgentsDocumentBlock object`805806        Document content, either specified directly as base64 data, as text, or as a reference via a URL.807808      - `BetaManagedAgentsRedactedBlock object`809810        Placeholder for content withheld by Anthropic model policy.811812    - `from_session_thread_id: string`813814      Public `sthr_` ID of the thread that sent the message.815816    - `processed_at: string`817818      A timestamp in RFC 3339 format819820      format: date-time821822    - `from_agent_name: optional string or null`823824      Name of the callable agent this message came from. Absent when received from the primary agent.825826  - `BetaManagedAgentsAgentThreadMessageSentEvent object`827828    Observability event emitted to the sender's output stream when an agent-to-agent message is sent.829830    - `type: "agent.thread_message_sent"`831832    - `id: string`833834      Unique identifier for this event.835836    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`837838      Message content blocks.839840      - `BetaManagedAgentsTextBlock object`841842        Regular text content.843844      - `BetaManagedAgentsImageBlock object`845846        Image content specified directly as base64 data or as a reference via a URL.847848      - `BetaManagedAgentsDocumentBlock object`849850        Document content, either specified directly as base64 data, as text, or as a reference via a URL.851852      - `BetaManagedAgentsRedactedBlock object`853854        Placeholder for content withheld by Anthropic model policy.855856    - `processed_at: string`857858      A timestamp in RFC 3339 format859860      format: date-time861862    - `to_session_thread_id: string`863864      Public `sthr_` ID of the thread the message was sent to.865866    - `to_agent_name: optional string or null`867868      Name of the callable agent this message was sent to. Absent when sent to the primary agent.869870  - `BetaManagedAgentsAgentThreadContextCompactedEvent object`871872    Indicates that context compaction (summarization) occurred during the session.873874    - `type: "agent.thread_context_compacted"`875876    - `id: string`877878      Unique identifier for this event.879880    - `processed_at: string`881882      A timestamp in RFC 3339 format883884      format: date-time885886  - `BetaManagedAgentsSessionErrorEvent object`887888    An error event indicating a problem occurred during session execution.889890    - `type: "session.error"`891892    - `id: string`893894      Unique identifier for this event.895896    - `error: BetaManagedAgentsUnknownError or BetaManagedAgentsModelOverloadedError or BetaManagedAgentsModelRateLimitedError or 5 more`897898      - `BetaManagedAgentsUnknownError object`899900        An unknown or unexpected error occurred during session execution. A fallback variant; clients that don't recognize a new error code can match on `retry_status` and `message` alone.901902        - `type: "unknown_error"`903904        - `message: string`905906          Human-readable error description.907908        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`909910          What the client should do next in response to this error.911912          - `BetaManagedAgentsRetryStatusRetrying object`913914            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.915916            - `type: "retrying"`917918          - `BetaManagedAgentsRetryStatusExhausted object`919920            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.921922            - `type: "exhausted"`923924          - `BetaManagedAgentsRetryStatusTerminal object`925926            The session encountered a terminal error and will transition to `terminated` state.927928            - `type: "terminal"`929930      - `BetaManagedAgentsModelOverloadedError object`931932        The model is currently overloaded. Emitted after automatic retries are exhausted.933934        - `type: "model_overloaded_error"`935936        - `message: string`937938          Human-readable error description.939940        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`941942          What the client should do next in response to this error.943944          - `BetaManagedAgentsRetryStatusRetrying object`945946            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.947948          - `BetaManagedAgentsRetryStatusExhausted object`949950            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.951952          - `BetaManagedAgentsRetryStatusTerminal object`953954            The session encountered a terminal error and will transition to `terminated` state.955956      - `BetaManagedAgentsModelRateLimitedError object`957958        The model request was rate-limited.959960        - `type: "model_rate_limited_error"`961962        - `message: string`963964          Human-readable error description.965966        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`967968          What the client should do next in response to this error.969970          - `BetaManagedAgentsRetryStatusRetrying object`971972            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.973974          - `BetaManagedAgentsRetryStatusExhausted object`975976            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.977978          - `BetaManagedAgentsRetryStatusTerminal object`979980            The session encountered a terminal error and will transition to `terminated` state.981982      - `BetaManagedAgentsModelRequestFailedError object`983984        A model request failed for a reason other than overload or rate-limiting.985986        - `type: "model_request_failed_error"`987988        - `message: string`989990          Human-readable error description.991992        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`993994          What the client should do next in response to this error.995996          - `BetaManagedAgentsRetryStatusRetrying object`997998            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.9991000          - `BetaManagedAgentsRetryStatusExhausted object`10011002            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.10031004          - `BetaManagedAgentsRetryStatusTerminal object`10051006            The session encountered a terminal error and will transition to `terminated` state.10071008      - `BetaManagedAgentsMCPConnectionFailedError object`10091010        Failed to connect to an MCP server.10111012        - `type: "mcp_connection_failed_error"`10131014        - `mcp_server_name: string`10151016          Name of the MCP server that failed to connect.10171018        - `message: string`10191020          Human-readable error description.10211022        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`10231024          What the client should do next in response to this error.10251026          - `BetaManagedAgentsRetryStatusRetrying object`10271028            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.10291030          - `BetaManagedAgentsRetryStatusExhausted object`10311032            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.10331034          - `BetaManagedAgentsRetryStatusTerminal object`10351036            The session encountered a terminal error and will transition to `terminated` state.10371038      - `BetaManagedAgentsMCPAuthenticationFailedError object`10391040        Authentication to an MCP server failed.10411042        - `type: "mcp_authentication_failed_error"`10431044        - `mcp_server_name: string`10451046          Name of the MCP server that failed authentication.10471048        - `message: string`10491050          Human-readable error description.10511052        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`10531054          What the client should do next in response to this error.10551056          - `BetaManagedAgentsRetryStatusRetrying object`10571058            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.10591060          - `BetaManagedAgentsRetryStatusExhausted object`10611062            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.10631064          - `BetaManagedAgentsRetryStatusTerminal object`10651066            The session encountered a terminal error and will transition to `terminated` state.10671068      - `BetaManagedAgentsBillingError object`10691070        The caller's organization or workspace cannot make model requests — out of credits or spend limit reached. Retrying with the same credentials will not succeed; the caller must resolve the billing state.10711072        - `type: "billing_error"`10731074        - `message: string`10751076          Human-readable error description.10771078        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`10791080          What the client should do next in response to this error.10811082          - `BetaManagedAgentsRetryStatusRetrying object`10831084            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.10851086          - `BetaManagedAgentsRetryStatusExhausted object`10871088            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.10891090          - `BetaManagedAgentsRetryStatusTerminal object`10911092            The session encountered a terminal error and will transition to `terminated` state.10931094      - `BetaManagedAgentsCredentialHostUnreachableError object`10951096        An `environment_variable` credential's `auth.networking.allowed_hosts` includes a host the environment's network policy does not permit.10971098        - `type: "credential_host_unreachable_error"`10991100        - `credential_id: string`11011102          ID of the affected credential.11031104        - `message: string`11051106          Human-readable error description.11071108        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`11091110          What the client should do next in response to this error.11111112          - `BetaManagedAgentsRetryStatusRetrying object`11131114            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.11151116          - `BetaManagedAgentsRetryStatusExhausted object`11171118            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.11191120          - `BetaManagedAgentsRetryStatusTerminal object`11211122            The session encountered a terminal error and will transition to `terminated` state.11231124        - `vault_id: string`11251126          ID of the vault containing the affected credential.11271128    - `processed_at: string`11291130      A timestamp in RFC 3339 format11311132      format: date-time11331134  - `BetaManagedAgentsSessionStatusRescheduledEvent object`11351136    Indicates the session is recovering from an error state and is rescheduled for execution.11371138    - `type: "session.status_rescheduled"`11391140    - `id: string`11411142      Unique identifier for this event.11431144    - `processed_at: string`11451146      A timestamp in RFC 3339 format11471148      format: date-time11491150  - `BetaManagedAgentsSessionStatusRunningEvent object`11511152    Indicates the session is actively running and the agent is working.11531154    - `type: "session.status_running"`11551156    - `id: string`11571158      Unique identifier for this event.11591160    - `processed_at: string`11611162      A timestamp in RFC 3339 format11631164      format: date-time11651166  - `BetaManagedAgentsSessionStatusIdleEvent object`11671168    Indicates the agent has paused and is awaiting user input.11691170    - `type: "session.status_idle"`11711172    - `id: string`11731174      Unique identifier for this event.11751176    - `processed_at: string`11771178      A timestamp in RFC 3339 format11791180      format: date-time11811182    - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or BetaManagedAgentsSessionBudgetReached`11831184      - `BetaManagedAgentsSessionEndTurn object`11851186        The agent completed its turn naturally and is ready for the next user message.11871188        - `type: "end_turn"`11891190      - `BetaManagedAgentsSessionRequiresAction object`11911192        The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.11931194        - `type: "requires_action"`11951196        - `event_ids: array of string`11971198          The ids of events the agent is blocked on. Resolving fewer than all re-emits `session.status_idle` with the remainder.11991200      - `BetaManagedAgentsSessionRetriesExhausted object`12011202        The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`.12031204        - `type: "retries_exhausted"`12051206      - `BetaManagedAgentsSessionBudgetReached object`12071208        The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget.12091210        - `type: "budget_reached"`12111212  - `BetaManagedAgentsSessionStatusTerminatedEvent object`12131214    Indicates the session has terminated, either due to an error or completion.12151216    - `type: "session.status_terminated"`12171218    - `id: string`12191220      Unique identifier for this event.12211222    - `processed_at: string`12231224      A timestamp in RFC 3339 format12251226      format: date-time12271228  - `BetaManagedAgentsSessionThreadCreatedEvent object`12291230    Emitted when a subagent is spawned as a new thread. Written to the parent thread's output stream so clients observing the session see child creation.12311232    - `type: "session.thread_created"`12331234    - `id: string`12351236      Unique identifier for this event.12371238    - `agent_name: string`12391240      Name of the callable agent the thread runs.12411242    - `processed_at: string`12431244      A timestamp in RFC 3339 format12451246      format: date-time12471248    - `session_thread_id: string`12491250      Public `sthr_` ID of the newly created thread.12511252  - `BetaManagedAgentsSpanOutcomeEvaluationStartEvent object`12531254    Emitted when an outcome evaluation cycle begins.12551256    - `type: "span.outcome_evaluation_start"`12571258    - `id: string`12591260      Unique identifier for this event.12611262    - `iteration: number`12631264      0-indexed revision cycle. 0 is the first evaluation; 1 is the re-evaluation after the first revision; etc.12651266      format: int3212671268    - `outcome_id: string`12691270      The `outc_` ID of the outcome being evaluated.12711272    - `processed_at: string`12731274      A timestamp in RFC 3339 format12751276      format: date-time12771278  - `BetaManagedAgentsSpanOutcomeEvaluationEndEvent object`12791280    Emitted when an outcome evaluation cycle completes. Carries the verdict and aggregate token usage. A verdict of `needs_revision` means another evaluation cycle follows; `satisfied`, `max_iterations_reached`, `failed`, or `interrupted` are terminal — no further evaluation cycles follow.12811282    - `type: "span.outcome_evaluation_end"`12831284    - `id: string`12851286      Unique identifier for this event.12871288    - `explanation: string`12891290      Human-readable explanation of the verdict. For `needs_revision`, describes which criteria failed and why.12911292    - `iteration: number`12931294      0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.12951296      format: int3212971298    - `outcome_evaluation_start_id: string`12991300      The id of the corresponding `span.outcome_evaluation_start` event.13011302    - `outcome_id: string`13031304      The `outc_` ID of the outcome being evaluated.13051306    - `processed_at: string`13071308      A timestamp in RFC 3339 format13091310      format: date-time13111312    - `result: string`13131314      Evaluation verdict. 'satisfied': criteria met, session goes idle. 'needs_revision': criteria not met, another revision cycle follows. 'max_iterations_reached': evaluation budget exhausted with criteria still unmet — one final acknowledgment turn follows before the session goes idle, but no further evaluation runs. 'failed': grader determined the rubric does not apply to the deliverables. 'interrupted': user sent an interrupt while evaluation was in progress.13151316    - `usage: BetaManagedAgentsSpanModelUsage`13171318      Token usage for a single model request.13191320      - `cache_creation_input_tokens: number`13211322        Tokens used to create prompt cache in this request.13231324        format: int3213251326      - `cache_read_input_tokens: number`13271328        Tokens read from prompt cache in this request.13291330        format: int3213311332      - `input_tokens: number`13331334        Input tokens consumed by this request.13351336        format: int3213371338      - `output_tokens: number`13391340        Output tokens generated by this request.13411342        format: int3213431344      - `speed: optional "standard" or "fast" or null`13451346        Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.13471348        - `"standard"`13491350        - `"fast"`13511352  - `BetaManagedAgentsSpanModelRequestStartEvent object`13531354    Emitted when a model request is initiated by the agent.13551356    - `type: "span.model_request_start"`13571358    - `id: string`13591360      Unique identifier for this event.13611362    - `processed_at: string`13631364      A timestamp in RFC 3339 format13651366      format: date-time13671368  - `BetaManagedAgentsSpanModelRequestEndEvent object`13691370    Emitted when a model request completes.13711372    - `type: "span.model_request_end"`13731374    - `id: string`13751376      Unique identifier for this event.13771378    - `is_error: boolean or null`13791380      Whether the model request resulted in an error.13811382    - `model_request_start_id: string`13831384      The id of the corresponding `span.model_request_start` event.13851386    - `model_usage: BetaManagedAgentsSpanModelUsage`13871388      Token usage for a single model request.13891390    - `processed_at: string`13911392      A timestamp in RFC 3339 format13931394      format: date-time13951396  - `BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent object`13971398    Periodic heartbeat emitted while an outcome evaluation cycle is in progress. Distinguishes 'evaluation is actively running' from 'evaluation is stuck' between the corresponding `span.outcome_evaluation_start` and `span.outcome_evaluation_end` events.13991400    - `type: "span.outcome_evaluation_ongoing"`14011402    - `id: string`14031404      Unique identifier for this event.14051406    - `iteration: number`14071408      0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.14091410      format: int3214111412    - `outcome_id: string`14131414      The `outc_` ID of the outcome being evaluated.14151416    - `processed_at: string`14171418      A timestamp in RFC 3339 format14191420      format: date-time14211422  - `BetaManagedAgentsUserDefineOutcomeEvent object`14231424    Echo of a `user.define_outcome` input event. Carries the server-generated `outcome_id` that subsequent `span.outcome_evaluation_*` events reference.14251426    - `type: "user.define_outcome"`14271428    - `id: string`14291430      Unique identifier for this event.14311432    - `description: string`14331434      What the agent should produce. Copied from the input event.14351436    - `max_iterations: number or null`14371438      Evaluate-then-revise cycles before giving up. Default 3, max 20.14391440      format: int3214411442    - `outcome_id: string`14431444      Server-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.14451446    - `processed_at: string`14471448      A timestamp in RFC 3339 format14491450      format: date-time14511452    - `rubric: BetaManagedAgentsFileRubric or BetaManagedAgentsTextRubric`14531454      Rubric for grading the quality of an outcome.14551456      - `BetaManagedAgentsFileRubric object`14571458        Rubric referenced by a file uploaded via the Files API.14591460        - `type: "file"`14611462        - `file_id: string`14631464          ID of the rubric file.14651466      - `BetaManagedAgentsTextRubric object`14671468        Rubric content provided inline as text.14691470        - `type: "text"`14711472        - `content: string`14731474          Rubric content. Plain text or markdown — the grader treats it as freeform text.14751476  - `BetaManagedAgentsSessionDeletedEvent object`14771478    Emitted when a session has been deleted. Terminates any active event stream — no further events will be emitted for this session.14791480    - `type: "session.deleted"`14811482    - `id: string`14831484      Unique identifier for this event.14851486    - `processed_at: string`14871488      A timestamp in RFC 3339 format14891490      format: date-time14911492  - `BetaManagedAgentsSessionThreadStatusRunningEvent object`14931494    A session thread has begun executing. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.14951496    - `type: "session.thread_status_running"`14971498    - `id: string`14991500      Unique identifier for this event.15011502    - `agent_name: string`15031504      Name of the agent the thread runs.15051506    - `processed_at: string`15071508      A timestamp in RFC 3339 format15091510      format: date-time15111512    - `session_thread_id: string`15131514      Public sthr_ ID of the thread that started running.15151516  - `BetaManagedAgentsSessionThreadStatusIdleEvent object`15171518    A session thread has yielded and is awaiting input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.15191520    - `type: "session.thread_status_idle"`15211522    - `id: string`15231524      Unique identifier for this event.15251526    - `agent_name: string`15271528      Name of the agent the thread runs.15291530    - `processed_at: string`15311532      A timestamp in RFC 3339 format15331534      format: date-time15351536    - `session_thread_id: string`15371538      Public sthr_ ID of the thread that went idle.15391540    - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or BetaManagedAgentsSessionBudgetReached`15411542      - `BetaManagedAgentsSessionEndTurn object`15431544        The agent completed its turn naturally and is ready for the next user message.15451546      - `BetaManagedAgentsSessionRequiresAction object`15471548        The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.15491550      - `BetaManagedAgentsSessionRetriesExhausted object`15511552        The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`.15531554      - `BetaManagedAgentsSessionBudgetReached object`15551556        The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget.15571558  - `BetaManagedAgentsSessionThreadStatusTerminatedEvent object`15591560    A session thread has terminated and will accept no further input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.15611562    - `type: "session.thread_status_terminated"`15631564    - `id: string`15651566      Unique identifier for this event.15671568    - `agent_name: string`15691570      Name of the agent the thread runs.15711572    - `processed_at: string`15731574      A timestamp in RFC 3339 format15751576      format: date-time15771578    - `session_thread_id: string`15791580      Public sthr_ ID of the thread that terminated.15811582  - `BetaManagedAgentsUserToolResultEvent object`15831584    Event sent by the client providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.15851586    - `type: "user.tool_result"`15871588    - `id: string`15891590      Unique identifier for this event.15911592    - `tool_use_id: string`15931594      The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.15951596    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`15971598      The result content returned by the tool.15991600      - `BetaManagedAgentsTextBlock object`16011602        Regular text content.16031604      - `BetaManagedAgentsImageBlock object`16051606        Image content specified directly as base64 data or as a reference via a URL.16071608      - `BetaManagedAgentsDocumentBlock object`16091610        Document content, either specified directly as base64 data, as text, or as a reference via a URL.16111612      - `BetaManagedAgentsSearchResultBlock object`16131614        A block containing a web search result.16151616    - `is_error: optional boolean or null`16171618      Whether the tool execution resulted in an error.16191620    - `processed_at: optional string or null`16211622      A timestamp in RFC 3339 format16231624      format: date-time16251626    - `session_thread_id: optional string or null`16271628      Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.16291630  - `BetaManagedAgentsSessionThreadStatusRescheduledEvent object`16311632    A session thread hit a transient error and is retrying automatically. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.16331634    - `type: "session.thread_status_rescheduled"`16351636    - `id: string`16371638      Unique identifier for this event.16391640    - `agent_name: string`16411642      Name of the agent the thread runs.16431644    - `processed_at: string`16451646      A timestamp in RFC 3339 format16471648      format: date-time16491650    - `session_thread_id: string`16511652      Public sthr_ ID of the thread that is retrying.16531654  - `BetaManagedAgentsSessionUpdatedEvent object`16551656    Emitted when an UpdateSession request changed at least one field. Carries only the fields that changed; absent fields were not part of the update. The new configuration applies from the next turn.16571658    - `type: "session.updated"`16591660    - `id: string`16611662      Unique identifier for this event.16631664    - `processed_at: string`16651666      A timestamp in RFC 3339 format16671668      format: date-time16691670    - `agent: optional BetaManagedAgentsSessionAgent or null`16711672      Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.16731674      - `type: "agent"`16751676      - `id: string`16771678      - `description: string or null`16791680      - `mcp_servers: array of BetaManagedAgentsMCPServerURLDefinition`16811682        - `type: "url"`16831684        - `name: string`16851686        - `url: string`16871688      - `model: BetaManagedAgentsModelConfig`16891690        Model identifier and configuration.16911692        - `id: BetaManagedAgentsModel`16931694          The model that will power your agent.16951696          See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.16971698          - `"claude-fable-5-1" or "claude-sonnet-5" or "claude-fable-5" or 11 more`16991700            The model that will power your agent.17011702            See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.17031704            - `"claude-fable-5-1"`17051706              Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows17071708            - `"claude-sonnet-5"`17091710              High-performance model for coding and agents17111712            - `"claude-fable-5"`17131714              Next generation of intelligence for the hardest knowledge work and coding problems17151716            - `"claude-opus-5"`17171718              Powerful intelligence for long-running agents and coding17191720            - `"claude-opus-4-8"`17211722              Powerful intelligence for long-running agents and coding17231724            - `"claude-opus-4-7"`17251726              Powerful intelligence for long-running agents and coding17271728            - `"claude-opus-4-6"`17291730              Powerful intelligence for long-running agents and coding17311732            - `"claude-sonnet-4-6"`17331734              Best combination of speed and intelligence17351736            - `"claude-haiku-4-5"`17371738              Fastest model with near-frontier intelligence17391740            - `"claude-haiku-4-5-20251001"`17411742              Fastest model with near-frontier intelligence17431744            - `"claude-opus-4-5"`17451746              Powerful intelligence for long-running agents and coding17471748            - `"claude-opus-4-5-20251101"`17491750              Powerful intelligence for long-running agents and coding17511752            - `"claude-sonnet-4-5"`17531754              High-performance model for agents and coding17551756            - `"claude-sonnet-4-5-20250929"`17571758              High-performance model for agents and coding17591760          - `string`17611762        - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more`17631764          How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.17651766          - `BetaManagedAgentsEffortLow object`17671768            Low effort. Favors latency over reasoning depth.17691770            - `type: "low"`17711772          - `BetaManagedAgentsEffortMedium object`17731774            Medium effort. Balances latency and reasoning depth.17751776            - `type: "medium"`17771778          - `BetaManagedAgentsEffortHigh object`17791780            High effort. Favors reasoning depth.17811782            - `type: "high"`17831784          - `BetaManagedAgentsEffortXhigh object`17851786            Extra-high effort. Not all models accept this level.17871788            - `type: "xhigh"`17891790          - `BetaManagedAgentsEffortMax object`17911792            Maximum effort. Favors reasoning depth over latency.17931794            - `type: "max"`17951796        - `inference_geo: optional string`17971798          Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.17991800        - `speed: optional "standard" or "fast"`18011802          Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.18031804          - `"standard"`18051806          - `"fast"`18071808      - `multiagent: BetaManagedAgentsSessionMultiagentCoordinator or null`18091810        Resolved coordinator topology with full agent definitions for each roster member.18111812        - `type: "coordinator"`18131814        - `agents: array of BetaManagedAgentsSessionThreadAgent or BetaManagedAgentsAdvisor`18151816          Full `agent` definitions the coordinator may spawn as session threads.18171818          - `BetaManagedAgentsSessionThreadAgent object`18191820            Resolved `agent` definition for a single `session_thread`. Snapshot of the agent at thread creation time. The multiagent roster is not repeated here; read it from `Session.agent`.18211822            - `type: "agent"`18231824            - `id: string`18251826            - `description: string or null`18271828            - `mcp_servers: array of BetaManagedAgentsMCPServerURLDefinition`18291830              - `type: "url"`18311832              - `name: string`18331834              - `url: string`18351836            - `model: BetaManagedAgentsModelConfig`18371838              Model identifier and configuration.18391840            - `name: string`18411842            - `skills: array of BetaManagedAgentsAnthropicSkill or BetaManagedAgentsCustomSkill`18431844              - `BetaManagedAgentsAnthropicSkill object`18451846                A resolved Anthropic-managed skill.18471848                - `type: "anthropic"`18491850                - `skill_id: string`18511852                - `version: string`18531854              - `BetaManagedAgentsCustomSkill object`18551856                A resolved user-created custom skill.18571858                - `type: "custom"`18591860                - `skill_id: string`18611862                - `version: string`18631864            - `system: string or null`18651866            - `tools: array of BetaManagedAgentsAgentToolset20260401 or BetaManagedAgentsMCPToolset or BetaManagedAgentsCustomTool`18671868              - `BetaManagedAgentsAgentToolset20260401 object`18691870                - `type: "agent_toolset_20260401"`18711872                - `configs: array of BetaManagedAgentsAgentToolConfig`18731874                  - `BetaManagedAgentsBashToolConfig object`18751876                    Configuration for the bash tool.18771878                    - `type: "bash"`18791880                    - `enabled: boolean`18811882                    - `name: "bash"`18831884                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`18851886                      Permission policy for tool execution.18871888                      - `BetaManagedAgentsAlwaysAllowPolicy object`18891890                        Tool calls are automatically approved without user confirmation.18911892                        - `type: "always_allow"`18931894                      - `BetaManagedAgentsAlwaysAskPolicy object`18951896                        Tool calls require user confirmation before execution.18971898                        - `type: "always_ask"`18991900                      - `BetaManagedAgentsAutoPolicy object`19011902                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.19031904                        - `type: "auto"`19051906                  - `BetaManagedAgentsEditToolConfig object`19071908                    Configuration for the edit tool.19091910                    - `type: "edit"`19111912                    - `enabled: boolean`19131914                    - `name: "edit"`19151916                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`19171918                      Permission policy for tool execution.19191920                      - `BetaManagedAgentsAlwaysAllowPolicy object`19211922                        Tool calls are automatically approved without user confirmation.19231924                      - `BetaManagedAgentsAlwaysAskPolicy object`19251926                        Tool calls require user confirmation before execution.19271928                      - `BetaManagedAgentsAutoPolicy object`19291930                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.19311932                  - `BetaManagedAgentsReadToolConfig object`19331934                    Configuration for the read tool.19351936                    - `type: "read"`19371938                    - `enabled: boolean`19391940                    - `name: "read"`19411942                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`19431944                      Permission policy for tool execution.19451946                      - `BetaManagedAgentsAlwaysAllowPolicy object`19471948                        Tool calls are automatically approved without user confirmation.19491950                      - `BetaManagedAgentsAlwaysAskPolicy object`19511952                        Tool calls require user confirmation before execution.19531954                      - `BetaManagedAgentsAutoPolicy object`19551956                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.19571958                  - `BetaManagedAgentsWriteToolConfig object`19591960                    Configuration for the write tool.19611962                    - `type: "write"`19631964                    - `enabled: boolean`19651966                    - `name: "write"`19671968                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`19691970                      Permission policy for tool execution.19711972                      - `BetaManagedAgentsAlwaysAllowPolicy object`19731974                        Tool calls are automatically approved without user confirmation.19751976                      - `BetaManagedAgentsAlwaysAskPolicy object`19771978                        Tool calls require user confirmation before execution.19791980                      - `BetaManagedAgentsAutoPolicy object`19811982                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.19831984                  - `BetaManagedAgentsGlobToolConfig object`19851986                    Configuration for the glob tool.19871988                    - `type: "glob"`19891990                    - `enabled: boolean`19911992                    - `name: "glob"`19931994                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`19951996                      Permission policy for tool execution.19971998                      - `BetaManagedAgentsAlwaysAllowPolicy object`19992000                        Tool calls are automatically approved without user confirmation.20012002                      - `BetaManagedAgentsAlwaysAskPolicy object`20032004                        Tool calls require user confirmation before execution.20052006                      - `BetaManagedAgentsAutoPolicy object`20072008                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.20092010                  - `BetaManagedAgentsGrepToolConfig object`20112012                    Configuration for the grep tool.20132014                    - `type: "grep"`20152016                    - `enabled: boolean`20172018                    - `name: "grep"`20192020                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`20212022                      Permission policy for tool execution.20232024                      - `BetaManagedAgentsAlwaysAllowPolicy object`20252026                        Tool calls are automatically approved without user confirmation.20272028                      - `BetaManagedAgentsAlwaysAskPolicy object`20292030                        Tool calls require user confirmation before execution.20312032                      - `BetaManagedAgentsAutoPolicy object`20332034                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.20352036                  - `BetaManagedAgentsWebFetchToolConfig object`20372038                    Configuration for the web_fetch tool.20392040                    - `type: "web_fetch"`20412042                    - `enabled: boolean`20432044                    - `name: "web_fetch"`20452046                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`20472048                      Permission policy for tool execution.20492050                      - `BetaManagedAgentsAlwaysAllowPolicy object`20512052                        Tool calls are automatically approved without user confirmation.20532054                      - `BetaManagedAgentsAlwaysAskPolicy object`20552056                        Tool calls require user confirmation before execution.20572058                      - `BetaManagedAgentsAutoPolicy object`20592060                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.20612062                    - `allowed_domains: optional array of string`20632064                    - `blocked_domains: optional array of string`20652066                    - `max_content_tokens: optional number or null`20672068                      format: int3220692070                  - `BetaManagedAgentsWebSearchToolConfig object`20712072                    Configuration for the web_search tool.20732074                    - `type: "web_search"`20752076                    - `enabled: boolean`20772078                    - `name: "web_search"`20792080                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`20812082                      Permission policy for tool execution.20832084                      - `BetaManagedAgentsAlwaysAllowPolicy object`20852086                        Tool calls are automatically approved without user confirmation.20872088                      - `BetaManagedAgentsAlwaysAskPolicy object`20892090                        Tool calls require user confirmation before execution.20912092                      - `BetaManagedAgentsAutoPolicy object`20932094                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.20952096                    - `allowed_domains: optional array of string`20972098                    - `blocked_domains: optional array of string`20992100                    - `user_location: optional BetaManagedAgentsUserLocation or null`21012102                      Approximate user location for search result localization.21032104                      - `type: "approximate"`21052106                        Location precision. Only "approximate" is supported.21072108                      - `city: optional string or null`21092110                        City name.21112112                        minLength: 1, maxLength: 25521132114                      - `country: optional string or null`21152116                        Two-letter ISO 3166-1 country code, uppercase.21172118                      - `region: optional string or null`21192120                        Region or state name.21212122                        minLength: 1, maxLength: 25521232124                      - `timezone: optional string or null`21252126                        IANA timezone identifier, e.g. "America/Los_Angeles".21272128                        minLength: 1, maxLength: 25521292130                - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`21312132                  Resolved default configuration for agent tools.21332134                  - `enabled: boolean`21352136                  - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`21372138                    Permission policy for tool execution.21392140                    - `BetaManagedAgentsAlwaysAllowPolicy object`21412142                      Tool calls are automatically approved without user confirmation.21432144                    - `BetaManagedAgentsAlwaysAskPolicy object`21452146                      Tool calls require user confirmation before execution.21472148                    - `BetaManagedAgentsAutoPolicy object`21492150                      The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.21512152              - `BetaManagedAgentsMCPToolset object`21532154                - `type: "mcp_toolset"`21552156                - `configs: array of BetaManagedAgentsMCPToolConfig`21572158                  - `enabled: boolean`21592160                  - `name: string`21612162                  - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`21632164                    Permission policy for tool execution.21652166                    - `BetaManagedAgentsAlwaysAllowPolicy object`21672168                      Tool calls are automatically approved without user confirmation.21692170                    - `BetaManagedAgentsAlwaysAskPolicy object`21712172                      Tool calls require user confirmation before execution.21732174                    - `BetaManagedAgentsAutoPolicy object`21752176                      The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.21772178                - `default_config: BetaManagedAgentsMCPToolsetDefaultConfig`21792180                  Resolved default configuration for all tools from an MCP server.21812182                  - `enabled: boolean`21832184                  - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`21852186                    Permission policy for tool execution.21872188                    - `BetaManagedAgentsAlwaysAllowPolicy object`21892190                      Tool calls are automatically approved without user confirmation.21912192                    - `BetaManagedAgentsAlwaysAskPolicy object`21932194                      Tool calls require user confirmation before execution.21952196                    - `BetaManagedAgentsAutoPolicy object`21972198                      The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.21992200                - `mcp_server_name: string`22012202              - `BetaManagedAgentsCustomTool object`22032204                A custom tool as returned in API responses.22052206                - `type: "custom"`22072208                - `description: string`22092210                - `input_schema: BetaManagedAgentsCustomToolInputSchema`22112212                  JSON Schema for custom tool input parameters.22132214                  - `type: "object"`22152216                  - `properties: optional map[unknown] or null`22172218                  - `required: optional array of string or null`22192220                - `name: string`22212222            - `version: number`22232224              format: int3222252226          - `BetaManagedAgentsAdvisor object`22272228            Platform advisor roster entry: a model the session's primary thread may consult mid-turn.22292230            - `type: "advisor"`22312232            - `model: string`22332234              The advisor model id.22352236      - `name: string`22372238      - `skills: array of BetaManagedAgentsAnthropicSkill or BetaManagedAgentsCustomSkill`22392240        - `BetaManagedAgentsAnthropicSkill object`22412242          A resolved Anthropic-managed skill.22432244        - `BetaManagedAgentsCustomSkill object`22452246          A resolved user-created custom skill.22472248      - `system: string or null`22492250      - `tools: array of BetaManagedAgentsAgentToolset20260401 or BetaManagedAgentsMCPToolset or BetaManagedAgentsCustomTool`22512252        - `BetaManagedAgentsAgentToolset20260401 object`22532254        - `BetaManagedAgentsMCPToolset object`22552256        - `BetaManagedAgentsCustomTool object`22572258          A custom tool as returned in API responses.22592260      - `version: number`22612262        format: int3222632264    - `budget: optional BetaManagedAgentsBudgetLimit or null`22652266      A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.22672268      - `type: "limit"`22692270      - `max_list_cost: BetaMonetaryAmount`22712272        A monetary amount in a specific currency.22732274        - `amount: string`22752276          Amount in minor units of the currency, as an integer decimal string with no leading zeros: "2500" is $25.00 and "50" is fifty cents. A string rather than a number so no float rounding is ever applied.22772278        - `currency: BetaCurrency`22792280          Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced.22812282    - `metadata: optional map[string]`22832284      The session's full metadata bag after the update. Present when the update set non-empty metadata; absent when metadata was unchanged or cleared to empty.22852286    - `title: optional string or null`22872288      The session's new title. Present only when the update changed it.22892290  - `BetaManagedAgentsSystemMessageEvent object`22912292    A mid-conversation system message event. Carries system-role content that is appended to the session as a `role: "system"` turn.22932294    - `type: "system.message"`22952296    - `id: string`22972298      Unique identifier for this event.22992300    - `content: array of BetaManagedAgentsSystemContentBlock`23012302      System content blocks. Text-only.23032304      - `type: "text"`23052306      - `text: string`23072308        The text content.23092310        minLength: 123112312    - `processed_at: optional string or null`23132314      A timestamp in RFC 3339 format23152316      format: date-time23172318  - `BetaManagedAgentsSessionUsageEvent object`23192320    Periodic snapshot of the session's cumulative usage and tracked list cost.23212322    - `type: "session.usage"`23232324    - `id: string`23252326      Unique identifier for this event.23272328    - `processed_at: string`23292330      A timestamp in RFC 3339 format23312332      format: date-time23332334    - `usage: BetaManagedAgentsSessionUsageSnapshot`23352336      Point-in-time snapshot of a session's cumulative usage.23372338      - `active_seconds: optional number`23392340        Cumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once. This is the duration the session's runtime cost is priced on.23412342        format: double23432344      - `cache_creation: optional BetaManagedAgentsCacheCreationUsage`23452346        Prompt-cache creation token usage broken down by cache lifetime.23472348        - `ephemeral_1h_input_tokens: optional number`23492350          Tokens used to create 1-hour ephemeral cache entries.23512352          format: int3223532354        - `ephemeral_5m_input_tokens: optional number`23552356          Tokens used to create 5-minute ephemeral cache entries.23572358          format: int3223592360      - `cache_read_input_tokens: optional number`23612362        Total tokens read from prompt cache.23632364        format: int3223652366      - `input_tokens: optional number`23672368        Total input tokens consumed across all turns.23692370        format: int3223712372      - `list_cost: optional BetaMonetaryAmount`23732374        A monetary amount in a specific currency.23752376      - `output_tokens: optional number`23772378        Total output tokens generated across all turns.23792380        format: int3223812382      - `server_tool_use: optional BetaManagedAgentsServerToolUsage`23832384        Cumulative count of server-executed tool invocations, broken down by tool.23852386        - `web_fetch_requests: optional number`23872388          Number of server-executed web fetch requests.23892390          format: int3223912392        - `web_search_requests: optional number`23932394          Number of server-executed web search requests.23952396          format: int3223972398    - `budget: optional BetaManagedAgentsBudgetLimit or null`23992400      A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.24012402- `next_page: optional string or null`24032404  Opaque cursor for the next page. Null when no more results.24052406### Example24072408```bash2409curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events \2410    -H 'anthropic-version: 2023-06-01' \2411    -H 'anthropic-beta: managed-agents-2026-04-01' \2412    -H "X-Api-Key: $ANTHROPIC_API_KEY"2413```24142415#### Response (200)24162417```json2418{2419  "data": [2420    {2421      "id": "sevt_011CZkZGOp0iBcp4kaQSihUmy",2422      "content": [2423        {2424          "text": "Where is my order #1234?",2425          "type": "text"2426        }2427      ],2428      "type": "user.message",2429      "processed_at": "2026-03-15T10:00:00Z"2430    },2431    {2432      "id": "sevt_011CZkZHPq1jCdq5lbRTjiVnz",2433      "content": [2434        {2435          "text": "Let me look up order #1234 for you.",2436          "type": "text"2437        }2438      ],2439      "processed_at": "2026-03-15T10:00:00Z",2440      "type": "agent.message"2441    }2442  ],2443  "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="2444}2445```24462447## Send Events24482449**POST** `/v1/sessions/{session_id}/events`24502451Send Events24522453### Path parameters24542455- `session_id: string`24562457### Headers24582459- `"anthropic-beta": optional array of AnthropicBeta`24602461  Optional header to specify the beta version(s) you want to use.24622463  - `string`24642465  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`24662467    - `"message-batches-2024-09-24"`24682469    - `"prompt-caching-2024-07-31"`24702471    - `"computer-use-2024-10-22"`24722473    - `"computer-use-2025-01-24"`24742475    - `"pdfs-2024-09-25"`24762477    - `"token-counting-2024-11-01"`24782479    - `"token-efficient-tools-2025-02-19"`24802481    - `"output-128k-2025-02-19"`24822483    - `"files-api-2025-04-14"`24842485    - `"mcp-client-2025-04-04"`24862487    - `"mcp-client-2025-11-20"`24882489    - `"dev-full-thinking-2025-05-14"`24902491    - `"interleaved-thinking-2025-05-14"`24922493    - `"code-execution-2025-05-22"`24942495    - `"extended-cache-ttl-2025-04-11"`24962497    - `"context-1m-2025-08-07"`24982499    - `"context-management-2025-06-27"`25002501    - `"model-context-window-exceeded-2025-08-26"`25022503    - `"skills-2025-10-02"`25042505    - `"fast-mode-2026-02-01"`25062507    - `"output-300k-2026-03-24"`25082509    - `"user-profiles-2026-03-24"`25102511    - `"user-profiles-2026-08-18"`25122513    - `"user-profiles-2026-09-04"`25142515    - `"advisor-tool-2026-03-01"`25162517    - `"managed-agents-2026-04-01"`25182519    - `"cache-diagnosis-2026-04-07"`25202521    - `"dreaming-2026-04-21"`25222523    - `"thinking-token-count-2026-05-13"`25242525    - `"server-side-fallback-2026-06-01"`25262527    - `"server-side-fallback-2026-07-01"`25282529    - `"fallback-credit-2026-06-01"`25302531    - `"fallback-credit-2026-07-01"`25322533    - `"agent-memory-2026-07-22"`25342535    - `"mid-conversation-tool-changes-2026-07-01"`25362537    - `"compact-2026-01-12"`25382539    - `"computer-use-2025-11-24"`25402541    - `"mcp-tunnels-2026-06-22"`25422543    - `"structured-outputs-2025-11-13"`25442545    - `"task-budgets-2026-03-13"`25462547    - `"thinking-display-updates-2026-08-18"`25482549    - `"ce-user-management-2026-07-13"`25502551    - `"mid-conversation-output-config-2026-07-01"`25522553    - `"thinking-binding-controls-2026-08-01"`25542555    - `"mid-conversation-system-clear-at-2026-08-21"`25562557    - `"compact-2026-09-04"`25582559- `"anthropic-workspace-id": optional string`25602561### Body parameters25622563- `events: array of BetaManagedAgentsEventParams`25642565  Events to send to the `session`.25662567  - `BetaManagedAgentsUserMessageEventParams object`25682569    Parameters for sending a user message to the session.25702571    - `type: "user.message"`25722573    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`25742575      Array of content blocks for the user message.25762577      - `BetaManagedAgentsTextBlock object`25782579        Regular text content.25802581        - `type: "text"`25822583        - `text: string`25842585          The text content.25862587          minLength: 125882589      - `BetaManagedAgentsImageBlock object`25902591        Image content specified directly as base64 data or as a reference via a URL.25922593        - `type: "image"`25942595        - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`25962597          Union type for image source variants.25982599          - `BetaManagedAgentsBase64ImageSource object`26002601            Base64-encoded image data.26022603            - `type: "base64"`26042605            - `data: string`26062607              Base64-encoded image data.26082609              minLength: 126102611            - `media_type: string`26122613              MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").26142615              minLength: 126162617          - `BetaManagedAgentsURLImageSource object`26182619            Image referenced by URL.26202621            - `type: "url"`26222623            - `url: string`26242625              URL of the image to fetch.26262627              minLength: 126282629          - `BetaManagedAgentsFileImageSource object`26302631            Image referenced by file ID.26322633            - `type: "file"`26342635            - `file_id: string`26362637              ID of a previously uploaded file.26382639              minLength: 126402641      - `BetaManagedAgentsDocumentBlock object`26422643        Document content, either specified directly as base64 data, as text, or as a reference via a URL.26442645        - `type: "document"`26462647        - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`26482649          Union type for document source variants.26502651          - `BetaManagedAgentsBase64DocumentSource object`26522653            Base64-encoded document data.26542655            - `type: "base64"`26562657            - `data: string`26582659              Base64-encoded document data.26602661              minLength: 126622663            - `media_type: string`26642665              MIME type of the document (e.g., "application/pdf").26662667              minLength: 126682669          - `BetaManagedAgentsPlainTextDocumentSource object`26702671            Plain text document content.26722673            - `type: "text"`26742675            - `data: string`26762677              The plain text content.26782679              minLength: 126802681            - `media_type: "text/plain"`26822683              MIME type of the text content. Must be "text/plain".26842685          - `BetaManagedAgentsURLDocumentSource object`26862687            Document referenced by URL.26882689            - `type: "url"`26902691            - `url: string`26922693              URL of the document to fetch.26942695              minLength: 126962697          - `BetaManagedAgentsFileDocumentSource object`26982699            Document referenced by file ID.27002701            - `type: "file"`27022703            - `file_id: string`27042705              ID of a previously uploaded file.27062707              minLength: 127082709        - `context: optional string or null`27102711          Additional context about the document for the model.27122713        - `title: optional string or null`27142715          The title of the document.27162717      - `BetaManagedAgentsRedactedBlock object`27182719        Placeholder for content withheld by Anthropic model policy.27202721        - `type: "redacted"`27222723  - `BetaManagedAgentsUserInterruptEventParams object`27242725    Parameters for sending an interrupt to pause the agent.27262727    - `type: "user.interrupt"`27282729    - `session_thread_id: optional string or null`27302731      If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread.27322733  - `BetaManagedAgentsUserToolConfirmationEventParams object`27342735    Parameters for confirming or denying a tool execution request.27362737    - `type: "user.tool_confirmation"`27382739    - `result: "allow" or "deny"`27402741      UserToolConfirmationResult enum27422743      - `"allow"`27442745      - `"deny"`27462747    - `tool_use_id: string`27482749      The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.27502751      minLength: 1, maxLength: 12827522753    - `deny_message: optional string or null`27542755      Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.27562757      maxLength: 1000027582759  - `BetaManagedAgentsUserCustomToolResultEventParams object`27602761    Parameters for providing the result of a custom tool execution.27622763    - `type: "user.custom_tool_result"`27642765    - `custom_tool_use_id: string`27662767      The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.27682769      minLength: 1, maxLength: 12827702771    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`27722773      The result content returned by the tool.27742775      - `BetaManagedAgentsTextBlock object`27762777        Regular text content.27782779      - `BetaManagedAgentsImageBlock object`27802781        Image content specified directly as base64 data or as a reference via a URL.27822783      - `BetaManagedAgentsDocumentBlock object`27842785        Document content, either specified directly as base64 data, as text, or as a reference via a URL.27862787      - `BetaManagedAgentsSearchResultBlock object`27882789        A block containing a web search result.27902791        - `type: "search_result"`27922793        - `citations: BetaManagedAgentsSearchResultCitations`27942795          Citation settings for a search result.27962797          - `enabled: boolean`27982799            Whether citations are enabled for this search result.28002801        - `content: array of BetaManagedAgentsSearchResultContent`28022803          Array of text content blocks from the search result.28042805          - `type: "text"`28062807          - `text: string`28082809            The text content.28102811            minLength: 128122813        - `source: string`28142815          The URL source of the search result.28162817          minLength: 128182819        - `title: string`28202821          The title of the search result.28222823          minLength: 128242825    - `is_error: optional boolean or null`28262827      Whether the tool execution resulted in an error.28282829  - `BetaManagedAgentsUserDefineOutcomeEventParams object`28302831    Parameters for defining an outcome the agent should work toward. The agent begins work on receipt.28322833    - `type: "user.define_outcome"`28342835    - `description: string`28362837      What the agent should produce. This is the task specification.28382839    - `rubric: BetaManagedAgentsFileRubricParams or BetaManagedAgentsTextRubricParams`28402841      Rubric for grading the quality of an outcome.28422843      - `BetaManagedAgentsFileRubricParams object`28442845        Rubric referenced by a file uploaded via the Files API.28462847        - `type: "file"`28482849        - `file_id: string`28502851          ID of the rubric file.28522853      - `BetaManagedAgentsTextRubricParams object`28542855        Rubric content provided inline as text.28562857        - `type: "text"`28582859        - `content: string`28602861          Rubric content. Plain text or markdown — the grader treats it as freeform text. Maximum 262144 characters.28622863          maxLength: 26214428642865    - `max_iterations: optional number or null`28662867      Eval→revision cycles before giving up. Default 3, max 20.28682869      format: int3228702871  - `BetaManagedAgentsUserToolResultEventParams object`28722873    Parameters for providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.28742875    - `type: "user.tool_result"`28762877    - `tool_use_id: string`28782879      The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.28802881      minLength: 1, maxLength: 12828822883    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`28842885      The result content returned by the tool.28862887      - `BetaManagedAgentsTextBlock object`28882889        Regular text content.28902891      - `BetaManagedAgentsImageBlock object`28922893        Image content specified directly as base64 data or as a reference via a URL.28942895      - `BetaManagedAgentsDocumentBlock object`28962897        Document content, either specified directly as base64 data, as text, or as a reference via a URL.28982899      - `BetaManagedAgentsSearchResultBlock object`29002901        A block containing a web search result.29022903    - `is_error: optional boolean or null`29042905      Whether the tool execution resulted in an error.29062907  - `BetaManagedAgentsSystemMessageEventParams object`29082909    Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a `role: "system"` turn rather than replacing the top-level system prompt. At most one per request: it must be the final event and immediately follow the `user.message`, `user.tool_result`, or `user.custom_tool_result` it accompanies. Only supported on models that accept mid-conversation system messages.29102911    - `type: "system.message"`29122913    - `content: array of BetaManagedAgentsSystemContentBlock`29142915      System content blocks to append. Text-only.29162917      - `type: "text"`29182919      - `text: string`29202921        The text content.29222923        minLength: 129242925### Returns29262927- `BetaManagedAgentsSendSessionEvents object`29282929  Events that were successfully sent to the session.29302931  - `data: optional array of BetaManagedAgentsUserMessageEvent or BetaManagedAgentsUserInterruptEvent or BetaManagedAgentsUserToolConfirmationEvent or 4 more`29322933    Sent events29342935    - `BetaManagedAgentsUserMessageEvent object`29362937      A user message event in the session conversation.29382939      - `type: "user.message"`29402941      - `id: string`29422943        Unique identifier for this event.29442945      - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`29462947        Array of content blocks comprising the user message.29482949        - `BetaManagedAgentsTextBlock object`29502951          Regular text content.29522953          - `type: "text"`29542955          - `text: string`29562957            The text content.29582959            minLength: 129602961        - `BetaManagedAgentsImageBlock object`29622963          Image content specified directly as base64 data or as a reference via a URL.29642965          - `type: "image"`29662967          - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`29682969            Union type for image source variants.29702971            - `BetaManagedAgentsBase64ImageSource object`29722973              Base64-encoded image data.29742975              - `type: "base64"`29762977              - `data: string`29782979                Base64-encoded image data.29802981                minLength: 129822983              - `media_type: string`29842985                MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").29862987                minLength: 129882989            - `BetaManagedAgentsURLImageSource object`29902991              Image referenced by URL.29922993              - `type: "url"`29942995              - `url: string`29962997                URL of the image to fetch.29982999                minLength: 130003001            - `BetaManagedAgentsFileImageSource object`30023003              Image referenced by file ID.30043005              - `type: "file"`30063007              - `file_id: string`30083009                ID of a previously uploaded file.30103011                minLength: 130123013        - `BetaManagedAgentsDocumentBlock object`30143015          Document content, either specified directly as base64 data, as text, or as a reference via a URL.30163017          - `type: "document"`30183019          - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`30203021            Union type for document source variants.30223023            - `BetaManagedAgentsBase64DocumentSource object`30243025              Base64-encoded document data.30263027              - `type: "base64"`30283029              - `data: string`30303031                Base64-encoded document data.30323033                minLength: 130343035              - `media_type: string`30363037                MIME type of the document (e.g., "application/pdf").30383039                minLength: 130403041            - `BetaManagedAgentsPlainTextDocumentSource object`30423043              Plain text document content.30443045              - `type: "text"`30463047              - `data: string`30483049                The plain text content.30503051                minLength: 130523053              - `media_type: "text/plain"`30543055                MIME type of the text content. Must be "text/plain".30563057            - `BetaManagedAgentsURLDocumentSource object`30583059              Document referenced by URL.30603061              - `type: "url"`30623063              - `url: string`30643065                URL of the document to fetch.30663067                minLength: 130683069            - `BetaManagedAgentsFileDocumentSource object`30703071              Document referenced by file ID.30723073              - `type: "file"`30743075              - `file_id: string`30763077                ID of a previously uploaded file.30783079                minLength: 130803081          - `context: optional string or null`30823083            Additional context about the document for the model.30843085          - `title: optional string or null`30863087            The title of the document.30883089        - `BetaManagedAgentsRedactedBlock object`30903091          Placeholder for content withheld by Anthropic model policy.30923093          - `type: "redacted"`30943095      - `processed_at: optional string or null`30963097        A timestamp in RFC 3339 format30983099        format: date-time31003101    - `BetaManagedAgentsUserInterruptEvent object`31023103      An interrupt event that pauses agent execution and returns control to the user.31043105      - `type: "user.interrupt"`31063107      - `id: string`31083109        Unique identifier for this event.31103111      - `processed_at: optional string or null`31123113        A timestamp in RFC 3339 format31143115        format: date-time31163117      - `session_thread_id: optional string or null`31183119        If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread.31203121    - `BetaManagedAgentsUserToolConfirmationEvent object`31223123      A tool confirmation event that approves or denies a pending tool execution.31243125      - `type: "user.tool_confirmation"`31263127      - `id: string`31283129        Unique identifier for this event.31303131      - `result: "allow" or "deny"`31323133        UserToolConfirmationResult enum31343135        - `"allow"`31363137        - `"deny"`31383139      - `tool_use_id: string`31403141        The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.31423143      - `deny_message: optional string or null`31443145        Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.31463147        maxLength: 1000031483149      - `processed_at: optional string or null`31503151        A timestamp in RFC 3339 format31523153        format: date-time31543155      - `session_thread_id: optional string or null`31563157        Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread.31583159    - `BetaManagedAgentsUserCustomToolResultEvent object`31603161      Event sent by the client providing the result of a custom tool execution.31623163      - `type: "user.custom_tool_result"`31643165      - `id: string`31663167        Unique identifier for this event.31683169      - `custom_tool_use_id: string`31703171        The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.31723173      - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`31743175        The result content returned by the tool.31763177        - `BetaManagedAgentsTextBlock object`31783179          Regular text content.31803181        - `BetaManagedAgentsImageBlock object`31823183          Image content specified directly as base64 data or as a reference via a URL.31843185        - `BetaManagedAgentsDocumentBlock object`31863187          Document content, either specified directly as base64 data, as text, or as a reference via a URL.31883189        - `BetaManagedAgentsSearchResultBlock object`31903191          A block containing a web search result.31923193          - `type: "search_result"`31943195          - `citations: BetaManagedAgentsSearchResultCitations`31963197            Citation settings for a search result.31983199            - `enabled: boolean`32003201              Whether citations are enabled for this search result.32023203          - `content: array of BetaManagedAgentsSearchResultContent`32043205            Array of text content blocks from the search result.32063207            - `type: "text"`32083209            - `text: string`32103211              The text content.32123213              minLength: 132143215          - `source: string`32163217            The URL source of the search result.32183219            minLength: 132203221          - `title: string`32223223            The title of the search result.32243225            minLength: 132263227      - `is_error: optional boolean or null`32283229        Whether the tool execution resulted in an error.32303231      - `processed_at: optional string or null`32323233        A timestamp in RFC 3339 format32343235        format: date-time32363237      - `session_thread_id: optional string or null`32383239        Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.32403241    - `BetaManagedAgentsUserDefineOutcomeEvent object`32423243      Echo of a `user.define_outcome` input event. Carries the server-generated `outcome_id` that subsequent `span.outcome_evaluation_*` events reference.32443245      - `type: "user.define_outcome"`32463247      - `id: string`32483249        Unique identifier for this event.32503251      - `description: string`32523253        What the agent should produce. Copied from the input event.32543255      - `max_iterations: number or null`32563257        Evaluate-then-revise cycles before giving up. Default 3, max 20.32583259        format: int3232603261      - `outcome_id: string`32623263        Server-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.32643265      - `processed_at: string`32663267        A timestamp in RFC 3339 format32683269        format: date-time32703271      - `rubric: BetaManagedAgentsFileRubric or BetaManagedAgentsTextRubric`32723273        Rubric for grading the quality of an outcome.32743275        - `BetaManagedAgentsFileRubric object`32763277          Rubric referenced by a file uploaded via the Files API.32783279          - `type: "file"`32803281          - `file_id: string`32823283            ID of the rubric file.32843285        - `BetaManagedAgentsTextRubric object`32863287          Rubric content provided inline as text.32883289          - `type: "text"`32903291          - `content: string`32923293            Rubric content. Plain text or markdown — the grader treats it as freeform text.32943295    - `BetaManagedAgentsUserToolResultEvent object`32963297      Event sent by the client providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.32983299      - `type: "user.tool_result"`33003301      - `id: string`33023303        Unique identifier for this event.33043305      - `tool_use_id: string`33063307        The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.33083309      - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`33103311        The result content returned by the tool.33123313        - `BetaManagedAgentsTextBlock object`33143315          Regular text content.33163317        - `BetaManagedAgentsImageBlock object`33183319          Image content specified directly as base64 data or as a reference via a URL.33203321        - `BetaManagedAgentsDocumentBlock object`33223323          Document content, either specified directly as base64 data, as text, or as a reference via a URL.33243325        - `BetaManagedAgentsSearchResultBlock object`33263327          A block containing a web search result.33283329      - `is_error: optional boolean or null`33303331        Whether the tool execution resulted in an error.33323333      - `processed_at: optional string or null`33343335        A timestamp in RFC 3339 format33363337        format: date-time33383339      - `session_thread_id: optional string or null`33403341        Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.33423343    - `BetaManagedAgentsSystemMessageEvent object`33443345      A mid-conversation system message event. Carries system-role content that is appended to the session as a `role: "system"` turn.33463347      - `type: "system.message"`33483349      - `id: string`33503351        Unique identifier for this event.33523353      - `content: array of BetaManagedAgentsSystemContentBlock`33543355        System content blocks. Text-only.33563357        - `type: "text"`33583359        - `text: string`33603361          The text content.33623363          minLength: 133643365      - `processed_at: optional string or null`33663367        A timestamp in RFC 3339 format33683369        format: date-time33703371### Example33723373```bash3374curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events \3375    -H 'Content-Type: application/json' \3376    -H 'anthropic-version: 2023-06-01' \3377    -H 'anthropic-beta: managed-agents-2026-04-01' \3378    -H "X-Api-Key: $ANTHROPIC_API_KEY" \3379    -d '{3380          "events": [3381            {3382              "content": [3383                {3384                  "text": "Where is my order #1234?",3385                  "type": "text"3386                }3387              ],3388              "type": "user.message"3389            }3390          ]3391        }'3392```33933394#### Response (200)33953396```json3397{3398  "data": [3399    {3400      "id": "sevt_011CZkZGOp0iBcp4kaQSihUmy",3401      "content": [3402        {3403          "text": "Where is my order #1234?",3404          "type": "text"3405        }3406      ],3407      "type": "user.message",3408      "processed_at": "2026-03-15T10:00:00Z"3409    }3410  ]3411}3412```34133414## Stream Events34153416**GET** `/v1/sessions/{session_id}/events/stream`34173418Stream Events34193420### Path parameters34213422- `session_id: string`34233424### Query parameters34253426- `event_deltas: optional array of BetaManagedAgentsDeltaType`34273428  When set, this connection also receives streaming deltas (`event_start`, `event_delta`) while an event is being produced, before the event itself arrives. Deltas are best-effort; when the final event is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no final event — its terminal `span.model_request_end` closes the preview. Accepts one or more event types to preview and may be repeated: `agent.message` streams `content_delta` fragments; `agent.thinking` is start-only — a signal that the agent has begun extended thinking, concluded by the `agent.thinking` event itself. Only previews of the requested event types are sent.34293430  - `"agent.message"`34313432  - `"agent.thinking"`34333434### Headers34353436- `"anthropic-beta": optional array of AnthropicBeta`34373438  Optional header to specify the beta version(s) you want to use.34393440  - `string`34413442  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`34433444    - `"message-batches-2024-09-24"`34453446    - `"prompt-caching-2024-07-31"`34473448    - `"computer-use-2024-10-22"`34493450    - `"computer-use-2025-01-24"`34513452    - `"pdfs-2024-09-25"`34533454    - `"token-counting-2024-11-01"`34553456    - `"token-efficient-tools-2025-02-19"`34573458    - `"output-128k-2025-02-19"`34593460    - `"files-api-2025-04-14"`34613462    - `"mcp-client-2025-04-04"`34633464    - `"mcp-client-2025-11-20"`34653466    - `"dev-full-thinking-2025-05-14"`34673468    - `"interleaved-thinking-2025-05-14"`34693470    - `"code-execution-2025-05-22"`34713472    - `"extended-cache-ttl-2025-04-11"`34733474    - `"context-1m-2025-08-07"`34753476    - `"context-management-2025-06-27"`34773478    - `"model-context-window-exceeded-2025-08-26"`34793480    - `"skills-2025-10-02"`34813482    - `"fast-mode-2026-02-01"`34833484    - `"output-300k-2026-03-24"`34853486    - `"user-profiles-2026-03-24"`34873488    - `"user-profiles-2026-08-18"`34893490    - `"user-profiles-2026-09-04"`34913492    - `"advisor-tool-2026-03-01"`34933494    - `"managed-agents-2026-04-01"`34953496    - `"cache-diagnosis-2026-04-07"`34973498    - `"dreaming-2026-04-21"`34993500    - `"thinking-token-count-2026-05-13"`35013502    - `"server-side-fallback-2026-06-01"`35033504    - `"server-side-fallback-2026-07-01"`35053506    - `"fallback-credit-2026-06-01"`35073508    - `"fallback-credit-2026-07-01"`35093510    - `"agent-memory-2026-07-22"`35113512    - `"mid-conversation-tool-changes-2026-07-01"`35133514    - `"compact-2026-01-12"`35153516    - `"computer-use-2025-11-24"`35173518    - `"mcp-tunnels-2026-06-22"`35193520    - `"structured-outputs-2025-11-13"`35213522    - `"task-budgets-2026-03-13"`35233524    - `"thinking-display-updates-2026-08-18"`35253526    - `"ce-user-management-2026-07-13"`35273528    - `"mid-conversation-output-config-2026-07-01"`35293530    - `"thinking-binding-controls-2026-08-01"`35313532    - `"mid-conversation-system-clear-at-2026-08-21"`35333534    - `"compact-2026-09-04"`35353536- `"anthropic-workspace-id": optional string`35373538### Returns35393540- `BetaManagedAgentsStreamSessionEvents = BetaManagedAgentsUserMessageEvent or BetaManagedAgentsUserInterruptEvent or BetaManagedAgentsUserToolConfirmationEvent or 34 more`35413542  Server-sent event in the session stream.35433544  - `BetaManagedAgentsUserMessageEvent object`35453546    A user message event in the session conversation.35473548    - `type: "user.message"`35493550    - `id: string`35513552      Unique identifier for this event.35533554    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`35553556      Array of content blocks comprising the user message.35573558      - `BetaManagedAgentsTextBlock object`35593560        Regular text content.35613562        - `type: "text"`35633564        - `text: string`35653566          The text content.35673568          minLength: 135693570      - `BetaManagedAgentsImageBlock object`35713572        Image content specified directly as base64 data or as a reference via a URL.35733574        - `type: "image"`35753576        - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`35773578          Union type for image source variants.35793580          - `BetaManagedAgentsBase64ImageSource object`35813582            Base64-encoded image data.35833584            - `type: "base64"`35853586            - `data: string`35873588              Base64-encoded image data.35893590              minLength: 135913592            - `media_type: string`35933594              MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").35953596              minLength: 135973598          - `BetaManagedAgentsURLImageSource object`35993600            Image referenced by URL.36013602            - `type: "url"`36033604            - `url: string`36053606              URL of the image to fetch.36073608              minLength: 136093610          - `BetaManagedAgentsFileImageSource object`36113612            Image referenced by file ID.36133614            - `type: "file"`36153616            - `file_id: string`36173618              ID of a previously uploaded file.36193620              minLength: 136213622      - `BetaManagedAgentsDocumentBlock object`36233624        Document content, either specified directly as base64 data, as text, or as a reference via a URL.36253626        - `type: "document"`36273628        - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`36293630          Union type for document source variants.36313632          - `BetaManagedAgentsBase64DocumentSource object`36333634            Base64-encoded document data.36353636            - `type: "base64"`36373638            - `data: string`36393640              Base64-encoded document data.36413642              minLength: 136433644            - `media_type: string`36453646              MIME type of the document (e.g., "application/pdf").36473648              minLength: 136493650          - `BetaManagedAgentsPlainTextDocumentSource object`36513652            Plain text document content.36533654            - `type: "text"`36553656            - `data: string`36573658              The plain text content.36593660              minLength: 136613662            - `media_type: "text/plain"`36633664              MIME type of the text content. Must be "text/plain".36653666          - `BetaManagedAgentsURLDocumentSource object`36673668            Document referenced by URL.36693670            - `type: "url"`36713672            - `url: string`36733674              URL of the document to fetch.36753676              minLength: 136773678          - `BetaManagedAgentsFileDocumentSource object`36793680            Document referenced by file ID.36813682            - `type: "file"`36833684            - `file_id: string`36853686              ID of a previously uploaded file.36873688              minLength: 136893690        - `context: optional string or null`36913692          Additional context about the document for the model.36933694        - `title: optional string or null`36953696          The title of the document.36973698      - `BetaManagedAgentsRedactedBlock object`36993700        Placeholder for content withheld by Anthropic model policy.37013702        - `type: "redacted"`37033704    - `processed_at: optional string or null`37053706      A timestamp in RFC 3339 format37073708      format: date-time37093710  - `BetaManagedAgentsUserInterruptEvent object`37113712    An interrupt event that pauses agent execution and returns control to the user.37133714    - `type: "user.interrupt"`37153716    - `id: string`37173718      Unique identifier for this event.37193720    - `processed_at: optional string or null`37213722      A timestamp in RFC 3339 format37233724      format: date-time37253726    - `session_thread_id: optional string or null`37273728      If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread.37293730  - `BetaManagedAgentsUserToolConfirmationEvent object`37313732    A tool confirmation event that approves or denies a pending tool execution.37333734    - `type: "user.tool_confirmation"`37353736    - `id: string`37373738      Unique identifier for this event.37393740    - `result: "allow" or "deny"`37413742      UserToolConfirmationResult enum37433744      - `"allow"`37453746      - `"deny"`37473748    - `tool_use_id: string`37493750      The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.37513752    - `deny_message: optional string or null`37533754      Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.37553756      maxLength: 1000037573758    - `processed_at: optional string or null`37593760      A timestamp in RFC 3339 format37613762      format: date-time37633764    - `session_thread_id: optional string or null`37653766      Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread.37673768  - `BetaManagedAgentsUserCustomToolResultEvent object`37693770    Event sent by the client providing the result of a custom tool execution.37713772    - `type: "user.custom_tool_result"`37733774    - `id: string`37753776      Unique identifier for this event.37773778    - `custom_tool_use_id: string`37793780      The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.37813782    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`37833784      The result content returned by the tool.37853786      - `BetaManagedAgentsTextBlock object`37873788        Regular text content.37893790      - `BetaManagedAgentsImageBlock object`37913792        Image content specified directly as base64 data or as a reference via a URL.37933794      - `BetaManagedAgentsDocumentBlock object`37953796        Document content, either specified directly as base64 data, as text, or as a reference via a URL.37973798      - `BetaManagedAgentsSearchResultBlock object`37993800        A block containing a web search result.38013802        - `type: "search_result"`38033804        - `citations: BetaManagedAgentsSearchResultCitations`38053806          Citation settings for a search result.38073808          - `enabled: boolean`38093810            Whether citations are enabled for this search result.38113812        - `content: array of BetaManagedAgentsSearchResultContent`38133814          Array of text content blocks from the search result.38153816          - `type: "text"`38173818          - `text: string`38193820            The text content.38213822            minLength: 138233824        - `source: string`38253826          The URL source of the search result.38273828          minLength: 138293830        - `title: string`38313832          The title of the search result.38333834          minLength: 138353836    - `is_error: optional boolean or null`38373838      Whether the tool execution resulted in an error.38393840    - `processed_at: optional string or null`38413842      A timestamp in RFC 3339 format38433844      format: date-time38453846    - `session_thread_id: optional string or null`38473848      Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.38493850  - `BetaManagedAgentsAgentCustomToolUseEvent object`38513852    Event emitted when the agent calls a custom tool. The session goes idle until the client sends a `user.custom_tool_result` event with the result.38533854    - `type: "agent.custom_tool_use"`38553856    - `id: string`38573858      Unique identifier for this event.38593860    - `input: map[unknown]`38613862      Input parameters for the tool call.38633864    - `name: string`38653866      Name of the custom tool being called.38673868    - `processed_at: string`38693870      A timestamp in RFC 3339 format38713872      format: date-time38733874    - `session_thread_id: optional string or null`38753876      When set, this event was cross-posted from a subagent's thread to surface its custom tool use on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.custom_tool_result` by `custom_tool_use_id`, so clients do not send it back.38773878  - `BetaManagedAgentsAgentMessageEvent object`38793880    An agent response event in the session conversation.38813882    - `type: "agent.message"`38833884    - `id: string`38853886      Unique identifier for this event.38873888    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsRedactedBlock`38893890      Array of text blocks comprising the agent response.38913892      - `BetaManagedAgentsTextBlock object`38933894        Regular text content.38953896      - `BetaManagedAgentsRedactedBlock object`38973898        Placeholder for content withheld by Anthropic model policy.38993900    - `processed_at: string`39013902      A timestamp in RFC 3339 format39033904      format: date-time39053906  - `BetaManagedAgentsAgentThinkingEvent object`39073908    Indicates the agent is making forward progress via extended thinking. A progress signal, not a content carrier.39093910    - `type: "agent.thinking"`39113912    - `id: string`39133914      Unique identifier for this event.39153916    - `processed_at: string`39173918      A timestamp in RFC 3339 format39193920      format: date-time39213922  - `BetaManagedAgentsAgentMCPToolUseEvent object`39233924    Event emitted when the agent invokes a tool provided by an MCP server.39253926    - `type: "agent.mcp_tool_use"`39273928    - `id: string`39293930      Unique identifier for this event.39313932    - `input: map[unknown]`39333934      Input parameters for the tool call.39353936    - `mcp_server_name: string`39373938      Name of the MCP server providing the tool.39393940    - `name: string`39413942      Name of the MCP tool being used.39433944    - `processed_at: string`39453946      A timestamp in RFC 3339 format39473948      format: date-time39493950    - `evaluated_permission: optional "allow" or "ask" or "deny"`39513952      AgentEvaluatedPermission enum39533954      - `"allow"`39553956      - `"ask"`39573958      - `"deny"`39593960    - `evaluation: optional BetaManagedAgentsAgentToolEvaluation`39613962      Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.39633964      - `BetaManagedAgentsAgentToolEvaluationAlwaysAllow object`39653966        The resolved permission_policy was always_allow; accompanies evaluated_permission "allow".39673968        - `type: "always_allow"`39693970      - `BetaManagedAgentsAgentToolEvaluationAlwaysAsk object`39713972        The resolved permission_policy was always_ask; accompanies evaluated_permission "ask".39733974        - `type: "always_ask"`39753976      - `BetaManagedAgentsAgentToolEvaluationAuto object`39773978        The resolved permission_policy was auto: the server judged this invocation individually.39793980        - `type: "auto"`39813982        - `evaluated_permission: BetaManagedAgentsAgentAutoEvaluatedPermission`39833984          The server's per-invocation judgement under the auto permission policy. Its type always equals the event's top-level evaluated_permission. Open union: clients must tolerate unknown variants.39853986          - `BetaManagedAgentsAgentAutoEvaluatedPermissionAllow object`39873988            The server judged the invocation safe to execute without client approval.39893990            - `type: "allow"`39913992          - `BetaManagedAgentsAgentAutoEvaluatedPermissionAsk object`39933994            The server reached no judgement; the invocation is held for client approval.39953996            - `type: "ask"`39973998            - `reason_code: string`39994000              The judgement's grounds in registry-bound terms, for client branching and audit rather than end-user display. Open registry; currently "indeterminate" (no judgement was reached). Clients must tolerate values outside this set.40014002              maxLength: 6440034004          - `BetaManagedAgentsAgentAutoEvaluatedPermissionDeny object`40054006            The server judged the invocation high-risk; it does not execute and a synthetic error tool result is appended.40074008            - `type: "deny"`40094010            - `reason_code: string`40114012              The judgement's grounds in registry-bound terms. Open registry; currently "high_risk" (judged high-risk; the call does not run). Clients must tolerate values outside this set.40134014              maxLength: 6440154016    - `session_thread_id: optional string or null`40174018      When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` by `tool_use_id`, so clients do not send it back.40194020  - `BetaManagedAgentsAgentMCPToolResultEvent object`40214022    Event representing the result of an MCP tool execution.40234024    - `type: "agent.mcp_tool_result"`40254026    - `id: string`40274028      Unique identifier for this event.40294030    - `mcp_tool_use_id: string`40314032      The id of the `agent.mcp_tool_use` event this result corresponds to.40334034    - `processed_at: string`40354036      A timestamp in RFC 3339 format40374038      format: date-time40394040    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`40414042      The result content returned by the tool.40434044      - `BetaManagedAgentsTextBlock object`40454046        Regular text content.40474048      - `BetaManagedAgentsImageBlock object`40494050        Image content specified directly as base64 data or as a reference via a URL.40514052      - `BetaManagedAgentsDocumentBlock object`40534054        Document content, either specified directly as base64 data, as text, or as a reference via a URL.40554056      - `BetaManagedAgentsSearchResultBlock object`40574058        A block containing a web search result.40594060    - `is_error: optional boolean or null`40614062      Whether the tool execution resulted in an error.40634064  - `BetaManagedAgentsAgentToolUseEvent object`40654066    Event emitted when the agent invokes a built-in agent tool.40674068    - `type: "agent.tool_use"`40694070    - `id: string`40714072      Unique identifier for this event.40734074    - `input: map[unknown]`40754076      Input parameters for the tool call.40774078    - `name: string`40794080      Name of the agent tool being used.40814082    - `processed_at: string`40834084      A timestamp in RFC 3339 format40854086      format: date-time40874088    - `evaluated_permission: optional "allow" or "ask" or "deny"`40894090      AgentEvaluatedPermission enum40914092      - `"allow"`40934094      - `"ask"`40954096      - `"deny"`40974098    - `evaluation: optional BetaManagedAgentsAgentToolEvaluation`40994100      Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.41014102    - `session_thread_id: optional string or null`41034104      When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` or `user.tool_result` by `tool_use_id`, so clients do not send it back.41054106  - `BetaManagedAgentsAgentToolResultEvent object`41074108    Event representing the result of an agent tool execution.41094110    - `type: "agent.tool_result"`41114112    - `id: string`41134114      Unique identifier for this event.41154116    - `processed_at: string`41174118      A timestamp in RFC 3339 format41194120      format: date-time41214122    - `tool_use_id: string`41234124      The id of the `agent.tool_use` event this result corresponds to.41254126    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`41274128      The result content returned by the tool.41294130      - `BetaManagedAgentsTextBlock object`41314132        Regular text content.41334134      - `BetaManagedAgentsImageBlock object`41354136        Image content specified directly as base64 data or as a reference via a URL.41374138      - `BetaManagedAgentsDocumentBlock object`41394140        Document content, either specified directly as base64 data, as text, or as a reference via a URL.41414142      - `BetaManagedAgentsSearchResultBlock object`41434144        A block containing a web search result.41454146    - `is_error: optional boolean or null`41474148      Whether the tool execution resulted in an error.41494150  - `BetaManagedAgentsAgentThreadMessageReceivedEvent object`41514152    Delivery event written to the target thread's input stream when an agent-to-agent message arrives.41534154    - `type: "agent.thread_message_received"`41554156    - `id: string`41574158      Unique identifier for this event.41594160    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`41614162      Message content blocks.41634164      - `BetaManagedAgentsTextBlock object`41654166        Regular text content.41674168      - `BetaManagedAgentsImageBlock object`41694170        Image content specified directly as base64 data or as a reference via a URL.41714172      - `BetaManagedAgentsDocumentBlock object`41734174        Document content, either specified directly as base64 data, as text, or as a reference via a URL.41754176      - `BetaManagedAgentsRedactedBlock object`41774178        Placeholder for content withheld by Anthropic model policy.41794180    - `from_session_thread_id: string`41814182      Public `sthr_` ID of the thread that sent the message.41834184    - `processed_at: string`41854186      A timestamp in RFC 3339 format41874188      format: date-time41894190    - `from_agent_name: optional string or null`41914192      Name of the callable agent this message came from. Absent when received from the primary agent.41934194  - `BetaManagedAgentsAgentThreadMessageSentEvent object`41954196    Observability event emitted to the sender's output stream when an agent-to-agent message is sent.41974198    - `type: "agent.thread_message_sent"`41994200    - `id: string`42014202      Unique identifier for this event.42034204    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`42054206      Message content blocks.42074208      - `BetaManagedAgentsTextBlock object`42094210        Regular text content.42114212      - `BetaManagedAgentsImageBlock object`42134214        Image content specified directly as base64 data or as a reference via a URL.42154216      - `BetaManagedAgentsDocumentBlock object`42174218        Document content, either specified directly as base64 data, as text, or as a reference via a URL.42194220      - `BetaManagedAgentsRedactedBlock object`42214222        Placeholder for content withheld by Anthropic model policy.42234224    - `processed_at: string`42254226      A timestamp in RFC 3339 format42274228      format: date-time42294230    - `to_session_thread_id: string`42314232      Public `sthr_` ID of the thread the message was sent to.42334234    - `to_agent_name: optional string or null`42354236      Name of the callable agent this message was sent to. Absent when sent to the primary agent.42374238  - `BetaManagedAgentsAgentThreadContextCompactedEvent object`42394240    Indicates that context compaction (summarization) occurred during the session.42414242    - `type: "agent.thread_context_compacted"`42434244    - `id: string`42454246      Unique identifier for this event.42474248    - `processed_at: string`42494250      A timestamp in RFC 3339 format42514252      format: date-time42534254  - `BetaManagedAgentsSessionErrorEvent object`42554256    An error event indicating a problem occurred during session execution.42574258    - `type: "session.error"`42594260    - `id: string`42614262      Unique identifier for this event.42634264    - `error: BetaManagedAgentsUnknownError or BetaManagedAgentsModelOverloadedError or BetaManagedAgentsModelRateLimitedError or 5 more`42654266      - `BetaManagedAgentsUnknownError object`42674268        An unknown or unexpected error occurred during session execution. A fallback variant; clients that don't recognize a new error code can match on `retry_status` and `message` alone.42694270        - `type: "unknown_error"`42714272        - `message: string`42734274          Human-readable error description.42754276        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`42774278          What the client should do next in response to this error.42794280          - `BetaManagedAgentsRetryStatusRetrying object`42814282            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.42834284            - `type: "retrying"`42854286          - `BetaManagedAgentsRetryStatusExhausted object`42874288            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.42894290            - `type: "exhausted"`42914292          - `BetaManagedAgentsRetryStatusTerminal object`42934294            The session encountered a terminal error and will transition to `terminated` state.42954296            - `type: "terminal"`42974298      - `BetaManagedAgentsModelOverloadedError object`42994300        The model is currently overloaded. Emitted after automatic retries are exhausted.43014302        - `type: "model_overloaded_error"`43034304        - `message: string`43054306          Human-readable error description.43074308        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`43094310          What the client should do next in response to this error.43114312          - `BetaManagedAgentsRetryStatusRetrying object`43134314            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.43154316          - `BetaManagedAgentsRetryStatusExhausted object`43174318            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.43194320          - `BetaManagedAgentsRetryStatusTerminal object`43214322            The session encountered a terminal error and will transition to `terminated` state.43234324      - `BetaManagedAgentsModelRateLimitedError object`43254326        The model request was rate-limited.43274328        - `type: "model_rate_limited_error"`43294330        - `message: string`43314332          Human-readable error description.43334334        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`43354336          What the client should do next in response to this error.43374338          - `BetaManagedAgentsRetryStatusRetrying object`43394340            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.43414342          - `BetaManagedAgentsRetryStatusExhausted object`43434344            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.43454346          - `BetaManagedAgentsRetryStatusTerminal object`43474348            The session encountered a terminal error and will transition to `terminated` state.43494350      - `BetaManagedAgentsModelRequestFailedError object`43514352        A model request failed for a reason other than overload or rate-limiting.43534354        - `type: "model_request_failed_error"`43554356        - `message: string`43574358          Human-readable error description.43594360        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`43614362          What the client should do next in response to this error.43634364          - `BetaManagedAgentsRetryStatusRetrying object`43654366            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.43674368          - `BetaManagedAgentsRetryStatusExhausted object`43694370            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.43714372          - `BetaManagedAgentsRetryStatusTerminal object`43734374            The session encountered a terminal error and will transition to `terminated` state.43754376      - `BetaManagedAgentsMCPConnectionFailedError object`43774378        Failed to connect to an MCP server.43794380        - `type: "mcp_connection_failed_error"`43814382        - `mcp_server_name: string`43834384          Name of the MCP server that failed to connect.43854386        - `message: string`43874388          Human-readable error description.43894390        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`43914392          What the client should do next in response to this error.43934394          - `BetaManagedAgentsRetryStatusRetrying object`43954396            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.43974398          - `BetaManagedAgentsRetryStatusExhausted object`43994400            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.44014402          - `BetaManagedAgentsRetryStatusTerminal object`44034404            The session encountered a terminal error and will transition to `terminated` state.44054406      - `BetaManagedAgentsMCPAuthenticationFailedError object`44074408        Authentication to an MCP server failed.44094410        - `type: "mcp_authentication_failed_error"`44114412        - `mcp_server_name: string`44134414          Name of the MCP server that failed authentication.44154416        - `message: string`44174418          Human-readable error description.44194420        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`44214422          What the client should do next in response to this error.44234424          - `BetaManagedAgentsRetryStatusRetrying object`44254426            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.44274428          - `BetaManagedAgentsRetryStatusExhausted object`44294430            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.44314432          - `BetaManagedAgentsRetryStatusTerminal object`44334434            The session encountered a terminal error and will transition to `terminated` state.44354436      - `BetaManagedAgentsBillingError object`44374438        The caller's organization or workspace cannot make model requests — out of credits or spend limit reached. Retrying with the same credentials will not succeed; the caller must resolve the billing state.44394440        - `type: "billing_error"`44414442        - `message: string`44434444          Human-readable error description.44454446        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`44474448          What the client should do next in response to this error.44494450          - `BetaManagedAgentsRetryStatusRetrying object`44514452            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.44534454          - `BetaManagedAgentsRetryStatusExhausted object`44554456            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.44574458          - `BetaManagedAgentsRetryStatusTerminal object`44594460            The session encountered a terminal error and will transition to `terminated` state.44614462      - `BetaManagedAgentsCredentialHostUnreachableError object`44634464        An `environment_variable` credential's `auth.networking.allowed_hosts` includes a host the environment's network policy does not permit.44654466        - `type: "credential_host_unreachable_error"`44674468        - `credential_id: string`44694470          ID of the affected credential.44714472        - `message: string`44734474          Human-readable error description.44754476        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`44774478          What the client should do next in response to this error.44794480          - `BetaManagedAgentsRetryStatusRetrying object`44814482            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.44834484          - `BetaManagedAgentsRetryStatusExhausted object`44854486            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.44874488          - `BetaManagedAgentsRetryStatusTerminal object`44894490            The session encountered a terminal error and will transition to `terminated` state.44914492        - `vault_id: string`44934494          ID of the vault containing the affected credential.44954496    - `processed_at: string`44974498      A timestamp in RFC 3339 format44994500      format: date-time45014502  - `BetaManagedAgentsSessionStatusRescheduledEvent object`45034504    Indicates the session is recovering from an error state and is rescheduled for execution.45054506    - `type: "session.status_rescheduled"`45074508    - `id: string`45094510      Unique identifier for this event.45114512    - `processed_at: string`45134514      A timestamp in RFC 3339 format45154516      format: date-time45174518  - `BetaManagedAgentsSessionStatusRunningEvent object`45194520    Indicates the session is actively running and the agent is working.45214522    - `type: "session.status_running"`45234524    - `id: string`45254526      Unique identifier for this event.45274528    - `processed_at: string`45294530      A timestamp in RFC 3339 format45314532      format: date-time45334534  - `BetaManagedAgentsSessionStatusIdleEvent object`45354536    Indicates the agent has paused and is awaiting user input.45374538    - `type: "session.status_idle"`45394540    - `id: string`45414542      Unique identifier for this event.45434544    - `processed_at: string`45454546      A timestamp in RFC 3339 format45474548      format: date-time45494550    - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or BetaManagedAgentsSessionBudgetReached`45514552      - `BetaManagedAgentsSessionEndTurn object`45534554        The agent completed its turn naturally and is ready for the next user message.45554556        - `type: "end_turn"`45574558      - `BetaManagedAgentsSessionRequiresAction object`45594560        The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.45614562        - `type: "requires_action"`45634564        - `event_ids: array of string`45654566          The ids of events the agent is blocked on. Resolving fewer than all re-emits `session.status_idle` with the remainder.45674568      - `BetaManagedAgentsSessionRetriesExhausted object`45694570        The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`.45714572        - `type: "retries_exhausted"`45734574      - `BetaManagedAgentsSessionBudgetReached object`45754576        The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget.45774578        - `type: "budget_reached"`45794580  - `BetaManagedAgentsSessionStatusTerminatedEvent object`45814582    Indicates the session has terminated, either due to an error or completion.45834584    - `type: "session.status_terminated"`45854586    - `id: string`45874588      Unique identifier for this event.45894590    - `processed_at: string`45914592      A timestamp in RFC 3339 format45934594      format: date-time45954596  - `BetaManagedAgentsSessionThreadCreatedEvent object`45974598    Emitted when a subagent is spawned as a new thread. Written to the parent thread's output stream so clients observing the session see child creation.45994600    - `type: "session.thread_created"`46014602    - `id: string`46034604      Unique identifier for this event.46054606    - `agent_name: string`46074608      Name of the callable agent the thread runs.46094610    - `processed_at: string`46114612      A timestamp in RFC 3339 format46134614      format: date-time46154616    - `session_thread_id: string`46174618      Public `sthr_` ID of the newly created thread.46194620  - `BetaManagedAgentsSpanOutcomeEvaluationStartEvent object`46214622    Emitted when an outcome evaluation cycle begins.46234624    - `type: "span.outcome_evaluation_start"`46254626    - `id: string`46274628      Unique identifier for this event.46294630    - `iteration: number`46314632      0-indexed revision cycle. 0 is the first evaluation; 1 is the re-evaluation after the first revision; etc.46334634      format: int3246354636    - `outcome_id: string`46374638      The `outc_` ID of the outcome being evaluated.46394640    - `processed_at: string`46414642      A timestamp in RFC 3339 format46434644      format: date-time46454646  - `BetaManagedAgentsSpanOutcomeEvaluationEndEvent object`46474648    Emitted when an outcome evaluation cycle completes. Carries the verdict and aggregate token usage. A verdict of `needs_revision` means another evaluation cycle follows; `satisfied`, `max_iterations_reached`, `failed`, or `interrupted` are terminal — no further evaluation cycles follow.46494650    - `type: "span.outcome_evaluation_end"`46514652    - `id: string`46534654      Unique identifier for this event.46554656    - `explanation: string`46574658      Human-readable explanation of the verdict. For `needs_revision`, describes which criteria failed and why.46594660    - `iteration: number`46614662      0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.46634664      format: int3246654666    - `outcome_evaluation_start_id: string`46674668      The id of the corresponding `span.outcome_evaluation_start` event.46694670    - `outcome_id: string`46714672      The `outc_` ID of the outcome being evaluated.46734674    - `processed_at: string`46754676      A timestamp in RFC 3339 format46774678      format: date-time46794680    - `result: string`46814682      Evaluation verdict. 'satisfied': criteria met, session goes idle. 'needs_revision': criteria not met, another revision cycle follows. 'max_iterations_reached': evaluation budget exhausted with criteria still unmet — one final acknowledgment turn follows before the session goes idle, but no further evaluation runs. 'failed': grader determined the rubric does not apply to the deliverables. 'interrupted': user sent an interrupt while evaluation was in progress.46834684    - `usage: BetaManagedAgentsSpanModelUsage`46854686      Token usage for a single model request.46874688      - `cache_creation_input_tokens: number`46894690        Tokens used to create prompt cache in this request.46914692        format: int3246934694      - `cache_read_input_tokens: number`46954696        Tokens read from prompt cache in this request.46974698        format: int3246994700      - `input_tokens: number`47014702        Input tokens consumed by this request.47034704        format: int3247054706      - `output_tokens: number`47074708        Output tokens generated by this request.47094710        format: int3247114712      - `speed: optional "standard" or "fast" or null`47134714        Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.47154716        - `"standard"`47174718        - `"fast"`47194720  - `BetaManagedAgentsSpanModelRequestStartEvent object`47214722    Emitted when a model request is initiated by the agent.47234724    - `type: "span.model_request_start"`47254726    - `id: string`47274728      Unique identifier for this event.47294730    - `processed_at: string`47314732      A timestamp in RFC 3339 format47334734      format: date-time47354736  - `BetaManagedAgentsSpanModelRequestEndEvent object`47374738    Emitted when a model request completes.47394740    - `type: "span.model_request_end"`47414742    - `id: string`47434744      Unique identifier for this event.47454746    - `is_error: boolean or null`47474748      Whether the model request resulted in an error.47494750    - `model_request_start_id: string`47514752      The id of the corresponding `span.model_request_start` event.47534754    - `model_usage: BetaManagedAgentsSpanModelUsage`47554756      Token usage for a single model request.47574758    - `processed_at: string`47594760      A timestamp in RFC 3339 format47614762      format: date-time47634764  - `BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent object`47654766    Periodic heartbeat emitted while an outcome evaluation cycle is in progress. Distinguishes 'evaluation is actively running' from 'evaluation is stuck' between the corresponding `span.outcome_evaluation_start` and `span.outcome_evaluation_end` events.47674768    - `type: "span.outcome_evaluation_ongoing"`47694770    - `id: string`47714772      Unique identifier for this event.47734774    - `iteration: number`47754776      0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.47774778      format: int3247794780    - `outcome_id: string`47814782      The `outc_` ID of the outcome being evaluated.47834784    - `processed_at: string`47854786      A timestamp in RFC 3339 format47874788      format: date-time47894790  - `BetaManagedAgentsUserDefineOutcomeEvent object`47914792    Echo of a `user.define_outcome` input event. Carries the server-generated `outcome_id` that subsequent `span.outcome_evaluation_*` events reference.47934794    - `type: "user.define_outcome"`47954796    - `id: string`47974798      Unique identifier for this event.47994800    - `description: string`48014802      What the agent should produce. Copied from the input event.48034804    - `max_iterations: number or null`48054806      Evaluate-then-revise cycles before giving up. Default 3, max 20.48074808      format: int3248094810    - `outcome_id: string`48114812      Server-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.48134814    - `processed_at: string`48154816      A timestamp in RFC 3339 format48174818      format: date-time48194820    - `rubric: BetaManagedAgentsFileRubric or BetaManagedAgentsTextRubric`48214822      Rubric for grading the quality of an outcome.48234824      - `BetaManagedAgentsFileRubric object`48254826        Rubric referenced by a file uploaded via the Files API.48274828        - `type: "file"`48294830        - `file_id: string`48314832          ID of the rubric file.48334834      - `BetaManagedAgentsTextRubric object`48354836        Rubric content provided inline as text.48374838        - `type: "text"`48394840        - `content: string`48414842          Rubric content. Plain text or markdown — the grader treats it as freeform text.48434844  - `BetaManagedAgentsSessionDeletedEvent object`48454846    Emitted when a session has been deleted. Terminates any active event stream — no further events will be emitted for this session.48474848    - `type: "session.deleted"`48494850    - `id: string`48514852      Unique identifier for this event.48534854    - `processed_at: string`48554856      A timestamp in RFC 3339 format48574858      format: date-time48594860  - `BetaManagedAgentsSessionThreadStatusRunningEvent object`48614862    A session thread has begun executing. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.48634864    - `type: "session.thread_status_running"`48654866    - `id: string`48674868      Unique identifier for this event.48694870    - `agent_name: string`48714872      Name of the agent the thread runs.48734874    - `processed_at: string`48754876      A timestamp in RFC 3339 format48774878      format: date-time48794880    - `session_thread_id: string`48814882      Public sthr_ ID of the thread that started running.48834884  - `BetaManagedAgentsSessionThreadStatusIdleEvent object`48854886    A session thread has yielded and is awaiting input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.48874888    - `type: "session.thread_status_idle"`48894890    - `id: string`48914892      Unique identifier for this event.48934894    - `agent_name: string`48954896      Name of the agent the thread runs.48974898    - `processed_at: string`48994900      A timestamp in RFC 3339 format49014902      format: date-time49034904    - `session_thread_id: string`49054906      Public sthr_ ID of the thread that went idle.49074908    - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or BetaManagedAgentsSessionBudgetReached`49094910      - `BetaManagedAgentsSessionEndTurn object`49114912        The agent completed its turn naturally and is ready for the next user message.49134914      - `BetaManagedAgentsSessionRequiresAction object`49154916        The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.49174918      - `BetaManagedAgentsSessionRetriesExhausted object`49194920        The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`.49214922      - `BetaManagedAgentsSessionBudgetReached object`49234924        The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget.49254926  - `BetaManagedAgentsSessionThreadStatusTerminatedEvent object`49274928    A session thread has terminated and will accept no further input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.49294930    - `type: "session.thread_status_terminated"`49314932    - `id: string`49334934      Unique identifier for this event.49354936    - `agent_name: string`49374938      Name of the agent the thread runs.49394940    - `processed_at: string`49414942      A timestamp in RFC 3339 format49434944      format: date-time49454946    - `session_thread_id: string`49474948      Public sthr_ ID of the thread that terminated.49494950  - `BetaManagedAgentsUserToolResultEvent object`49514952    Event sent by the client providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.49534954    - `type: "user.tool_result"`49554956    - `id: string`49574958      Unique identifier for this event.49594960    - `tool_use_id: string`49614962      The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.49634964    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`49654966      The result content returned by the tool.49674968      - `BetaManagedAgentsTextBlock object`49694970        Regular text content.49714972      - `BetaManagedAgentsImageBlock object`49734974        Image content specified directly as base64 data or as a reference via a URL.49754976      - `BetaManagedAgentsDocumentBlock object`49774978        Document content, either specified directly as base64 data, as text, or as a reference via a URL.49794980      - `BetaManagedAgentsSearchResultBlock object`49814982        A block containing a web search result.49834984    - `is_error: optional boolean or null`49854986      Whether the tool execution resulted in an error.49874988    - `processed_at: optional string or null`49894990      A timestamp in RFC 3339 format49914992      format: date-time49934994    - `session_thread_id: optional string or null`49954996      Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.49974998  - `BetaManagedAgentsSessionThreadStatusRescheduledEvent object`49995000    A session thread hit a transient error and is retrying automatically. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.50015002    - `type: "session.thread_status_rescheduled"`50035004    - `id: string`50055006      Unique identifier for this event.50075008    - `agent_name: string`50095010      Name of the agent the thread runs.50115012    - `processed_at: string`50135014      A timestamp in RFC 3339 format50155016      format: date-time50175018    - `session_thread_id: string`50195020      Public sthr_ ID of the thread that is retrying.50215022  - `BetaManagedAgentsSessionUpdatedEvent object`50235024    Emitted when an UpdateSession request changed at least one field. Carries only the fields that changed; absent fields were not part of the update. The new configuration applies from the next turn.50255026    - `type: "session.updated"`50275028    - `id: string`50295030      Unique identifier for this event.50315032    - `processed_at: string`50335034      A timestamp in RFC 3339 format50355036      format: date-time50375038    - `agent: optional BetaManagedAgentsSessionAgent or null`50395040      Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.50415042      - `type: "agent"`50435044      - `id: string`50455046      - `description: string or null`50475048      - `mcp_servers: array of BetaManagedAgentsMCPServerURLDefinition`50495050        - `type: "url"`50515052        - `name: string`50535054        - `url: string`50555056      - `model: BetaManagedAgentsModelConfig`50575058        Model identifier and configuration.50595060        - `id: BetaManagedAgentsModel`50615062          The model that will power your agent.50635064          See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.50655066          - `"claude-fable-5-1" or "claude-sonnet-5" or "claude-fable-5" or 11 more`50675068            The model that will power your agent.50695070            See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.50715072            - `"claude-fable-5-1"`50735074              Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows50755076            - `"claude-sonnet-5"`50775078              High-performance model for coding and agents50795080            - `"claude-fable-5"`50815082              Next generation of intelligence for the hardest knowledge work and coding problems50835084            - `"claude-opus-5"`50855086              Powerful intelligence for long-running agents and coding50875088            - `"claude-opus-4-8"`50895090              Powerful intelligence for long-running agents and coding50915092            - `"claude-opus-4-7"`50935094              Powerful intelligence for long-running agents and coding50955096            - `"claude-opus-4-6"`50975098              Powerful intelligence for long-running agents and coding50995100            - `"claude-sonnet-4-6"`51015102              Best combination of speed and intelligence51035104            - `"claude-haiku-4-5"`51055106              Fastest model with near-frontier intelligence51075108            - `"claude-haiku-4-5-20251001"`51095110              Fastest model with near-frontier intelligence51115112            - `"claude-opus-4-5"`51135114              Powerful intelligence for long-running agents and coding51155116            - `"claude-opus-4-5-20251101"`51175118              Powerful intelligence for long-running agents and coding51195120            - `"claude-sonnet-4-5"`51215122              High-performance model for agents and coding51235124            - `"claude-sonnet-4-5-20250929"`51255126              High-performance model for agents and coding51275128          - `string`51295130        - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more`51315132          How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.51335134          - `BetaManagedAgentsEffortLow object`51355136            Low effort. Favors latency over reasoning depth.51375138            - `type: "low"`51395140          - `BetaManagedAgentsEffortMedium object`51415142            Medium effort. Balances latency and reasoning depth.51435144            - `type: "medium"`51455146          - `BetaManagedAgentsEffortHigh object`51475148            High effort. Favors reasoning depth.51495150            - `type: "high"`51515152          - `BetaManagedAgentsEffortXhigh object`51535154            Extra-high effort. Not all models accept this level.51555156            - `type: "xhigh"`51575158          - `BetaManagedAgentsEffortMax object`51595160            Maximum effort. Favors reasoning depth over latency.51615162            - `type: "max"`51635164        - `inference_geo: optional string`51655166          Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.51675168        - `speed: optional "standard" or "fast"`51695170          Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.51715172          - `"standard"`51735174          - `"fast"`51755176      - `multiagent: BetaManagedAgentsSessionMultiagentCoordinator or null`51775178        Resolved coordinator topology with full agent definitions for each roster member.51795180        - `type: "coordinator"`51815182        - `agents: array of BetaManagedAgentsSessionThreadAgent or BetaManagedAgentsAdvisor`51835184          Full `agent` definitions the coordinator may spawn as session threads.51855186          - `BetaManagedAgentsSessionThreadAgent object`51875188            Resolved `agent` definition for a single `session_thread`. Snapshot of the agent at thread creation time. The multiagent roster is not repeated here; read it from `Session.agent`.51895190            - `type: "agent"`51915192            - `id: string`51935194            - `description: string or null`51955196            - `mcp_servers: array of BetaManagedAgentsMCPServerURLDefinition`51975198              - `type: "url"`51995200              - `name: string`52015202              - `url: string`52035204            - `model: BetaManagedAgentsModelConfig`52055206              Model identifier and configuration.52075208            - `name: string`52095210            - `skills: array of BetaManagedAgentsAnthropicSkill or BetaManagedAgentsCustomSkill`52115212              - `BetaManagedAgentsAnthropicSkill object`52135214                A resolved Anthropic-managed skill.52155216                - `type: "anthropic"`52175218                - `skill_id: string`52195220                - `version: string`52215222              - `BetaManagedAgentsCustomSkill object`52235224                A resolved user-created custom skill.52255226                - `type: "custom"`52275228                - `skill_id: string`52295230                - `version: string`52315232            - `system: string or null`52335234            - `tools: array of BetaManagedAgentsAgentToolset20260401 or BetaManagedAgentsMCPToolset or BetaManagedAgentsCustomTool`52355236              - `BetaManagedAgentsAgentToolset20260401 object`52375238                - `type: "agent_toolset_20260401"`52395240                - `configs: array of BetaManagedAgentsAgentToolConfig`52415242                  - `BetaManagedAgentsBashToolConfig object`52435244                    Configuration for the bash tool.52455246                    - `type: "bash"`52475248                    - `enabled: boolean`52495250                    - `name: "bash"`52515252                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`52535254                      Permission policy for tool execution.52555256                      - `BetaManagedAgentsAlwaysAllowPolicy object`52575258                        Tool calls are automatically approved without user confirmation.52595260                        - `type: "always_allow"`52615262                      - `BetaManagedAgentsAlwaysAskPolicy object`52635264                        Tool calls require user confirmation before execution.52655266                        - `type: "always_ask"`52675268                      - `BetaManagedAgentsAutoPolicy object`52695270                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.52715272                        - `type: "auto"`52735274                  - `BetaManagedAgentsEditToolConfig object`52755276                    Configuration for the edit tool.52775278                    - `type: "edit"`52795280                    - `enabled: boolean`52815282                    - `name: "edit"`52835284                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`52855286                      Permission policy for tool execution.52875288                      - `BetaManagedAgentsAlwaysAllowPolicy object`52895290                        Tool calls are automatically approved without user confirmation.52915292                      - `BetaManagedAgentsAlwaysAskPolicy object`52935294                        Tool calls require user confirmation before execution.52955296                      - `BetaManagedAgentsAutoPolicy object`52975298                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.52995300                  - `BetaManagedAgentsReadToolConfig object`53015302                    Configuration for the read tool.53035304                    - `type: "read"`53055306                    - `enabled: boolean`53075308                    - `name: "read"`53095310                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`53115312                      Permission policy for tool execution.53135314                      - `BetaManagedAgentsAlwaysAllowPolicy object`53155316                        Tool calls are automatically approved without user confirmation.53175318                      - `BetaManagedAgentsAlwaysAskPolicy object`53195320                        Tool calls require user confirmation before execution.53215322                      - `BetaManagedAgentsAutoPolicy object`53235324                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.53255326                  - `BetaManagedAgentsWriteToolConfig object`53275328                    Configuration for the write tool.53295330                    - `type: "write"`53315332                    - `enabled: boolean`53335334                    - `name: "write"`53355336                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`53375338                      Permission policy for tool execution.53395340                      - `BetaManagedAgentsAlwaysAllowPolicy object`53415342                        Tool calls are automatically approved without user confirmation.53435344                      - `BetaManagedAgentsAlwaysAskPolicy object`53455346                        Tool calls require user confirmation before execution.53475348                      - `BetaManagedAgentsAutoPolicy object`53495350                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.53515352                  - `BetaManagedAgentsGlobToolConfig object`53535354                    Configuration for the glob tool.53555356                    - `type: "glob"`53575358                    - `enabled: boolean`53595360                    - `name: "glob"`53615362                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`53635364                      Permission policy for tool execution.53655366                      - `BetaManagedAgentsAlwaysAllowPolicy object`53675368                        Tool calls are automatically approved without user confirmation.53695370                      - `BetaManagedAgentsAlwaysAskPolicy object`53715372                        Tool calls require user confirmation before execution.53735374                      - `BetaManagedAgentsAutoPolicy object`53755376                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.53775378                  - `BetaManagedAgentsGrepToolConfig object`53795380                    Configuration for the grep tool.53815382                    - `type: "grep"`53835384                    - `enabled: boolean`53855386                    - `name: "grep"`53875388                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`53895390                      Permission policy for tool execution.53915392                      - `BetaManagedAgentsAlwaysAllowPolicy object`53935394                        Tool calls are automatically approved without user confirmation.53955396                      - `BetaManagedAgentsAlwaysAskPolicy object`53975398                        Tool calls require user confirmation before execution.53995400                      - `BetaManagedAgentsAutoPolicy object`54015402                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.54035404                  - `BetaManagedAgentsWebFetchToolConfig object`54055406                    Configuration for the web_fetch tool.54075408                    - `type: "web_fetch"`54095410                    - `enabled: boolean`54115412                    - `name: "web_fetch"`54135414                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`54155416                      Permission policy for tool execution.54175418                      - `BetaManagedAgentsAlwaysAllowPolicy object`54195420                        Tool calls are automatically approved without user confirmation.54215422                      - `BetaManagedAgentsAlwaysAskPolicy object`54235424                        Tool calls require user confirmation before execution.54255426                      - `BetaManagedAgentsAutoPolicy object`54275428                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.54295430                    - `allowed_domains: optional array of string`54315432                    - `blocked_domains: optional array of string`54335434                    - `max_content_tokens: optional number or null`54355436                      format: int3254375438                  - `BetaManagedAgentsWebSearchToolConfig object`54395440                    Configuration for the web_search tool.54415442                    - `type: "web_search"`54435444                    - `enabled: boolean`54455446                    - `name: "web_search"`54475448                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`54495450                      Permission policy for tool execution.54515452                      - `BetaManagedAgentsAlwaysAllowPolicy object`54535454                        Tool calls are automatically approved without user confirmation.54555456                      - `BetaManagedAgentsAlwaysAskPolicy object`54575458                        Tool calls require user confirmation before execution.54595460                      - `BetaManagedAgentsAutoPolicy object`54615462                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.54635464                    - `allowed_domains: optional array of string`54655466                    - `blocked_domains: optional array of string`54675468                    - `user_location: optional BetaManagedAgentsUserLocation or null`54695470                      Approximate user location for search result localization.54715472                      - `type: "approximate"`54735474                        Location precision. Only "approximate" is supported.54755476                      - `city: optional string or null`54775478                        City name.54795480                        minLength: 1, maxLength: 25554815482                      - `country: optional string or null`54835484                        Two-letter ISO 3166-1 country code, uppercase.54855486                      - `region: optional string or null`54875488                        Region or state name.54895490                        minLength: 1, maxLength: 25554915492                      - `timezone: optional string or null`54935494                        IANA timezone identifier, e.g. "America/Los_Angeles".54955496                        minLength: 1, maxLength: 25554975498                - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`54995500                  Resolved default configuration for agent tools.55015502                  - `enabled: boolean`55035504                  - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`55055506                    Permission policy for tool execution.55075508                    - `BetaManagedAgentsAlwaysAllowPolicy object`55095510                      Tool calls are automatically approved without user confirmation.55115512                    - `BetaManagedAgentsAlwaysAskPolicy object`55135514                      Tool calls require user confirmation before execution.55155516                    - `BetaManagedAgentsAutoPolicy object`55175518                      The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.55195520              - `BetaManagedAgentsMCPToolset object`55215522                - `type: "mcp_toolset"`55235524                - `configs: array of BetaManagedAgentsMCPToolConfig`55255526                  - `enabled: boolean`55275528                  - `name: string`55295530                  - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`55315532                    Permission policy for tool execution.55335534                    - `BetaManagedAgentsAlwaysAllowPolicy object`55355536                      Tool calls are automatically approved without user confirmation.55375538                    - `BetaManagedAgentsAlwaysAskPolicy object`55395540                      Tool calls require user confirmation before execution.55415542                    - `BetaManagedAgentsAutoPolicy object`55435544                      The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.55455546                - `default_config: BetaManagedAgentsMCPToolsetDefaultConfig`55475548                  Resolved default configuration for all tools from an MCP server.55495550                  - `enabled: boolean`55515552                  - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`55535554                    Permission policy for tool execution.55555556                    - `BetaManagedAgentsAlwaysAllowPolicy object`55575558                      Tool calls are automatically approved without user confirmation.55595560                    - `BetaManagedAgentsAlwaysAskPolicy object`55615562                      Tool calls require user confirmation before execution.55635564                    - `BetaManagedAgentsAutoPolicy object`55655566                      The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.55675568                - `mcp_server_name: string`55695570              - `BetaManagedAgentsCustomTool object`55715572                A custom tool as returned in API responses.55735574                - `type: "custom"`55755576                - `description: string`55775578                - `input_schema: BetaManagedAgentsCustomToolInputSchema`55795580                  JSON Schema for custom tool input parameters.55815582                  - `type: "object"`55835584                  - `properties: optional map[unknown] or null`55855586                  - `required: optional array of string or null`55875588                - `name: string`55895590            - `version: number`55915592              format: int3255935594          - `BetaManagedAgentsAdvisor object`55955596            Platform advisor roster entry: a model the session's primary thread may consult mid-turn.55975598            - `type: "advisor"`55995600            - `model: string`56015602              The advisor model id.56035604      - `name: string`56055606      - `skills: array of BetaManagedAgentsAnthropicSkill or BetaManagedAgentsCustomSkill`56075608        - `BetaManagedAgentsAnthropicSkill object`56095610          A resolved Anthropic-managed skill.56115612        - `BetaManagedAgentsCustomSkill object`56135614          A resolved user-created custom skill.56155616      - `system: string or null`56175618      - `tools: array of BetaManagedAgentsAgentToolset20260401 or BetaManagedAgentsMCPToolset or BetaManagedAgentsCustomTool`56195620        - `BetaManagedAgentsAgentToolset20260401 object`56215622        - `BetaManagedAgentsMCPToolset object`56235624        - `BetaManagedAgentsCustomTool object`56255626          A custom tool as returned in API responses.56275628      - `version: number`56295630        format: int3256315632    - `budget: optional BetaManagedAgentsBudgetLimit or null`56335634      A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.56355636      - `type: "limit"`56375638      - `max_list_cost: BetaMonetaryAmount`56395640        A monetary amount in a specific currency.56415642        - `amount: string`56435644          Amount in minor units of the currency, as an integer decimal string with no leading zeros: "2500" is $25.00 and "50" is fifty cents. A string rather than a number so no float rounding is ever applied.56455646        - `currency: BetaCurrency`56475648          Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced.56495650    - `metadata: optional map[string]`56515652      The session's full metadata bag after the update. Present when the update set non-empty metadata; absent when metadata was unchanged or cleared to empty.56535654    - `title: optional string or null`56555656      The session's new title. Present only when the update changed it.56575658  - `BetaManagedAgentsStartEvent object`56595660    Opens a preview of a buffered event. Carries the previewed event's type and id only. Followed by zero or more event_delta events with the same event id, normally concluded by the buffered event carrying that id. If the producing model request ends without that event (an error or interrupt mid-stream), its terminal span.model_request_end closes the preview. Only sent on stream connections that opt in via event_deltas; never appears in event history.56615662    - `type: "event_start"`56635664    - `event: BetaManagedAgentsStartEventPreview`56655666      The previewed event's type and id. The event type determines which delta types the preview's event_delta events carry: agent.message events stream content_delta fragments; agent.thinking previews are start-only — no deltas follow, and the buffered agent.thinking with the same id concludes them.56675668      - `BetaManagedAgentsAgentMessagePreview object`56695670        - `type: "agent.message"`56715672        - `id: string`56735674          The id the buffered agent.message will carry if it is emitted. Matches the event_id on this preview's event_delta events.56755676      - `BetaManagedAgentsAgentThinkingPreview object`56775678        - `type: "agent.thinking"`56795680        - `id: string`56815682          The id the buffered agent.thinking will carry if it is emitted. Start-only — no event_delta events follow.56835684  - `BetaManagedAgentsDeltaEvent object`56855686    An incremental update to an event that is still being streamed. Deltas are best-effort and may stop early; when the buffered event with id == event_id is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no buffered event — its terminal span.model_request_end closes the preview. Only sent on stream connections that opt in via event_deltas; never appears in event history.56875688    - `type: "event_delta"`56895690    - `delta: BetaManagedAgentsDeltaContent`56915692      One fragment of the previewed event. The delta type is named for the previewed event's field it streams into: agent.message events stream content_delta fragments, each a partial element of the content array.56935694      - `type: "content_delta"`56955696      - `content: BetaManagedAgentsTextBlock`56975698        Regular text content.56995700      - `index: optional number`57015702        Which entry in the previewed event's content array this fragment lands in. Insert content as that entry when the index is new; append to the existing entry otherwise.57035704        format: uint3257055706    - `event_id: string`57075708      The id of the event being previewed. Matches event.id on the corresponding event_start and the buffered event that reconciles the preview.57095710  - `BetaManagedAgentsSystemMessageEvent object`57115712    A mid-conversation system message event. Carries system-role content that is appended to the session as a `role: "system"` turn.57135714    - `type: "system.message"`57155716    - `id: string`57175718      Unique identifier for this event.57195720    - `content: array of BetaManagedAgentsSystemContentBlock`57215722      System content blocks. Text-only.57235724      - `type: "text"`57255726      - `text: string`57275728        The text content.57295730        minLength: 157315732    - `processed_at: optional string or null`57335734      A timestamp in RFC 3339 format57355736      format: date-time57375738  - `BetaManagedAgentsSessionUsageEvent object`57395740    Periodic snapshot of the session's cumulative usage and tracked list cost.57415742    - `type: "session.usage"`57435744    - `id: string`57455746      Unique identifier for this event.57475748    - `processed_at: string`57495750      A timestamp in RFC 3339 format57515752      format: date-time57535754    - `usage: BetaManagedAgentsSessionUsageSnapshot`57555756      Point-in-time snapshot of a session's cumulative usage.57575758      - `active_seconds: optional number`57595760        Cumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once. This is the duration the session's runtime cost is priced on.57615762        format: double57635764      - `cache_creation: optional BetaManagedAgentsCacheCreationUsage`57655766        Prompt-cache creation token usage broken down by cache lifetime.57675768        - `ephemeral_1h_input_tokens: optional number`57695770          Tokens used to create 1-hour ephemeral cache entries.57715772          format: int3257735774        - `ephemeral_5m_input_tokens: optional number`57755776          Tokens used to create 5-minute ephemeral cache entries.57775778          format: int3257795780      - `cache_read_input_tokens: optional number`57815782        Total tokens read from prompt cache.57835784        format: int3257855786      - `input_tokens: optional number`57875788        Total input tokens consumed across all turns.57895790        format: int3257915792      - `list_cost: optional BetaMonetaryAmount`57935794        A monetary amount in a specific currency.57955796      - `output_tokens: optional number`57975798        Total output tokens generated across all turns.57995800        format: int3258015802      - `server_tool_use: optional BetaManagedAgentsServerToolUsage`58035804        Cumulative count of server-executed tool invocations, broken down by tool.58055806        - `web_fetch_requests: optional number`58075808          Number of server-executed web fetch requests.58095810          format: int3258115812        - `web_search_requests: optional number`58135814          Number of server-executed web search requests.58155816          format: int3258175818    - `budget: optional BetaManagedAgentsBudgetLimit or null`58195820      A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.58215822### Example58235824```bash5825curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \5826    -H 'anthropic-version: 2023-06-01' \5827    -H 'anthropic-beta: managed-agents-2026-04-01' \5828    -H "X-Api-Key: $ANTHROPIC_API_KEY"5829```58305831#### Response (200)58325833```json5834{5835  "id": "sevt_011CZkZGOp0iBcp4kaQSihUmy",5836  "content": [5837    {5838      "text": "Where is my order #1234?",5839      "type": "text"5840    }5841  ],5842  "type": "user.message",5843  "processed_at": "2026-03-15T10:00:00Z"5844}5845```58465847## Domain types58485849### Beta Managed Agents Agent Auto Evaluated Permission58505851- `BetaManagedAgentsAgentAutoEvaluatedPermission = BetaManagedAgentsAgentAutoEvaluatedPermissionAllow or BetaManagedAgentsAgentAutoEvaluatedPermissionAsk or BetaManagedAgentsAgentAutoEvaluatedPermissionDeny`58525853  The server's per-invocation judgement under the auto permission policy. Its type always equals the event's top-level evaluated_permission. Open union: clients must tolerate unknown variants.58545855  - `BetaManagedAgentsAgentAutoEvaluatedPermissionAllow object`58565857    The server judged the invocation safe to execute without client approval.58585859    - `type: "allow"`58605861  - `BetaManagedAgentsAgentAutoEvaluatedPermissionAsk object`58625863    The server reached no judgement; the invocation is held for client approval.58645865    - `type: "ask"`58665867    - `reason_code: string`58685869      The judgement's grounds in registry-bound terms, for client branching and audit rather than end-user display. Open registry; currently "indeterminate" (no judgement was reached). Clients must tolerate values outside this set.58705871      maxLength: 6458725873  - `BetaManagedAgentsAgentAutoEvaluatedPermissionDeny object`58745875    The server judged the invocation high-risk; it does not execute and a synthetic error tool result is appended.58765877    - `type: "deny"`58785879    - `reason_code: string`58805881      The judgement's grounds in registry-bound terms. Open registry; currently "high_risk" (judged high-risk; the call does not run). Clients must tolerate values outside this set.58825883      maxLength: 6458845885### Beta Managed Agents Agent Auto Evaluated Permission Allow58865887- `BetaManagedAgentsAgentAutoEvaluatedPermissionAllow object`58885889  The server judged the invocation safe to execute without client approval.58905891  - `type: "allow"`58925893### Beta Managed Agents Agent Auto Evaluated Permission Ask58945895- `BetaManagedAgentsAgentAutoEvaluatedPermissionAsk object`58965897  The server reached no judgement; the invocation is held for client approval.58985899  - `type: "ask"`59005901  - `reason_code: string`59025903    The judgement's grounds in registry-bound terms, for client branching and audit rather than end-user display. Open registry; currently "indeterminate" (no judgement was reached). Clients must tolerate values outside this set.59045905    maxLength: 6459065907### Beta Managed Agents Agent Auto Evaluated Permission Deny59085909- `BetaManagedAgentsAgentAutoEvaluatedPermissionDeny object`59105911  The server judged the invocation high-risk; it does not execute and a synthetic error tool result is appended.59125913  - `type: "deny"`59145915  - `reason_code: string`59165917    The judgement's grounds in registry-bound terms. Open registry; currently "high_risk" (judged high-risk; the call does not run). Clients must tolerate values outside this set.59185919    maxLength: 6459205921### Beta Managed Agents Agent Custom Tool Use Event59225923- `BetaManagedAgentsAgentCustomToolUseEvent object`59245925  Event emitted when the agent calls a custom tool. The session goes idle until the client sends a `user.custom_tool_result` event with the result.59265927  - `type: "agent.custom_tool_use"`59285929  - `id: string`59305931    Unique identifier for this event.59325933  - `input: map[unknown]`59345935    Input parameters for the tool call.59365937  - `name: string`59385939    Name of the custom tool being called.59405941  - `processed_at: string`59425943    A timestamp in RFC 3339 format59445945    format: date-time59465947  - `session_thread_id: optional string or null`59485949    When set, this event was cross-posted from a subagent's thread to surface its custom tool use on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.custom_tool_result` by `custom_tool_use_id`, so clients do not send it back.59505951### Beta Managed Agents Agent MCP Tool Result Event59525953- `BetaManagedAgentsAgentMCPToolResultEvent object`59545955  Event representing the result of an MCP tool execution.59565957  - `type: "agent.mcp_tool_result"`59585959  - `id: string`59605961    Unique identifier for this event.59625963  - `mcp_tool_use_id: string`59645965    The id of the `agent.mcp_tool_use` event this result corresponds to.59665967  - `processed_at: string`59685969    A timestamp in RFC 3339 format59705971    format: date-time59725973  - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`59745975    The result content returned by the tool.59765977    - `BetaManagedAgentsTextBlock object`59785979      Regular text content.59805981      - `type: "text"`59825983      - `text: string`59845985        The text content.59865987        minLength: 159885989    - `BetaManagedAgentsImageBlock object`59905991      Image content specified directly as base64 data or as a reference via a URL.59925993      - `type: "image"`59945995      - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`59965997        Union type for image source variants.59985999        - `BetaManagedAgentsBase64ImageSource object`60006001          Base64-encoded image data.60026003          - `type: "base64"`60046005          - `data: string`60066007            Base64-encoded image data.60086009            minLength: 160106011          - `media_type: string`60126013            MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").60146015            minLength: 160166017        - `BetaManagedAgentsURLImageSource object`60186019          Image referenced by URL.60206021          - `type: "url"`60226023          - `url: string`60246025            URL of the image to fetch.60266027            minLength: 160286029        - `BetaManagedAgentsFileImageSource object`60306031          Image referenced by file ID.60326033          - `type: "file"`60346035          - `file_id: string`60366037            ID of a previously uploaded file.60386039            minLength: 160406041    - `BetaManagedAgentsDocumentBlock object`60426043      Document content, either specified directly as base64 data, as text, or as a reference via a URL.60446045      - `type: "document"`60466047      - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`60486049        Union type for document source variants.60506051        - `BetaManagedAgentsBase64DocumentSource object`60526053          Base64-encoded document data.60546055          - `type: "base64"`60566057          - `data: string`60586059            Base64-encoded document data.60606061            minLength: 160626063          - `media_type: string`60646065            MIME type of the document (e.g., "application/pdf").60666067            minLength: 160686069        - `BetaManagedAgentsPlainTextDocumentSource object`60706071          Plain text document content.60726073          - `type: "text"`60746075          - `data: string`60766077            The plain text content.60786079            minLength: 160806081          - `media_type: "text/plain"`60826083            MIME type of the text content. Must be "text/plain".60846085        - `BetaManagedAgentsURLDocumentSource object`60866087          Document referenced by URL.60886089          - `type: "url"`60906091          - `url: string`60926093            URL of the document to fetch.60946095            minLength: 160966097        - `BetaManagedAgentsFileDocumentSource object`60986099          Document referenced by file ID.61006101          - `type: "file"`61026103          - `file_id: string`61046105            ID of a previously uploaded file.61066107            minLength: 161086109      - `context: optional string or null`61106111        Additional context about the document for the model.61126113      - `title: optional string or null`61146115        The title of the document.61166117    - `BetaManagedAgentsSearchResultBlock object`61186119      A block containing a web search result.61206121      - `type: "search_result"`61226123      - `citations: BetaManagedAgentsSearchResultCitations`61246125        Citation settings for a search result.61266127        - `enabled: boolean`61286129          Whether citations are enabled for this search result.61306131      - `content: array of BetaManagedAgentsSearchResultContent`61326133        Array of text content blocks from the search result.61346135        - `type: "text"`61366137        - `text: string`61386139          The text content.61406141          minLength: 161426143      - `source: string`61446145        The URL source of the search result.61466147        minLength: 161486149      - `title: string`61506151        The title of the search result.61526153        minLength: 161546155  - `is_error: optional boolean or null`61566157    Whether the tool execution resulted in an error.61586159### Beta Managed Agents Agent MCP Tool Use Event61606161- `BetaManagedAgentsAgentMCPToolUseEvent object`61626163  Event emitted when the agent invokes a tool provided by an MCP server.61646165  - `type: "agent.mcp_tool_use"`61666167  - `id: string`61686169    Unique identifier for this event.61706171  - `input: map[unknown]`61726173    Input parameters for the tool call.61746175  - `mcp_server_name: string`61766177    Name of the MCP server providing the tool.61786179  - `name: string`61806181    Name of the MCP tool being used.61826183  - `processed_at: string`61846185    A timestamp in RFC 3339 format61866187    format: date-time61886189  - `evaluated_permission: optional "allow" or "ask" or "deny"`61906191    AgentEvaluatedPermission enum61926193    - `"allow"`61946195    - `"ask"`61966197    - `"deny"`61986199  - `evaluation: optional BetaManagedAgentsAgentToolEvaluation`62006201    Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.62026203    - `BetaManagedAgentsAgentToolEvaluationAlwaysAllow object`62046205      The resolved permission_policy was always_allow; accompanies evaluated_permission "allow".62066207      - `type: "always_allow"`62086209    - `BetaManagedAgentsAgentToolEvaluationAlwaysAsk object`62106211      The resolved permission_policy was always_ask; accompanies evaluated_permission "ask".62126213      - `type: "always_ask"`62146215    - `BetaManagedAgentsAgentToolEvaluationAuto object`62166217      The resolved permission_policy was auto: the server judged this invocation individually.62186219      - `type: "auto"`62206221      - `evaluated_permission: BetaManagedAgentsAgentAutoEvaluatedPermission`62226223        The server's per-invocation judgement under the auto permission policy. Its type always equals the event's top-level evaluated_permission. Open union: clients must tolerate unknown variants.62246225        - `BetaManagedAgentsAgentAutoEvaluatedPermissionAllow object`62266227          The server judged the invocation safe to execute without client approval.62286229          - `type: "allow"`62306231        - `BetaManagedAgentsAgentAutoEvaluatedPermissionAsk object`62326233          The server reached no judgement; the invocation is held for client approval.62346235          - `type: "ask"`62366237          - `reason_code: string`62386239            The judgement's grounds in registry-bound terms, for client branching and audit rather than end-user display. Open registry; currently "indeterminate" (no judgement was reached). Clients must tolerate values outside this set.62406241            maxLength: 6462426243        - `BetaManagedAgentsAgentAutoEvaluatedPermissionDeny object`62446245          The server judged the invocation high-risk; it does not execute and a synthetic error tool result is appended.62466247          - `type: "deny"`62486249          - `reason_code: string`62506251            The judgement's grounds in registry-bound terms. Open registry; currently "high_risk" (judged high-risk; the call does not run). Clients must tolerate values outside this set.62526253            maxLength: 6462546255  - `session_thread_id: optional string or null`62566257    When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` by `tool_use_id`, so clients do not send it back.62586259### Beta Managed Agents Agent Message Event62606261- `BetaManagedAgentsAgentMessageEvent object`62626263  An agent response event in the session conversation.62646265  - `type: "agent.message"`62666267  - `id: string`62686269    Unique identifier for this event.62706271  - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsRedactedBlock`62726273    Array of text blocks comprising the agent response.62746275    - `BetaManagedAgentsTextBlock object`62766277      Regular text content.62786279      - `type: "text"`62806281      - `text: string`62826283        The text content.62846285        minLength: 162866287    - `BetaManagedAgentsRedactedBlock object`62886289      Placeholder for content withheld by Anthropic model policy.62906291      - `type: "redacted"`62926293  - `processed_at: string`62946295    A timestamp in RFC 3339 format62966297    format: date-time62986299### Beta Managed Agents Agent Thinking Event63006301- `BetaManagedAgentsAgentThinkingEvent object`63026303  Indicates the agent is making forward progress via extended thinking. A progress signal, not a content carrier.63046305  - `type: "agent.thinking"`63066307  - `id: string`63086309    Unique identifier for this event.63106311  - `processed_at: string`63126313    A timestamp in RFC 3339 format63146315    format: date-time63166317### Beta Managed Agents Agent Thread Context Compacted Event63186319- `BetaManagedAgentsAgentThreadContextCompactedEvent object`63206321  Indicates that context compaction (summarization) occurred during the session.63226323  - `type: "agent.thread_context_compacted"`63246325  - `id: string`63266327    Unique identifier for this event.63286329  - `processed_at: string`63306331    A timestamp in RFC 3339 format63326333    format: date-time63346335### Beta Managed Agents Agent Thread Message Received Event63366337- `BetaManagedAgentsAgentThreadMessageReceivedEvent object`63386339  Delivery event written to the target thread's input stream when an agent-to-agent message arrives.63406341  - `type: "agent.thread_message_received"`63426343  - `id: string`63446345    Unique identifier for this event.63466347  - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`63486349    Message content blocks.63506351    - `BetaManagedAgentsTextBlock object`63526353      Regular text content.63546355      - `type: "text"`63566357      - `text: string`63586359        The text content.63606361        minLength: 163626363    - `BetaManagedAgentsImageBlock object`63646365      Image content specified directly as base64 data or as a reference via a URL.63666367      - `type: "image"`63686369      - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`63706371        Union type for image source variants.63726373        - `BetaManagedAgentsBase64ImageSource object`63746375          Base64-encoded image data.63766377          - `type: "base64"`63786379          - `data: string`63806381            Base64-encoded image data.63826383            minLength: 163846385          - `media_type: string`63866387            MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").63886389            minLength: 163906391        - `BetaManagedAgentsURLImageSource object`63926393          Image referenced by URL.63946395          - `type: "url"`63966397          - `url: string`63986399            URL of the image to fetch.64006401            minLength: 164026403        - `BetaManagedAgentsFileImageSource object`64046405          Image referenced by file ID.64066407          - `type: "file"`64086409          - `file_id: string`64106411            ID of a previously uploaded file.64126413            minLength: 164146415    - `BetaManagedAgentsDocumentBlock object`64166417      Document content, either specified directly as base64 data, as text, or as a reference via a URL.64186419      - `type: "document"`64206421      - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`64226423        Union type for document source variants.64246425        - `BetaManagedAgentsBase64DocumentSource object`64266427          Base64-encoded document data.64286429          - `type: "base64"`64306431          - `data: string`64326433            Base64-encoded document data.64346435            minLength: 164366437          - `media_type: string`64386439            MIME type of the document (e.g., "application/pdf").64406441            minLength: 164426443        - `BetaManagedAgentsPlainTextDocumentSource object`64446445          Plain text document content.64466447          - `type: "text"`64486449          - `data: string`64506451            The plain text content.64526453            minLength: 164546455          - `media_type: "text/plain"`64566457            MIME type of the text content. Must be "text/plain".64586459        - `BetaManagedAgentsURLDocumentSource object`64606461          Document referenced by URL.64626463          - `type: "url"`64646465          - `url: string`64666467            URL of the document to fetch.64686469            minLength: 164706471        - `BetaManagedAgentsFileDocumentSource object`64726473          Document referenced by file ID.64746475          - `type: "file"`64766477          - `file_id: string`64786479            ID of a previously uploaded file.64806481            minLength: 164826483      - `context: optional string or null`64846485        Additional context about the document for the model.64866487      - `title: optional string or null`64886489        The title of the document.64906491    - `BetaManagedAgentsRedactedBlock object`64926493      Placeholder for content withheld by Anthropic model policy.64946495      - `type: "redacted"`64966497  - `from_session_thread_id: string`64986499    Public `sthr_` ID of the thread that sent the message.65006501  - `processed_at: string`65026503    A timestamp in RFC 3339 format65046505    format: date-time65066507  - `from_agent_name: optional string or null`65086509    Name of the callable agent this message came from. Absent when received from the primary agent.65106511### Beta Managed Agents Agent Thread Message Sent Event65126513- `BetaManagedAgentsAgentThreadMessageSentEvent object`65146515  Observability event emitted to the sender's output stream when an agent-to-agent message is sent.65166517  - `type: "agent.thread_message_sent"`65186519  - `id: string`65206521    Unique identifier for this event.65226523  - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`65246525    Message content blocks.65266527    - `BetaManagedAgentsTextBlock object`65286529      Regular text content.65306531      - `type: "text"`65326533      - `text: string`65346535        The text content.65366537        minLength: 165386539    - `BetaManagedAgentsImageBlock object`65406541      Image content specified directly as base64 data or as a reference via a URL.65426543      - `type: "image"`65446545      - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`65466547        Union type for image source variants.65486549        - `BetaManagedAgentsBase64ImageSource object`65506551          Base64-encoded image data.65526553          - `type: "base64"`65546555          - `data: string`65566557            Base64-encoded image data.65586559            minLength: 165606561          - `media_type: string`65626563            MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").65646565            minLength: 165666567        - `BetaManagedAgentsURLImageSource object`65686569          Image referenced by URL.65706571          - `type: "url"`65726573          - `url: string`65746575            URL of the image to fetch.65766577            minLength: 165786579        - `BetaManagedAgentsFileImageSource object`65806581          Image referenced by file ID.65826583          - `type: "file"`65846585          - `file_id: string`65866587            ID of a previously uploaded file.65886589            minLength: 165906591    - `BetaManagedAgentsDocumentBlock object`65926593      Document content, either specified directly as base64 data, as text, or as a reference via a URL.65946595      - `type: "document"`65966597      - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`65986599        Union type for document source variants.66006601        - `BetaManagedAgentsBase64DocumentSource object`66026603          Base64-encoded document data.66046605          - `type: "base64"`66066607          - `data: string`66086609            Base64-encoded document data.66106611            minLength: 166126613          - `media_type: string`66146615            MIME type of the document (e.g., "application/pdf").66166617            minLength: 166186619        - `BetaManagedAgentsPlainTextDocumentSource object`66206621          Plain text document content.66226623          - `type: "text"`66246625          - `data: string`66266627            The plain text content.66286629            minLength: 166306631          - `media_type: "text/plain"`66326633            MIME type of the text content. Must be "text/plain".66346635        - `BetaManagedAgentsURLDocumentSource object`66366637          Document referenced by URL.66386639          - `type: "url"`66406641          - `url: string`66426643            URL of the document to fetch.66446645            minLength: 166466647        - `BetaManagedAgentsFileDocumentSource object`66486649          Document referenced by file ID.66506651          - `type: "file"`66526653          - `file_id: string`66546655            ID of a previously uploaded file.66566657            minLength: 166586659      - `context: optional string or null`66606661        Additional context about the document for the model.66626663      - `title: optional string or null`66646665        The title of the document.66666667    - `BetaManagedAgentsRedactedBlock object`66686669      Placeholder for content withheld by Anthropic model policy.66706671      - `type: "redacted"`66726673  - `processed_at: string`66746675    A timestamp in RFC 3339 format66766677    format: date-time66786679  - `to_session_thread_id: string`66806681    Public `sthr_` ID of the thread the message was sent to.66826683  - `to_agent_name: optional string or null`66846685    Name of the callable agent this message was sent to. Absent when sent to the primary agent.66866687### Beta Managed Agents Agent Tool Evaluation66886689- `BetaManagedAgentsAgentToolEvaluation = BetaManagedAgentsAgentToolEvaluationAlwaysAllow or BetaManagedAgentsAgentToolEvaluationAlwaysAsk or BetaManagedAgentsAgentToolEvaluationAuto`66906691  Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.66926693  - `BetaManagedAgentsAgentToolEvaluationAlwaysAllow object`66946695    The resolved permission_policy was always_allow; accompanies evaluated_permission "allow".66966697    - `type: "always_allow"`66986699  - `BetaManagedAgentsAgentToolEvaluationAlwaysAsk object`67006701    The resolved permission_policy was always_ask; accompanies evaluated_permission "ask".67026703    - `type: "always_ask"`67046705  - `BetaManagedAgentsAgentToolEvaluationAuto object`67066707    The resolved permission_policy was auto: the server judged this invocation individually.67086709    - `type: "auto"`67106711    - `evaluated_permission: BetaManagedAgentsAgentAutoEvaluatedPermission`67126713      The server's per-invocation judgement under the auto permission policy. Its type always equals the event's top-level evaluated_permission. Open union: clients must tolerate unknown variants.67146715      - `BetaManagedAgentsAgentAutoEvaluatedPermissionAllow object`67166717        The server judged the invocation safe to execute without client approval.67186719        - `type: "allow"`67206721      - `BetaManagedAgentsAgentAutoEvaluatedPermissionAsk object`67226723        The server reached no judgement; the invocation is held for client approval.67246725        - `type: "ask"`67266727        - `reason_code: string`67286729          The judgement's grounds in registry-bound terms, for client branching and audit rather than end-user display. Open registry; currently "indeterminate" (no judgement was reached). Clients must tolerate values outside this set.67306731          maxLength: 6467326733      - `BetaManagedAgentsAgentAutoEvaluatedPermissionDeny object`67346735        The server judged the invocation high-risk; it does not execute and a synthetic error tool result is appended.67366737        - `type: "deny"`67386739        - `reason_code: string`67406741          The judgement's grounds in registry-bound terms. Open registry; currently "high_risk" (judged high-risk; the call does not run). Clients must tolerate values outside this set.67426743          maxLength: 6467446745### Beta Managed Agents Agent Tool Evaluation Always Allow67466747- `BetaManagedAgentsAgentToolEvaluationAlwaysAllow object`67486749  The resolved permission_policy was always_allow; accompanies evaluated_permission "allow".67506751  - `type: "always_allow"`67526753### Beta Managed Agents Agent Tool Evaluation Always Ask67546755- `BetaManagedAgentsAgentToolEvaluationAlwaysAsk object`67566757  The resolved permission_policy was always_ask; accompanies evaluated_permission "ask".67586759  - `type: "always_ask"`67606761### Beta Managed Agents Agent Tool Evaluation Auto67626763- `BetaManagedAgentsAgentToolEvaluationAuto object`67646765  The resolved permission_policy was auto: the server judged this invocation individually.67666767  - `type: "auto"`67686769  - `evaluated_permission: BetaManagedAgentsAgentAutoEvaluatedPermission`67706771    The server's per-invocation judgement under the auto permission policy. Its type always equals the event's top-level evaluated_permission. Open union: clients must tolerate unknown variants.67726773    - `BetaManagedAgentsAgentAutoEvaluatedPermissionAllow object`67746775      The server judged the invocation safe to execute without client approval.67766777      - `type: "allow"`67786779    - `BetaManagedAgentsAgentAutoEvaluatedPermissionAsk object`67806781      The server reached no judgement; the invocation is held for client approval.67826783      - `type: "ask"`67846785      - `reason_code: string`67866787        The judgement's grounds in registry-bound terms, for client branching and audit rather than end-user display. Open registry; currently "indeterminate" (no judgement was reached). Clients must tolerate values outside this set.67886789        maxLength: 6467906791    - `BetaManagedAgentsAgentAutoEvaluatedPermissionDeny object`67926793      The server judged the invocation high-risk; it does not execute and a synthetic error tool result is appended.67946795      - `type: "deny"`67966797      - `reason_code: string`67986799        The judgement's grounds in registry-bound terms. Open registry; currently "high_risk" (judged high-risk; the call does not run). Clients must tolerate values outside this set.68006801        maxLength: 6468026803### Beta Managed Agents Agent Tool Result Event68046805- `BetaManagedAgentsAgentToolResultEvent object`68066807  Event representing the result of an agent tool execution.68086809  - `type: "agent.tool_result"`68106811  - `id: string`68126813    Unique identifier for this event.68146815  - `processed_at: string`68166817    A timestamp in RFC 3339 format68186819    format: date-time68206821  - `tool_use_id: string`68226823    The id of the `agent.tool_use` event this result corresponds to.68246825  - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`68266827    The result content returned by the tool.68286829    - `BetaManagedAgentsTextBlock object`68306831      Regular text content.68326833      - `type: "text"`68346835      - `text: string`68366837        The text content.68386839        minLength: 168406841    - `BetaManagedAgentsImageBlock object`68426843      Image content specified directly as base64 data or as a reference via a URL.68446845      - `type: "image"`68466847      - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`68486849        Union type for image source variants.68506851        - `BetaManagedAgentsBase64ImageSource object`68526853          Base64-encoded image data.68546855          - `type: "base64"`68566857          - `data: string`68586859            Base64-encoded image data.68606861            minLength: 168626863          - `media_type: string`68646865            MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").68666867            minLength: 168686869        - `BetaManagedAgentsURLImageSource object`68706871          Image referenced by URL.68726873          - `type: "url"`68746875          - `url: string`68766877            URL of the image to fetch.68786879            minLength: 168806881        - `BetaManagedAgentsFileImageSource object`68826883          Image referenced by file ID.68846885          - `type: "file"`68866887          - `file_id: string`68886889            ID of a previously uploaded file.68906891            minLength: 168926893    - `BetaManagedAgentsDocumentBlock object`68946895      Document content, either specified directly as base64 data, as text, or as a reference via a URL.68966897      - `type: "document"`68986899      - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`69006901        Union type for document source variants.69026903        - `BetaManagedAgentsBase64DocumentSource object`69046905          Base64-encoded document data.69066907          - `type: "base64"`69086909          - `data: string`69106911            Base64-encoded document data.69126913            minLength: 169146915          - `media_type: string`69166917            MIME type of the document (e.g., "application/pdf").69186919            minLength: 169206921        - `BetaManagedAgentsPlainTextDocumentSource object`69226923          Plain text document content.69246925          - `type: "text"`69266927          - `data: string`69286929            The plain text content.69306931            minLength: 169326933          - `media_type: "text/plain"`69346935            MIME type of the text content. Must be "text/plain".69366937        - `BetaManagedAgentsURLDocumentSource object`69386939          Document referenced by URL.69406941          - `type: "url"`69426943          - `url: string`69446945            URL of the document to fetch.69466947            minLength: 169486949        - `BetaManagedAgentsFileDocumentSource object`69506951          Document referenced by file ID.69526953          - `type: "file"`69546955          - `file_id: string`69566957            ID of a previously uploaded file.69586959            minLength: 169606961      - `context: optional string or null`69626963        Additional context about the document for the model.69646965      - `title: optional string or null`69666967        The title of the document.69686969    - `BetaManagedAgentsSearchResultBlock object`69706971      A block containing a web search result.69726973      - `type: "search_result"`69746975      - `citations: BetaManagedAgentsSearchResultCitations`69766977        Citation settings for a search result.69786979        - `enabled: boolean`69806981          Whether citations are enabled for this search result.69826983      - `content: array of BetaManagedAgentsSearchResultContent`69846985        Array of text content blocks from the search result.69866987        - `type: "text"`69886989        - `text: string`69906991          The text content.69926993          minLength: 169946995      - `source: string`69966997        The URL source of the search result.69986999        minLength: 170007001      - `title: string`70027003        The title of the search result.70047005        minLength: 170067007  - `is_error: optional boolean or null`70087009    Whether the tool execution resulted in an error.70107011### Beta Managed Agents Agent Tool Use Event70127013- `BetaManagedAgentsAgentToolUseEvent object`70147015  Event emitted when the agent invokes a built-in agent tool.70167017  - `type: "agent.tool_use"`70187019  - `id: string`70207021    Unique identifier for this event.70227023  - `input: map[unknown]`70247025    Input parameters for the tool call.70267027  - `name: string`70287029    Name of the agent tool being used.70307031  - `processed_at: string`70327033    A timestamp in RFC 3339 format70347035    format: date-time70367037  - `evaluated_permission: optional "allow" or "ask" or "deny"`70387039    AgentEvaluatedPermission enum70407041    - `"allow"`70427043    - `"ask"`70447045    - `"deny"`70467047  - `evaluation: optional BetaManagedAgentsAgentToolEvaluation`70487049    Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.70507051    - `BetaManagedAgentsAgentToolEvaluationAlwaysAllow object`70527053      The resolved permission_policy was always_allow; accompanies evaluated_permission "allow".70547055      - `type: "always_allow"`70567057    - `BetaManagedAgentsAgentToolEvaluationAlwaysAsk object`70587059      The resolved permission_policy was always_ask; accompanies evaluated_permission "ask".70607061      - `type: "always_ask"`70627063    - `BetaManagedAgentsAgentToolEvaluationAuto object`70647065      The resolved permission_policy was auto: the server judged this invocation individually.70667067      - `type: "auto"`70687069      - `evaluated_permission: BetaManagedAgentsAgentAutoEvaluatedPermission`70707071        The server's per-invocation judgement under the auto permission policy. Its type always equals the event's top-level evaluated_permission. Open union: clients must tolerate unknown variants.70727073        - `BetaManagedAgentsAgentAutoEvaluatedPermissionAllow object`70747075          The server judged the invocation safe to execute without client approval.70767077          - `type: "allow"`70787079        - `BetaManagedAgentsAgentAutoEvaluatedPermissionAsk object`70807081          The server reached no judgement; the invocation is held for client approval.70827083          - `type: "ask"`70847085          - `reason_code: string`70867087            The judgement's grounds in registry-bound terms, for client branching and audit rather than end-user display. Open registry; currently "indeterminate" (no judgement was reached). Clients must tolerate values outside this set.70887089            maxLength: 6470907091        - `BetaManagedAgentsAgentAutoEvaluatedPermissionDeny object`70927093          The server judged the invocation high-risk; it does not execute and a synthetic error tool result is appended.70947095          - `type: "deny"`70967097          - `reason_code: string`70987099            The judgement's grounds in registry-bound terms. Open registry; currently "high_risk" (judged high-risk; the call does not run). Clients must tolerate values outside this set.71007101            maxLength: 6471027103  - `session_thread_id: optional string or null`71047105    When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` or `user.tool_result` by `tool_use_id`, so clients do not send it back.71067107### Beta Managed Agents Base64 Document Source71087109- `BetaManagedAgentsBase64DocumentSource object`71107111  Base64-encoded document data.71127113  - `type: "base64"`71147115  - `data: string`71167117    Base64-encoded document data.71187119    minLength: 171207121  - `media_type: string`71227123    MIME type of the document (e.g., "application/pdf").71247125    minLength: 171267127### Beta Managed Agents Base64 Image Source71287129- `BetaManagedAgentsBase64ImageSource object`71307131  Base64-encoded image data.71327133  - `type: "base64"`71347135  - `data: string`71367137    Base64-encoded image data.71387139    minLength: 171407141  - `media_type: string`71427143    MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").71447145    minLength: 171467147### Beta Managed Agents Billing Error71487149- `BetaManagedAgentsBillingError object`71507151  The caller's organization or workspace cannot make model requests — out of credits or spend limit reached. Retrying with the same credentials will not succeed; the caller must resolve the billing state.71527153  - `type: "billing_error"`71547155  - `message: string`71567157    Human-readable error description.71587159  - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`71607161    What the client should do next in response to this error.71627163    - `BetaManagedAgentsRetryStatusRetrying object`71647165      The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.71667167      - `type: "retrying"`71687169    - `BetaManagedAgentsRetryStatusExhausted object`71707171      This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.71727173      - `type: "exhausted"`71747175    - `BetaManagedAgentsRetryStatusTerminal object`71767177      The session encountered a terminal error and will transition to `terminated` state.71787179      - `type: "terminal"`71807181### Beta Managed Agents Credential Host Unreachable Error71827183- `BetaManagedAgentsCredentialHostUnreachableError object`71847185  An `environment_variable` credential's `auth.networking.allowed_hosts` includes a host the environment's network policy does not permit.71867187  - `type: "credential_host_unreachable_error"`71887189  - `credential_id: string`71907191    ID of the affected credential.71927193  - `message: string`71947195    Human-readable error description.71967197  - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`71987199    What the client should do next in response to this error.72007201    - `BetaManagedAgentsRetryStatusRetrying object`72027203      The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.72047205      - `type: "retrying"`72067207    - `BetaManagedAgentsRetryStatusExhausted object`72087209      This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.72107211      - `type: "exhausted"`72127213    - `BetaManagedAgentsRetryStatusTerminal object`72147215      The session encountered a terminal error and will transition to `terminated` state.72167217      - `type: "terminal"`72187219  - `vault_id: string`72207221    ID of the vault containing the affected credential.72227223### Beta Managed Agents Document Block72247225- `BetaManagedAgentsDocumentBlock object`72267227  Document content, either specified directly as base64 data, as text, or as a reference via a URL.72287229  - `type: "document"`72307231  - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`72327233    Union type for document source variants.72347235    - `BetaManagedAgentsBase64DocumentSource object`72367237      Base64-encoded document data.72387239      - `type: "base64"`72407241      - `data: string`72427243        Base64-encoded document data.72447245        minLength: 172467247      - `media_type: string`72487249        MIME type of the document (e.g., "application/pdf").72507251        minLength: 172527253    - `BetaManagedAgentsPlainTextDocumentSource object`72547255      Plain text document content.72567257      - `type: "text"`72587259      - `data: string`72607261        The plain text content.72627263        minLength: 172647265      - `media_type: "text/plain"`72667267        MIME type of the text content. Must be "text/plain".72687269    - `BetaManagedAgentsURLDocumentSource object`72707271      Document referenced by URL.72727273      - `type: "url"`72747275      - `url: string`72767277        URL of the document to fetch.72787279        minLength: 172807281    - `BetaManagedAgentsFileDocumentSource object`72827283      Document referenced by file ID.72847285      - `type: "file"`72867287      - `file_id: string`72887289        ID of a previously uploaded file.72907291        minLength: 172927293  - `context: optional string or null`72947295    Additional context about the document for the model.72967297  - `title: optional string or null`72987299    The title of the document.73007301### Beta Managed Agents Event Params73027303- `BetaManagedAgentsEventParams = BetaManagedAgentsUserMessageEventParams or BetaManagedAgentsUserInterruptEventParams or BetaManagedAgentsUserToolConfirmationEventParams or 4 more`73047305  Union type for event parameters that can be sent to a session.73067307  - `BetaManagedAgentsUserMessageEventParams object`73087309    Parameters for sending a user message to the session.73107311    - `type: "user.message"`73127313    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`73147315      Array of content blocks for the user message.73167317      - `BetaManagedAgentsTextBlock object`73187319        Regular text content.73207321        - `type: "text"`73227323        - `text: string`73247325          The text content.73267327          minLength: 173287329      - `BetaManagedAgentsImageBlock object`73307331        Image content specified directly as base64 data or as a reference via a URL.73327333        - `type: "image"`73347335        - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`73367337          Union type for image source variants.73387339          - `BetaManagedAgentsBase64ImageSource object`73407341            Base64-encoded image data.73427343            - `type: "base64"`73447345            - `data: string`73467347              Base64-encoded image data.73487349              minLength: 173507351            - `media_type: string`73527353              MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").73547355              minLength: 173567357          - `BetaManagedAgentsURLImageSource object`73587359            Image referenced by URL.73607361            - `type: "url"`73627363            - `url: string`73647365              URL of the image to fetch.73667367              minLength: 173687369          - `BetaManagedAgentsFileImageSource object`73707371            Image referenced by file ID.73727373            - `type: "file"`73747375            - `file_id: string`73767377              ID of a previously uploaded file.73787379              minLength: 173807381      - `BetaManagedAgentsDocumentBlock object`73827383        Document content, either specified directly as base64 data, as text, or as a reference via a URL.73847385        - `type: "document"`73867387        - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`73887389          Union type for document source variants.73907391          - `BetaManagedAgentsBase64DocumentSource object`73927393            Base64-encoded document data.73947395            - `type: "base64"`73967397            - `data: string`73987399              Base64-encoded document data.74007401              minLength: 174027403            - `media_type: string`74047405              MIME type of the document (e.g., "application/pdf").74067407              minLength: 174087409          - `BetaManagedAgentsPlainTextDocumentSource object`74107411            Plain text document content.74127413            - `type: "text"`74147415            - `data: string`74167417              The plain text content.74187419              minLength: 174207421            - `media_type: "text/plain"`74227423              MIME type of the text content. Must be "text/plain".74247425          - `BetaManagedAgentsURLDocumentSource object`74267427            Document referenced by URL.74287429            - `type: "url"`74307431            - `url: string`74327433              URL of the document to fetch.74347435              minLength: 174367437          - `BetaManagedAgentsFileDocumentSource object`74387439            Document referenced by file ID.74407441            - `type: "file"`74427443            - `file_id: string`74447445              ID of a previously uploaded file.74467447              minLength: 174487449        - `context: optional string or null`74507451          Additional context about the document for the model.74527453        - `title: optional string or null`74547455          The title of the document.74567457      - `BetaManagedAgentsRedactedBlock object`74587459        Placeholder for content withheld by Anthropic model policy.74607461        - `type: "redacted"`74627463  - `BetaManagedAgentsUserInterruptEventParams object`74647465    Parameters for sending an interrupt to pause the agent.74667467    - `type: "user.interrupt"`74687469    - `session_thread_id: optional string or null`74707471      If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread.74727473  - `BetaManagedAgentsUserToolConfirmationEventParams object`74747475    Parameters for confirming or denying a tool execution request.74767477    - `type: "user.tool_confirmation"`74787479    - `result: "allow" or "deny"`74807481      UserToolConfirmationResult enum74827483      - `"allow"`74847485      - `"deny"`74867487    - `tool_use_id: string`74887489      The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.74907491      minLength: 1, maxLength: 12874927493    - `deny_message: optional string or null`74947495      Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.74967497      maxLength: 1000074987499  - `BetaManagedAgentsUserCustomToolResultEventParams object`75007501    Parameters for providing the result of a custom tool execution.75027503    - `type: "user.custom_tool_result"`75047505    - `custom_tool_use_id: string`75067507      The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.75087509      minLength: 1, maxLength: 12875107511    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`75127513      The result content returned by the tool.75147515      - `BetaManagedAgentsTextBlock object`75167517        Regular text content.75187519      - `BetaManagedAgentsImageBlock object`75207521        Image content specified directly as base64 data or as a reference via a URL.75227523      - `BetaManagedAgentsDocumentBlock object`75247525        Document content, either specified directly as base64 data, as text, or as a reference via a URL.75267527      - `BetaManagedAgentsSearchResultBlock object`75287529        A block containing a web search result.75307531        - `type: "search_result"`75327533        - `citations: BetaManagedAgentsSearchResultCitations`75347535          Citation settings for a search result.75367537          - `enabled: boolean`75387539            Whether citations are enabled for this search result.75407541        - `content: array of BetaManagedAgentsSearchResultContent`75427543          Array of text content blocks from the search result.75447545          - `type: "text"`75467547          - `text: string`75487549            The text content.75507551            minLength: 175527553        - `source: string`75547555          The URL source of the search result.75567557          minLength: 175587559        - `title: string`75607561          The title of the search result.75627563          minLength: 175647565    - `is_error: optional boolean or null`75667567      Whether the tool execution resulted in an error.75687569  - `BetaManagedAgentsUserDefineOutcomeEventParams object`75707571    Parameters for defining an outcome the agent should work toward. The agent begins work on receipt.75727573    - `type: "user.define_outcome"`75747575    - `description: string`75767577      What the agent should produce. This is the task specification.75787579    - `rubric: BetaManagedAgentsFileRubricParams or BetaManagedAgentsTextRubricParams`75807581      Rubric for grading the quality of an outcome.75827583      - `BetaManagedAgentsFileRubricParams object`75847585        Rubric referenced by a file uploaded via the Files API.75867587        - `type: "file"`75887589        - `file_id: string`75907591          ID of the rubric file.75927593      - `BetaManagedAgentsTextRubricParams object`75947595        Rubric content provided inline as text.75967597        - `type: "text"`75987599        - `content: string`76007601          Rubric content. Plain text or markdown — the grader treats it as freeform text. Maximum 262144 characters.76027603          maxLength: 26214476047605    - `max_iterations: optional number or null`76067607      Eval→revision cycles before giving up. Default 3, max 20.76087609      format: int3276107611  - `BetaManagedAgentsUserToolResultEventParams object`76127613    Parameters for providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.76147615    - `type: "user.tool_result"`76167617    - `tool_use_id: string`76187619      The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.76207621      minLength: 1, maxLength: 12876227623    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`76247625      The result content returned by the tool.76267627      - `BetaManagedAgentsTextBlock object`76287629        Regular text content.76307631      - `BetaManagedAgentsImageBlock object`76327633        Image content specified directly as base64 data or as a reference via a URL.76347635      - `BetaManagedAgentsDocumentBlock object`76367637        Document content, either specified directly as base64 data, as text, or as a reference via a URL.76387639      - `BetaManagedAgentsSearchResultBlock object`76407641        A block containing a web search result.76427643    - `is_error: optional boolean or null`76447645      Whether the tool execution resulted in an error.76467647  - `BetaManagedAgentsSystemMessageEventParams object`76487649    Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a `role: "system"` turn rather than replacing the top-level system prompt. At most one per request: it must be the final event and immediately follow the `user.message`, `user.tool_result`, or `user.custom_tool_result` it accompanies. Only supported on models that accept mid-conversation system messages.76507651    - `type: "system.message"`76527653    - `content: array of BetaManagedAgentsSystemContentBlock`76547655      System content blocks to append. Text-only.76567657      - `type: "text"`76587659      - `text: string`76607661        The text content.76627663        minLength: 176647665### Beta Managed Agents File Document Source76667667- `BetaManagedAgentsFileDocumentSource object`76687669  Document referenced by file ID.76707671  - `type: "file"`76727673  - `file_id: string`76747675    ID of a previously uploaded file.76767677    minLength: 176787679### Beta Managed Agents File Image Source76807681- `BetaManagedAgentsFileImageSource object`76827683  Image referenced by file ID.76847685  - `type: "file"`76867687  - `file_id: string`76887689    ID of a previously uploaded file.76907691    minLength: 176927693### Beta Managed Agents File Rubric76947695- `BetaManagedAgentsFileRubric object`76967697  Rubric referenced by a file uploaded via the Files API.76987699  - `type: "file"`77007701  - `file_id: string`77027703    ID of the rubric file.77047705### Beta Managed Agents File Rubric Params77067707- `BetaManagedAgentsFileRubricParams object`77087709  Rubric referenced by a file uploaded via the Files API.77107711  - `type: "file"`77127713  - `file_id: string`77147715    ID of the rubric file.77167717### Beta Managed Agents Image Block77187719- `BetaManagedAgentsImageBlock object`77207721  Image content specified directly as base64 data or as a reference via a URL.77227723  - `type: "image"`77247725  - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`77267727    Union type for image source variants.77287729    - `BetaManagedAgentsBase64ImageSource object`77307731      Base64-encoded image data.77327733      - `type: "base64"`77347735      - `data: string`77367737        Base64-encoded image data.77387739        minLength: 177407741      - `media_type: string`77427743        MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").77447745        minLength: 177467747    - `BetaManagedAgentsURLImageSource object`77487749      Image referenced by URL.77507751      - `type: "url"`77527753      - `url: string`77547755        URL of the image to fetch.77567757        minLength: 177587759    - `BetaManagedAgentsFileImageSource object`77607761      Image referenced by file ID.77627763      - `type: "file"`77647765      - `file_id: string`77667767        ID of a previously uploaded file.77687769        minLength: 177707771### Beta Managed Agents MCP Authentication Failed Error77727773- `BetaManagedAgentsMCPAuthenticationFailedError object`77747775  Authentication to an MCP server failed.77767777  - `type: "mcp_authentication_failed_error"`77787779  - `mcp_server_name: string`77807781    Name of the MCP server that failed authentication.77827783  - `message: string`77847785    Human-readable error description.77867787  - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`77887789    What the client should do next in response to this error.77907791    - `BetaManagedAgentsRetryStatusRetrying object`77927793      The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.77947795      - `type: "retrying"`77967797    - `BetaManagedAgentsRetryStatusExhausted object`77987799      This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.78007801      - `type: "exhausted"`78027803    - `BetaManagedAgentsRetryStatusTerminal object`78047805      The session encountered a terminal error and will transition to `terminated` state.78067807      - `type: "terminal"`78087809### Beta Managed Agents MCP Connection Failed Error78107811- `BetaManagedAgentsMCPConnectionFailedError object`78127813  Failed to connect to an MCP server.78147815  - `type: "mcp_connection_failed_error"`78167817  - `mcp_server_name: string`78187819    Name of the MCP server that failed to connect.78207821  - `message: string`78227823    Human-readable error description.78247825  - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`78267827    What the client should do next in response to this error.78287829    - `BetaManagedAgentsRetryStatusRetrying object`78307831      The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.78327833      - `type: "retrying"`78347835    - `BetaManagedAgentsRetryStatusExhausted object`78367837      This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.78387839      - `type: "exhausted"`78407841    - `BetaManagedAgentsRetryStatusTerminal object`78427843      The session encountered a terminal error and will transition to `terminated` state.78447845      - `type: "terminal"`78467847### Beta Managed Agents Model Overloaded Error78487849- `BetaManagedAgentsModelOverloadedError object`78507851  The model is currently overloaded. Emitted after automatic retries are exhausted.78527853  - `type: "model_overloaded_error"`78547855  - `message: string`78567857    Human-readable error description.78587859  - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`78607861    What the client should do next in response to this error.78627863    - `BetaManagedAgentsRetryStatusRetrying object`78647865      The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.78667867      - `type: "retrying"`78687869    - `BetaManagedAgentsRetryStatusExhausted object`78707871      This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.78727873      - `type: "exhausted"`78747875    - `BetaManagedAgentsRetryStatusTerminal object`78767877      The session encountered a terminal error and will transition to `terminated` state.78787879      - `type: "terminal"`78807881### Beta Managed Agents Model Rate Limited Error78827883- `BetaManagedAgentsModelRateLimitedError object`78847885  The model request was rate-limited.78867887  - `type: "model_rate_limited_error"`78887889  - `message: string`78907891    Human-readable error description.78927893  - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`78947895    What the client should do next in response to this error.78967897    - `BetaManagedAgentsRetryStatusRetrying object`78987899      The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.79007901      - `type: "retrying"`79027903    - `BetaManagedAgentsRetryStatusExhausted object`79047905      This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.79067907      - `type: "exhausted"`79087909    - `BetaManagedAgentsRetryStatusTerminal object`79107911      The session encountered a terminal error and will transition to `terminated` state.79127913      - `type: "terminal"`79147915### Beta Managed Agents Model Request Failed Error79167917- `BetaManagedAgentsModelRequestFailedError object`79187919  A model request failed for a reason other than overload or rate-limiting.79207921  - `type: "model_request_failed_error"`79227923  - `message: string`79247925    Human-readable error description.79267927  - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`79287929    What the client should do next in response to this error.79307931    - `BetaManagedAgentsRetryStatusRetrying object`79327933      The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.79347935      - `type: "retrying"`79367937    - `BetaManagedAgentsRetryStatusExhausted object`79387939      This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.79407941      - `type: "exhausted"`79427943    - `BetaManagedAgentsRetryStatusTerminal object`79447945      The session encountered a terminal error and will transition to `terminated` state.79467947      - `type: "terminal"`79487949### Beta Managed Agents Plain Text Document Source79507951- `BetaManagedAgentsPlainTextDocumentSource object`79527953  Plain text document content.79547955  - `type: "text"`79567957  - `data: string`79587959    The plain text content.79607961    minLength: 179627963  - `media_type: "text/plain"`79647965    MIME type of the text content. Must be "text/plain".79667967### Beta Managed Agents Redacted Block79687969- `BetaManagedAgentsRedactedBlock object`79707971  Placeholder for content withheld by Anthropic model policy.79727973  - `type: "redacted"`79747975### Beta Managed Agents Retry Status Exhausted79767977- `BetaManagedAgentsRetryStatusExhausted object`79787979  This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.79807981  - `type: "exhausted"`79827983### Beta Managed Agents Retry Status Retrying79847985- `BetaManagedAgentsRetryStatusRetrying object`79867987  The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.79887989  - `type: "retrying"`79907991### Beta Managed Agents Retry Status Terminal79927993- `BetaManagedAgentsRetryStatusTerminal object`79947995  The session encountered a terminal error and will transition to `terminated` state.79967997  - `type: "terminal"`79987999### Beta Managed Agents Search Result Block80008001- `BetaManagedAgentsSearchResultBlock object`80028003  A block containing a web search result.80048005  - `type: "search_result"`80068007  - `citations: BetaManagedAgentsSearchResultCitations`80088009    Citation settings for a search result.80108011    - `enabled: boolean`80128013      Whether citations are enabled for this search result.80148015  - `content: array of BetaManagedAgentsSearchResultContent`80168017    Array of text content blocks from the search result.80188019    - `type: "text"`80208021    - `text: string`80228023      The text content.80248025      minLength: 180268027  - `source: string`80288029    The URL source of the search result.80308031    minLength: 180328033  - `title: string`80348035    The title of the search result.80368037    minLength: 180388039### Beta Managed Agents Search Result Citations80408041- `BetaManagedAgentsSearchResultCitations object`80428043  Citation settings for a search result.80448045  - `enabled: boolean`80468047    Whether citations are enabled for this search result.80488049### Beta Managed Agents Search Result Content80508051- `BetaManagedAgentsSearchResultContent object`80528053  Text content within a search result.80548055  - `type: "text"`80568057  - `text: string`80588059    The text content.80608061    minLength: 180628063### Beta Managed Agents Send Session Events80648065- `BetaManagedAgentsSendSessionEvents object`80668067  Events that were successfully sent to the session.80688069  - `data: optional array of BetaManagedAgentsUserMessageEvent or BetaManagedAgentsUserInterruptEvent or BetaManagedAgentsUserToolConfirmationEvent or 4 more`80708071    Sent events80728073    - `BetaManagedAgentsUserMessageEvent object`80748075      A user message event in the session conversation.80768077      - `type: "user.message"`80788079      - `id: string`80808081        Unique identifier for this event.80828083      - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`80848085        Array of content blocks comprising the user message.80868087        - `BetaManagedAgentsTextBlock object`80888089          Regular text content.80908091          - `type: "text"`80928093          - `text: string`80948095            The text content.80968097            minLength: 180988099        - `BetaManagedAgentsImageBlock object`81008101          Image content specified directly as base64 data or as a reference via a URL.81028103          - `type: "image"`81048105          - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`81068107            Union type for image source variants.81088109            - `BetaManagedAgentsBase64ImageSource object`81108111              Base64-encoded image data.81128113              - `type: "base64"`81148115              - `data: string`81168117                Base64-encoded image data.81188119                minLength: 181208121              - `media_type: string`81228123                MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").81248125                minLength: 181268127            - `BetaManagedAgentsURLImageSource object`81288129              Image referenced by URL.81308131              - `type: "url"`81328133              - `url: string`81348135                URL of the image to fetch.81368137                minLength: 181388139            - `BetaManagedAgentsFileImageSource object`81408141              Image referenced by file ID.81428143              - `type: "file"`81448145              - `file_id: string`81468147                ID of a previously uploaded file.81488149                minLength: 181508151        - `BetaManagedAgentsDocumentBlock object`81528153          Document content, either specified directly as base64 data, as text, or as a reference via a URL.81548155          - `type: "document"`81568157          - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`81588159            Union type for document source variants.81608161            - `BetaManagedAgentsBase64DocumentSource object`81628163              Base64-encoded document data.81648165              - `type: "base64"`81668167              - `data: string`81688169                Base64-encoded document data.81708171                minLength: 181728173              - `media_type: string`81748175                MIME type of the document (e.g., "application/pdf").81768177                minLength: 181788179            - `BetaManagedAgentsPlainTextDocumentSource object`81808181              Plain text document content.81828183              - `type: "text"`81848185              - `data: string`81868187                The plain text content.81888189                minLength: 181908191              - `media_type: "text/plain"`81928193                MIME type of the text content. Must be "text/plain".81948195            - `BetaManagedAgentsURLDocumentSource object`81968197              Document referenced by URL.81988199              - `type: "url"`82008201              - `url: string`82028203                URL of the document to fetch.82048205                minLength: 182068207            - `BetaManagedAgentsFileDocumentSource object`82088209              Document referenced by file ID.82108211              - `type: "file"`82128213              - `file_id: string`82148215                ID of a previously uploaded file.82168217                minLength: 182188219          - `context: optional string or null`82208221            Additional context about the document for the model.82228223          - `title: optional string or null`82248225            The title of the document.82268227        - `BetaManagedAgentsRedactedBlock object`82288229          Placeholder for content withheld by Anthropic model policy.82308231          - `type: "redacted"`82328233      - `processed_at: optional string or null`82348235        A timestamp in RFC 3339 format82368237        format: date-time82388239    - `BetaManagedAgentsUserInterruptEvent object`82408241      An interrupt event that pauses agent execution and returns control to the user.82428243      - `type: "user.interrupt"`82448245      - `id: string`82468247        Unique identifier for this event.82488249      - `processed_at: optional string or null`82508251        A timestamp in RFC 3339 format82528253        format: date-time82548255      - `session_thread_id: optional string or null`82568257        If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread.82588259    - `BetaManagedAgentsUserToolConfirmationEvent object`82608261      A tool confirmation event that approves or denies a pending tool execution.82628263      - `type: "user.tool_confirmation"`82648265      - `id: string`82668267        Unique identifier for this event.82688269      - `result: "allow" or "deny"`82708271        UserToolConfirmationResult enum82728273        - `"allow"`82748275        - `"deny"`82768277      - `tool_use_id: string`82788279        The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.82808281      - `deny_message: optional string or null`82828283        Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.82848285        maxLength: 1000082868287      - `processed_at: optional string or null`82888289        A timestamp in RFC 3339 format82908291        format: date-time82928293      - `session_thread_id: optional string or null`82948295        Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread.82968297    - `BetaManagedAgentsUserCustomToolResultEvent object`82988299      Event sent by the client providing the result of a custom tool execution.83008301      - `type: "user.custom_tool_result"`83028303      - `id: string`83048305        Unique identifier for this event.83068307      - `custom_tool_use_id: string`83088309        The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.83108311      - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`83128313        The result content returned by the tool.83148315        - `BetaManagedAgentsTextBlock object`83168317          Regular text content.83188319        - `BetaManagedAgentsImageBlock object`83208321          Image content specified directly as base64 data or as a reference via a URL.83228323        - `BetaManagedAgentsDocumentBlock object`83248325          Document content, either specified directly as base64 data, as text, or as a reference via a URL.83268327        - `BetaManagedAgentsSearchResultBlock object`83288329          A block containing a web search result.83308331          - `type: "search_result"`83328333          - `citations: BetaManagedAgentsSearchResultCitations`83348335            Citation settings for a search result.83368337            - `enabled: boolean`83388339              Whether citations are enabled for this search result.83408341          - `content: array of BetaManagedAgentsSearchResultContent`83428343            Array of text content blocks from the search result.83448345            - `type: "text"`83468347            - `text: string`83488349              The text content.83508351              minLength: 183528353          - `source: string`83548355            The URL source of the search result.83568357            minLength: 183588359          - `title: string`83608361            The title of the search result.83628363            minLength: 183648365      - `is_error: optional boolean or null`83668367        Whether the tool execution resulted in an error.83688369      - `processed_at: optional string or null`83708371        A timestamp in RFC 3339 format83728373        format: date-time83748375      - `session_thread_id: optional string or null`83768377        Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.83788379    - `BetaManagedAgentsUserDefineOutcomeEvent object`83808381      Echo of a `user.define_outcome` input event. Carries the server-generated `outcome_id` that subsequent `span.outcome_evaluation_*` events reference.83828383      - `type: "user.define_outcome"`83848385      - `id: string`83868387        Unique identifier for this event.83888389      - `description: string`83908391        What the agent should produce. Copied from the input event.83928393      - `max_iterations: number or null`83948395        Evaluate-then-revise cycles before giving up. Default 3, max 20.83968397        format: int3283988399      - `outcome_id: string`84008401        Server-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.84028403      - `processed_at: string`84048405        A timestamp in RFC 3339 format84068407        format: date-time84088409      - `rubric: BetaManagedAgentsFileRubric or BetaManagedAgentsTextRubric`84108411        Rubric for grading the quality of an outcome.84128413        - `BetaManagedAgentsFileRubric object`84148415          Rubric referenced by a file uploaded via the Files API.84168417          - `type: "file"`84188419          - `file_id: string`84208421            ID of the rubric file.84228423        - `BetaManagedAgentsTextRubric object`84248425          Rubric content provided inline as text.84268427          - `type: "text"`84288429          - `content: string`84308431            Rubric content. Plain text or markdown — the grader treats it as freeform text.84328433    - `BetaManagedAgentsUserToolResultEvent object`84348435      Event sent by the client providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.84368437      - `type: "user.tool_result"`84388439      - `id: string`84408441        Unique identifier for this event.84428443      - `tool_use_id: string`84448445        The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.84468447      - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`84488449        The result content returned by the tool.84508451        - `BetaManagedAgentsTextBlock object`84528453          Regular text content.84548455        - `BetaManagedAgentsImageBlock object`84568457          Image content specified directly as base64 data or as a reference via a URL.84588459        - `BetaManagedAgentsDocumentBlock object`84608461          Document content, either specified directly as base64 data, as text, or as a reference via a URL.84628463        - `BetaManagedAgentsSearchResultBlock object`84648465          A block containing a web search result.84668467      - `is_error: optional boolean or null`84688469        Whether the tool execution resulted in an error.84708471      - `processed_at: optional string or null`84728473        A timestamp in RFC 3339 format84748475        format: date-time84768477      - `session_thread_id: optional string or null`84788479        Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.84808481    - `BetaManagedAgentsSystemMessageEvent object`84828483      A mid-conversation system message event. Carries system-role content that is appended to the session as a `role: "system"` turn.84848485      - `type: "system.message"`84868487      - `id: string`84888489        Unique identifier for this event.84908491      - `content: array of BetaManagedAgentsSystemContentBlock`84928493        System content blocks. Text-only.84948495        - `type: "text"`84968497        - `text: string`84988499          The text content.85008501          minLength: 185028503      - `processed_at: optional string or null`85048505        A timestamp in RFC 3339 format85068507        format: date-time85088509### Beta Managed Agents Session Budget Reached85108511- `BetaManagedAgentsSessionBudgetReached object`85128513  The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget.85148515  - `type: "budget_reached"`85168517### Beta Managed Agents Session Deleted Event85188519- `BetaManagedAgentsSessionDeletedEvent object`85208521  Emitted when a session has been deleted. Terminates any active event stream — no further events will be emitted for this session.85228523  - `type: "session.deleted"`85248525  - `id: string`85268527    Unique identifier for this event.85288529  - `processed_at: string`85308531    A timestamp in RFC 3339 format85328533    format: date-time85348535### Beta Managed Agents Session End Turn85368537- `BetaManagedAgentsSessionEndTurn object`85388539  The agent completed its turn naturally and is ready for the next user message.85408541  - `type: "end_turn"`85428543### Beta Managed Agents Session Error Event85448545- `BetaManagedAgentsSessionErrorEvent object`85468547  An error event indicating a problem occurred during session execution.85488549  - `type: "session.error"`85508551  - `id: string`85528553    Unique identifier for this event.85548555  - `error: BetaManagedAgentsUnknownError or BetaManagedAgentsModelOverloadedError or BetaManagedAgentsModelRateLimitedError or 5 more`85568557    - `BetaManagedAgentsUnknownError object`85588559      An unknown or unexpected error occurred during session execution. A fallback variant; clients that don't recognize a new error code can match on `retry_status` and `message` alone.85608561      - `type: "unknown_error"`85628563      - `message: string`85648565        Human-readable error description.85668567      - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`85688569        What the client should do next in response to this error.85708571        - `BetaManagedAgentsRetryStatusRetrying object`85728573          The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.85748575          - `type: "retrying"`85768577        - `BetaManagedAgentsRetryStatusExhausted object`85788579          This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.85808581          - `type: "exhausted"`85828583        - `BetaManagedAgentsRetryStatusTerminal object`85848585          The session encountered a terminal error and will transition to `terminated` state.85868587          - `type: "terminal"`85888589    - `BetaManagedAgentsModelOverloadedError object`85908591      The model is currently overloaded. Emitted after automatic retries are exhausted.85928593      - `type: "model_overloaded_error"`85948595      - `message: string`85968597        Human-readable error description.85988599      - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`86008601        What the client should do next in response to this error.86028603        - `BetaManagedAgentsRetryStatusRetrying object`86048605          The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.86068607        - `BetaManagedAgentsRetryStatusExhausted object`86088609          This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.86108611        - `BetaManagedAgentsRetryStatusTerminal object`86128613          The session encountered a terminal error and will transition to `terminated` state.86148615    - `BetaManagedAgentsModelRateLimitedError object`86168617      The model request was rate-limited.86188619      - `type: "model_rate_limited_error"`86208621      - `message: string`86228623        Human-readable error description.86248625      - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`86268627        What the client should do next in response to this error.86288629        - `BetaManagedAgentsRetryStatusRetrying object`86308631          The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.86328633        - `BetaManagedAgentsRetryStatusExhausted object`86348635          This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.86368637        - `BetaManagedAgentsRetryStatusTerminal object`86388639          The session encountered a terminal error and will transition to `terminated` state.86408641    - `BetaManagedAgentsModelRequestFailedError object`86428643      A model request failed for a reason other than overload or rate-limiting.86448645      - `type: "model_request_failed_error"`86468647      - `message: string`86488649        Human-readable error description.86508651      - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`86528653        What the client should do next in response to this error.86548655        - `BetaManagedAgentsRetryStatusRetrying object`86568657          The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.86588659        - `BetaManagedAgentsRetryStatusExhausted object`86608661          This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.86628663        - `BetaManagedAgentsRetryStatusTerminal object`86648665          The session encountered a terminal error and will transition to `terminated` state.86668667    - `BetaManagedAgentsMCPConnectionFailedError object`86688669      Failed to connect to an MCP server.86708671      - `type: "mcp_connection_failed_error"`86728673      - `mcp_server_name: string`86748675        Name of the MCP server that failed to connect.86768677      - `message: string`86788679        Human-readable error description.86808681      - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`86828683        What the client should do next in response to this error.86848685        - `BetaManagedAgentsRetryStatusRetrying object`86868687          The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.86888689        - `BetaManagedAgentsRetryStatusExhausted object`86908691          This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.86928693        - `BetaManagedAgentsRetryStatusTerminal object`86948695          The session encountered a terminal error and will transition to `terminated` state.86968697    - `BetaManagedAgentsMCPAuthenticationFailedError object`86988699      Authentication to an MCP server failed.87008701      - `type: "mcp_authentication_failed_error"`87028703      - `mcp_server_name: string`87048705        Name of the MCP server that failed authentication.87068707      - `message: string`87088709        Human-readable error description.87108711      - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`87128713        What the client should do next in response to this error.87148715        - `BetaManagedAgentsRetryStatusRetrying object`87168717          The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.87188719        - `BetaManagedAgentsRetryStatusExhausted object`87208721          This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.87228723        - `BetaManagedAgentsRetryStatusTerminal object`87248725          The session encountered a terminal error and will transition to `terminated` state.87268727    - `BetaManagedAgentsBillingError object`87288729      The caller's organization or workspace cannot make model requests — out of credits or spend limit reached. Retrying with the same credentials will not succeed; the caller must resolve the billing state.87308731      - `type: "billing_error"`87328733      - `message: string`87348735        Human-readable error description.87368737      - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`87388739        What the client should do next in response to this error.87408741        - `BetaManagedAgentsRetryStatusRetrying object`87428743          The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.87448745        - `BetaManagedAgentsRetryStatusExhausted object`87468747          This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.87488749        - `BetaManagedAgentsRetryStatusTerminal object`87508751          The session encountered a terminal error and will transition to `terminated` state.87528753    - `BetaManagedAgentsCredentialHostUnreachableError object`87548755      An `environment_variable` credential's `auth.networking.allowed_hosts` includes a host the environment's network policy does not permit.87568757      - `type: "credential_host_unreachable_error"`87588759      - `credential_id: string`87608761        ID of the affected credential.87628763      - `message: string`87648765        Human-readable error description.87668767      - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`87688769        What the client should do next in response to this error.87708771        - `BetaManagedAgentsRetryStatusRetrying object`87728773          The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.87748775        - `BetaManagedAgentsRetryStatusExhausted object`87768777          This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.87788779        - `BetaManagedAgentsRetryStatusTerminal object`87808781          The session encountered a terminal error and will transition to `terminated` state.87828783      - `vault_id: string`87848785        ID of the vault containing the affected credential.87868787  - `processed_at: string`87888789    A timestamp in RFC 3339 format87908791    format: date-time87928793### Beta Managed Agents Session Event87948795- `BetaManagedAgentsSessionEvent = BetaManagedAgentsUserMessageEvent or BetaManagedAgentsUserInterruptEvent or BetaManagedAgentsUserToolConfirmationEvent or 32 more`87968797  Union type for all event types in a session.87988799  - `BetaManagedAgentsUserMessageEvent object`88008801    A user message event in the session conversation.88028803    - `type: "user.message"`88048805    - `id: string`88068807      Unique identifier for this event.88088809    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`88108811      Array of content blocks comprising the user message.88128813      - `BetaManagedAgentsTextBlock object`88148815        Regular text content.88168817        - `type: "text"`88188819        - `text: string`88208821          The text content.88228823          minLength: 188248825      - `BetaManagedAgentsImageBlock object`88268827        Image content specified directly as base64 data or as a reference via a URL.88288829        - `type: "image"`88308831        - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`88328833          Union type for image source variants.88348835          - `BetaManagedAgentsBase64ImageSource object`88368837            Base64-encoded image data.88388839            - `type: "base64"`88408841            - `data: string`88428843              Base64-encoded image data.88448845              minLength: 188468847            - `media_type: string`88488849              MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").88508851              minLength: 188528853          - `BetaManagedAgentsURLImageSource object`88548855            Image referenced by URL.88568857            - `type: "url"`88588859            - `url: string`88608861              URL of the image to fetch.88628863              minLength: 188648865          - `BetaManagedAgentsFileImageSource object`88668867            Image referenced by file ID.88688869            - `type: "file"`88708871            - `file_id: string`88728873              ID of a previously uploaded file.88748875              minLength: 188768877      - `BetaManagedAgentsDocumentBlock object`88788879        Document content, either specified directly as base64 data, as text, or as a reference via a URL.88808881        - `type: "document"`88828883        - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`88848885          Union type for document source variants.88868887          - `BetaManagedAgentsBase64DocumentSource object`88888889            Base64-encoded document data.88908891            - `type: "base64"`88928893            - `data: string`88948895              Base64-encoded document data.88968897              minLength: 188988899            - `media_type: string`89008901              MIME type of the document (e.g., "application/pdf").89028903              minLength: 189048905          - `BetaManagedAgentsPlainTextDocumentSource object`89068907            Plain text document content.89088909            - `type: "text"`89108911            - `data: string`89128913              The plain text content.89148915              minLength: 189168917            - `media_type: "text/plain"`89188919              MIME type of the text content. Must be "text/plain".89208921          - `BetaManagedAgentsURLDocumentSource object`89228923            Document referenced by URL.89248925            - `type: "url"`89268927            - `url: string`89288929              URL of the document to fetch.89308931              minLength: 189328933          - `BetaManagedAgentsFileDocumentSource object`89348935            Document referenced by file ID.89368937            - `type: "file"`89388939            - `file_id: string`89408941              ID of a previously uploaded file.89428943              minLength: 189448945        - `context: optional string or null`89468947          Additional context about the document for the model.89488949        - `title: optional string or null`89508951          The title of the document.89528953      - `BetaManagedAgentsRedactedBlock object`89548955        Placeholder for content withheld by Anthropic model policy.89568957        - `type: "redacted"`89588959    - `processed_at: optional string or null`89608961      A timestamp in RFC 3339 format89628963      format: date-time89648965  - `BetaManagedAgentsUserInterruptEvent object`89668967    An interrupt event that pauses agent execution and returns control to the user.89688969    - `type: "user.interrupt"`89708971    - `id: string`89728973      Unique identifier for this event.89748975    - `processed_at: optional string or null`89768977      A timestamp in RFC 3339 format89788979      format: date-time89808981    - `session_thread_id: optional string or null`89828983      If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread.89848985  - `BetaManagedAgentsUserToolConfirmationEvent object`89868987    A tool confirmation event that approves or denies a pending tool execution.89888989    - `type: "user.tool_confirmation"`89908991    - `id: string`89928993      Unique identifier for this event.89948995    - `result: "allow" or "deny"`89968997      UserToolConfirmationResult enum89988999      - `"allow"`90009001      - `"deny"`90029003    - `tool_use_id: string`90049005      The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.90069007    - `deny_message: optional string or null`90089009      Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.90109011      maxLength: 1000090129013    - `processed_at: optional string or null`90149015      A timestamp in RFC 3339 format90169017      format: date-time90189019    - `session_thread_id: optional string or null`90209021      Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread.90229023  - `BetaManagedAgentsUserCustomToolResultEvent object`90249025    Event sent by the client providing the result of a custom tool execution.90269027    - `type: "user.custom_tool_result"`90289029    - `id: string`90309031      Unique identifier for this event.90329033    - `custom_tool_use_id: string`90349035      The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.90369037    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`90389039      The result content returned by the tool.90409041      - `BetaManagedAgentsTextBlock object`90429043        Regular text content.90449045      - `BetaManagedAgentsImageBlock object`90469047        Image content specified directly as base64 data or as a reference via a URL.90489049      - `BetaManagedAgentsDocumentBlock object`90509051        Document content, either specified directly as base64 data, as text, or as a reference via a URL.90529053      - `BetaManagedAgentsSearchResultBlock object`90549055        A block containing a web search result.90569057        - `type: "search_result"`90589059        - `citations: BetaManagedAgentsSearchResultCitations`90609061          Citation settings for a search result.90629063          - `enabled: boolean`90649065            Whether citations are enabled for this search result.90669067        - `content: array of BetaManagedAgentsSearchResultContent`90689069          Array of text content blocks from the search result.90709071          - `type: "text"`90729073          - `text: string`90749075            The text content.90769077            minLength: 190789079        - `source: string`90809081          The URL source of the search result.90829083          minLength: 190849085        - `title: string`90869087          The title of the search result.90889089          minLength: 190909091    - `is_error: optional boolean or null`90929093      Whether the tool execution resulted in an error.90949095    - `processed_at: optional string or null`90969097      A timestamp in RFC 3339 format90989099      format: date-time91009101    - `session_thread_id: optional string or null`91029103      Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.91049105  - `BetaManagedAgentsAgentCustomToolUseEvent object`91069107    Event emitted when the agent calls a custom tool. The session goes idle until the client sends a `user.custom_tool_result` event with the result.91089109    - `type: "agent.custom_tool_use"`91109111    - `id: string`91129113      Unique identifier for this event.91149115    - `input: map[unknown]`91169117      Input parameters for the tool call.91189119    - `name: string`91209121      Name of the custom tool being called.91229123    - `processed_at: string`91249125      A timestamp in RFC 3339 format91269127      format: date-time91289129    - `session_thread_id: optional string or null`91309131      When set, this event was cross-posted from a subagent's thread to surface its custom tool use on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.custom_tool_result` by `custom_tool_use_id`, so clients do not send it back.91329133  - `BetaManagedAgentsAgentMessageEvent object`91349135    An agent response event in the session conversation.91369137    - `type: "agent.message"`91389139    - `id: string`91409141      Unique identifier for this event.91429143    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsRedactedBlock`91449145      Array of text blocks comprising the agent response.91469147      - `BetaManagedAgentsTextBlock object`91489149        Regular text content.91509151      - `BetaManagedAgentsRedactedBlock object`91529153        Placeholder for content withheld by Anthropic model policy.91549155    - `processed_at: string`91569157      A timestamp in RFC 3339 format91589159      format: date-time91609161  - `BetaManagedAgentsAgentThinkingEvent object`91629163    Indicates the agent is making forward progress via extended thinking. A progress signal, not a content carrier.91649165    - `type: "agent.thinking"`91669167    - `id: string`91689169      Unique identifier for this event.91709171    - `processed_at: string`91729173      A timestamp in RFC 3339 format91749175      format: date-time91769177  - `BetaManagedAgentsAgentMCPToolUseEvent object`91789179    Event emitted when the agent invokes a tool provided by an MCP server.91809181    - `type: "agent.mcp_tool_use"`91829183    - `id: string`91849185      Unique identifier for this event.91869187    - `input: map[unknown]`91889189      Input parameters for the tool call.91909191    - `mcp_server_name: string`91929193      Name of the MCP server providing the tool.91949195    - `name: string`91969197      Name of the MCP tool being used.91989199    - `processed_at: string`92009201      A timestamp in RFC 3339 format92029203      format: date-time92049205    - `evaluated_permission: optional "allow" or "ask" or "deny"`92069207      AgentEvaluatedPermission enum92089209      - `"allow"`92109211      - `"ask"`92129213      - `"deny"`92149215    - `evaluation: optional BetaManagedAgentsAgentToolEvaluation`92169217      Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.92189219      - `BetaManagedAgentsAgentToolEvaluationAlwaysAllow object`92209221        The resolved permission_policy was always_allow; accompanies evaluated_permission "allow".92229223        - `type: "always_allow"`92249225      - `BetaManagedAgentsAgentToolEvaluationAlwaysAsk object`92269227        The resolved permission_policy was always_ask; accompanies evaluated_permission "ask".92289229        - `type: "always_ask"`92309231      - `BetaManagedAgentsAgentToolEvaluationAuto object`92329233        The resolved permission_policy was auto: the server judged this invocation individually.92349235        - `type: "auto"`92369237        - `evaluated_permission: BetaManagedAgentsAgentAutoEvaluatedPermission`92389239          The server's per-invocation judgement under the auto permission policy. Its type always equals the event's top-level evaluated_permission. Open union: clients must tolerate unknown variants.92409241          - `BetaManagedAgentsAgentAutoEvaluatedPermissionAllow object`92429243            The server judged the invocation safe to execute without client approval.92449245            - `type: "allow"`92469247          - `BetaManagedAgentsAgentAutoEvaluatedPermissionAsk object`92489249            The server reached no judgement; the invocation is held for client approval.92509251            - `type: "ask"`92529253            - `reason_code: string`92549255              The judgement's grounds in registry-bound terms, for client branching and audit rather than end-user display. Open registry; currently "indeterminate" (no judgement was reached). Clients must tolerate values outside this set.92569257              maxLength: 6492589259          - `BetaManagedAgentsAgentAutoEvaluatedPermissionDeny object`92609261            The server judged the invocation high-risk; it does not execute and a synthetic error tool result is appended.92629263            - `type: "deny"`92649265            - `reason_code: string`92669267              The judgement's grounds in registry-bound terms. Open registry; currently "high_risk" (judged high-risk; the call does not run). Clients must tolerate values outside this set.92689269              maxLength: 6492709271    - `session_thread_id: optional string or null`92729273      When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` by `tool_use_id`, so clients do not send it back.92749275  - `BetaManagedAgentsAgentMCPToolResultEvent object`92769277    Event representing the result of an MCP tool execution.92789279    - `type: "agent.mcp_tool_result"`92809281    - `id: string`92829283      Unique identifier for this event.92849285    - `mcp_tool_use_id: string`92869287      The id of the `agent.mcp_tool_use` event this result corresponds to.92889289    - `processed_at: string`92909291      A timestamp in RFC 3339 format92929293      format: date-time92949295    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`92969297      The result content returned by the tool.92989299      - `BetaManagedAgentsTextBlock object`93009301        Regular text content.93029303      - `BetaManagedAgentsImageBlock object`93049305        Image content specified directly as base64 data or as a reference via a URL.93069307      - `BetaManagedAgentsDocumentBlock object`93089309        Document content, either specified directly as base64 data, as text, or as a reference via a URL.93109311      - `BetaManagedAgentsSearchResultBlock object`93129313        A block containing a web search result.93149315    - `is_error: optional boolean or null`93169317      Whether the tool execution resulted in an error.93189319  - `BetaManagedAgentsAgentToolUseEvent object`93209321    Event emitted when the agent invokes a built-in agent tool.93229323    - `type: "agent.tool_use"`93249325    - `id: string`93269327      Unique identifier for this event.93289329    - `input: map[unknown]`93309331      Input parameters for the tool call.93329333    - `name: string`93349335      Name of the agent tool being used.93369337    - `processed_at: string`93389339      A timestamp in RFC 3339 format93409341      format: date-time93429343    - `evaluated_permission: optional "allow" or "ask" or "deny"`93449345      AgentEvaluatedPermission enum93469347      - `"allow"`93489349      - `"ask"`93509351      - `"deny"`93529353    - `evaluation: optional BetaManagedAgentsAgentToolEvaluation`93549355      Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.93569357    - `session_thread_id: optional string or null`93589359      When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` or `user.tool_result` by `tool_use_id`, so clients do not send it back.93609361  - `BetaManagedAgentsAgentToolResultEvent object`93629363    Event representing the result of an agent tool execution.93649365    - `type: "agent.tool_result"`93669367    - `id: string`93689369      Unique identifier for this event.93709371    - `processed_at: string`93729373      A timestamp in RFC 3339 format93749375      format: date-time93769377    - `tool_use_id: string`93789379      The id of the `agent.tool_use` event this result corresponds to.93809381    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`93829383      The result content returned by the tool.93849385      - `BetaManagedAgentsTextBlock object`93869387        Regular text content.93889389      - `BetaManagedAgentsImageBlock object`93909391        Image content specified directly as base64 data or as a reference via a URL.93929393      - `BetaManagedAgentsDocumentBlock object`93949395        Document content, either specified directly as base64 data, as text, or as a reference via a URL.93969397      - `BetaManagedAgentsSearchResultBlock object`93989399        A block containing a web search result.94009401    - `is_error: optional boolean or null`94029403      Whether the tool execution resulted in an error.94049405  - `BetaManagedAgentsAgentThreadMessageReceivedEvent object`94069407    Delivery event written to the target thread's input stream when an agent-to-agent message arrives.94089409    - `type: "agent.thread_message_received"`94109411    - `id: string`94129413      Unique identifier for this event.94149415    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`94169417      Message content blocks.94189419      - `BetaManagedAgentsTextBlock object`94209421        Regular text content.94229423      - `BetaManagedAgentsImageBlock object`94249425        Image content specified directly as base64 data or as a reference via a URL.94269427      - `BetaManagedAgentsDocumentBlock object`94289429        Document content, either specified directly as base64 data, as text, or as a reference via a URL.94309431      - `BetaManagedAgentsRedactedBlock object`94329433        Placeholder for content withheld by Anthropic model policy.94349435    - `from_session_thread_id: string`94369437      Public `sthr_` ID of the thread that sent the message.94389439    - `processed_at: string`94409441      A timestamp in RFC 3339 format94429443      format: date-time94449445    - `from_agent_name: optional string or null`94469447      Name of the callable agent this message came from. Absent when received from the primary agent.94489449  - `BetaManagedAgentsAgentThreadMessageSentEvent object`94509451    Observability event emitted to the sender's output stream when an agent-to-agent message is sent.94529453    - `type: "agent.thread_message_sent"`94549455    - `id: string`94569457      Unique identifier for this event.94589459    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`94609461      Message content blocks.94629463      - `BetaManagedAgentsTextBlock object`94649465        Regular text content.94669467      - `BetaManagedAgentsImageBlock object`94689469        Image content specified directly as base64 data or as a reference via a URL.94709471      - `BetaManagedAgentsDocumentBlock object`94729473        Document content, either specified directly as base64 data, as text, or as a reference via a URL.94749475      - `BetaManagedAgentsRedactedBlock object`94769477        Placeholder for content withheld by Anthropic model policy.94789479    - `processed_at: string`94809481      A timestamp in RFC 3339 format94829483      format: date-time94849485    - `to_session_thread_id: string`94869487      Public `sthr_` ID of the thread the message was sent to.94889489    - `to_agent_name: optional string or null`94909491      Name of the callable agent this message was sent to. Absent when sent to the primary agent.94929493  - `BetaManagedAgentsAgentThreadContextCompactedEvent object`94949495    Indicates that context compaction (summarization) occurred during the session.94969497    - `type: "agent.thread_context_compacted"`94989499    - `id: string`95009501      Unique identifier for this event.95029503    - `processed_at: string`95049505      A timestamp in RFC 3339 format95069507      format: date-time95089509  - `BetaManagedAgentsSessionErrorEvent object`95109511    An error event indicating a problem occurred during session execution.95129513    - `type: "session.error"`95149515    - `id: string`95169517      Unique identifier for this event.95189519    - `error: BetaManagedAgentsUnknownError or BetaManagedAgentsModelOverloadedError or BetaManagedAgentsModelRateLimitedError or 5 more`95209521      - `BetaManagedAgentsUnknownError object`95229523        An unknown or unexpected error occurred during session execution. A fallback variant; clients that don't recognize a new error code can match on `retry_status` and `message` alone.95249525        - `type: "unknown_error"`95269527        - `message: string`95289529          Human-readable error description.95309531        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`95329533          What the client should do next in response to this error.95349535          - `BetaManagedAgentsRetryStatusRetrying object`95369537            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.95389539            - `type: "retrying"`95409541          - `BetaManagedAgentsRetryStatusExhausted object`95429543            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.95449545            - `type: "exhausted"`95469547          - `BetaManagedAgentsRetryStatusTerminal object`95489549            The session encountered a terminal error and will transition to `terminated` state.95509551            - `type: "terminal"`95529553      - `BetaManagedAgentsModelOverloadedError object`95549555        The model is currently overloaded. Emitted after automatic retries are exhausted.95569557        - `type: "model_overloaded_error"`95589559        - `message: string`95609561          Human-readable error description.95629563        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`95649565          What the client should do next in response to this error.95669567          - `BetaManagedAgentsRetryStatusRetrying object`95689569            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.95709571          - `BetaManagedAgentsRetryStatusExhausted object`95729573            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.95749575          - `BetaManagedAgentsRetryStatusTerminal object`95769577            The session encountered a terminal error and will transition to `terminated` state.95789579      - `BetaManagedAgentsModelRateLimitedError object`95809581        The model request was rate-limited.95829583        - `type: "model_rate_limited_error"`95849585        - `message: string`95869587          Human-readable error description.95889589        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`95909591          What the client should do next in response to this error.95929593          - `BetaManagedAgentsRetryStatusRetrying object`95949595            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.95969597          - `BetaManagedAgentsRetryStatusExhausted object`95989599            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.96009601          - `BetaManagedAgentsRetryStatusTerminal object`96029603            The session encountered a terminal error and will transition to `terminated` state.96049605      - `BetaManagedAgentsModelRequestFailedError object`96069607        A model request failed for a reason other than overload or rate-limiting.96089609        - `type: "model_request_failed_error"`96109611        - `message: string`96129613          Human-readable error description.96149615        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`96169617          What the client should do next in response to this error.96189619          - `BetaManagedAgentsRetryStatusRetrying object`96209621            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.96229623          - `BetaManagedAgentsRetryStatusExhausted object`96249625            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.96269627          - `BetaManagedAgentsRetryStatusTerminal object`96289629            The session encountered a terminal error and will transition to `terminated` state.96309631      - `BetaManagedAgentsMCPConnectionFailedError object`96329633        Failed to connect to an MCP server.96349635        - `type: "mcp_connection_failed_error"`96369637        - `mcp_server_name: string`96389639          Name of the MCP server that failed to connect.96409641        - `message: string`96429643          Human-readable error description.96449645        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`96469647          What the client should do next in response to this error.96489649          - `BetaManagedAgentsRetryStatusRetrying object`96509651            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.96529653          - `BetaManagedAgentsRetryStatusExhausted object`96549655            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.96569657          - `BetaManagedAgentsRetryStatusTerminal object`96589659            The session encountered a terminal error and will transition to `terminated` state.96609661      - `BetaManagedAgentsMCPAuthenticationFailedError object`96629663        Authentication to an MCP server failed.96649665        - `type: "mcp_authentication_failed_error"`96669667        - `mcp_server_name: string`96689669          Name of the MCP server that failed authentication.96709671        - `message: string`96729673          Human-readable error description.96749675        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`96769677          What the client should do next in response to this error.96789679          - `BetaManagedAgentsRetryStatusRetrying object`96809681            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.96829683          - `BetaManagedAgentsRetryStatusExhausted object`96849685            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.96869687          - `BetaManagedAgentsRetryStatusTerminal object`96889689            The session encountered a terminal error and will transition to `terminated` state.96909691      - `BetaManagedAgentsBillingError object`96929693        The caller's organization or workspace cannot make model requests — out of credits or spend limit reached. Retrying with the same credentials will not succeed; the caller must resolve the billing state.96949695        - `type: "billing_error"`96969697        - `message: string`96989699          Human-readable error description.97009701        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`97029703          What the client should do next in response to this error.97049705          - `BetaManagedAgentsRetryStatusRetrying object`97069707            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.97089709          - `BetaManagedAgentsRetryStatusExhausted object`97109711            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.97129713          - `BetaManagedAgentsRetryStatusTerminal object`97149715            The session encountered a terminal error and will transition to `terminated` state.97169717      - `BetaManagedAgentsCredentialHostUnreachableError object`97189719        An `environment_variable` credential's `auth.networking.allowed_hosts` includes a host the environment's network policy does not permit.97209721        - `type: "credential_host_unreachable_error"`97229723        - `credential_id: string`97249725          ID of the affected credential.97269727        - `message: string`97289729          Human-readable error description.97309731        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`97329733          What the client should do next in response to this error.97349735          - `BetaManagedAgentsRetryStatusRetrying object`97369737            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.97389739          - `BetaManagedAgentsRetryStatusExhausted object`97409741            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.97429743          - `BetaManagedAgentsRetryStatusTerminal object`97449745            The session encountered a terminal error and will transition to `terminated` state.97469747        - `vault_id: string`97489749          ID of the vault containing the affected credential.97509751    - `processed_at: string`97529753      A timestamp in RFC 3339 format97549755      format: date-time97569757  - `BetaManagedAgentsSessionStatusRescheduledEvent object`97589759    Indicates the session is recovering from an error state and is rescheduled for execution.97609761    - `type: "session.status_rescheduled"`97629763    - `id: string`97649765      Unique identifier for this event.97669767    - `processed_at: string`97689769      A timestamp in RFC 3339 format97709771      format: date-time97729773  - `BetaManagedAgentsSessionStatusRunningEvent object`97749775    Indicates the session is actively running and the agent is working.97769777    - `type: "session.status_running"`97789779    - `id: string`97809781      Unique identifier for this event.97829783    - `processed_at: string`97849785      A timestamp in RFC 3339 format97869787      format: date-time97889789  - `BetaManagedAgentsSessionStatusIdleEvent object`97909791    Indicates the agent has paused and is awaiting user input.97929793    - `type: "session.status_idle"`97949795    - `id: string`97969797      Unique identifier for this event.97989799    - `processed_at: string`98009801      A timestamp in RFC 3339 format98029803      format: date-time98049805    - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or BetaManagedAgentsSessionBudgetReached`98069807      - `BetaManagedAgentsSessionEndTurn object`98089809        The agent completed its turn naturally and is ready for the next user message.98109811        - `type: "end_turn"`98129813      - `BetaManagedAgentsSessionRequiresAction object`98149815        The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.98169817        - `type: "requires_action"`98189819        - `event_ids: array of string`98209821          The ids of events the agent is blocked on. Resolving fewer than all re-emits `session.status_idle` with the remainder.98229823      - `BetaManagedAgentsSessionRetriesExhausted object`98249825        The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`.98269827        - `type: "retries_exhausted"`98289829      - `BetaManagedAgentsSessionBudgetReached object`98309831        The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget.98329833        - `type: "budget_reached"`98349835  - `BetaManagedAgentsSessionStatusTerminatedEvent object`98369837    Indicates the session has terminated, either due to an error or completion.98389839    - `type: "session.status_terminated"`98409841    - `id: string`98429843      Unique identifier for this event.98449845    - `processed_at: string`98469847      A timestamp in RFC 3339 format98489849      format: date-time98509851  - `BetaManagedAgentsSessionThreadCreatedEvent object`98529853    Emitted when a subagent is spawned as a new thread. Written to the parent thread's output stream so clients observing the session see child creation.98549855    - `type: "session.thread_created"`98569857    - `id: string`98589859      Unique identifier for this event.98609861    - `agent_name: string`98629863      Name of the callable agent the thread runs.98649865    - `processed_at: string`98669867      A timestamp in RFC 3339 format98689869      format: date-time98709871    - `session_thread_id: string`98729873      Public `sthr_` ID of the newly created thread.98749875  - `BetaManagedAgentsSpanOutcomeEvaluationStartEvent object`98769877    Emitted when an outcome evaluation cycle begins.98789879    - `type: "span.outcome_evaluation_start"`98809881    - `id: string`98829883      Unique identifier for this event.98849885    - `iteration: number`98869887      0-indexed revision cycle. 0 is the first evaluation; 1 is the re-evaluation after the first revision; etc.98889889      format: int3298909891    - `outcome_id: string`98929893      The `outc_` ID of the outcome being evaluated.98949895    - `processed_at: string`98969897      A timestamp in RFC 3339 format98989899      format: date-time99009901  - `BetaManagedAgentsSpanOutcomeEvaluationEndEvent object`99029903    Emitted when an outcome evaluation cycle completes. Carries the verdict and aggregate token usage. A verdict of `needs_revision` means another evaluation cycle follows; `satisfied`, `max_iterations_reached`, `failed`, or `interrupted` are terminal — no further evaluation cycles follow.99049905    - `type: "span.outcome_evaluation_end"`99069907    - `id: string`99089909      Unique identifier for this event.99109911    - `explanation: string`99129913      Human-readable explanation of the verdict. For `needs_revision`, describes which criteria failed and why.99149915    - `iteration: number`99169917      0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.99189919      format: int3299209921    - `outcome_evaluation_start_id: string`99229923      The id of the corresponding `span.outcome_evaluation_start` event.99249925    - `outcome_id: string`99269927      The `outc_` ID of the outcome being evaluated.99289929    - `processed_at: string`99309931      A timestamp in RFC 3339 format99329933      format: date-time99349935    - `result: string`99369937      Evaluation verdict. 'satisfied': criteria met, session goes idle. 'needs_revision': criteria not met, another revision cycle follows. 'max_iterations_reached': evaluation budget exhausted with criteria still unmet — one final acknowledgment turn follows before the session goes idle, but no further evaluation runs. 'failed': grader determined the rubric does not apply to the deliverables. 'interrupted': user sent an interrupt while evaluation was in progress.99389939    - `usage: BetaManagedAgentsSpanModelUsage`99409941      Token usage for a single model request.99429943      - `cache_creation_input_tokens: number`99449945        Tokens used to create prompt cache in this request.99469947        format: int3299489949      - `cache_read_input_tokens: number`99509951        Tokens read from prompt cache in this request.99529953        format: int3299549955      - `input_tokens: number`99569957        Input tokens consumed by this request.99589959        format: int3299609961      - `output_tokens: number`99629963        Output tokens generated by this request.99649965        format: int3299669967      - `speed: optional "standard" or "fast" or null`99689969        Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.99709971        - `"standard"`99729973        - `"fast"`99749975  - `BetaManagedAgentsSpanModelRequestStartEvent object`99769977    Emitted when a model request is initiated by the agent.99789979    - `type: "span.model_request_start"`99809981    - `id: string`99829983      Unique identifier for this event.99849985    - `processed_at: string`99869987      A timestamp in RFC 3339 format99889989      format: date-time99909991  - `BetaManagedAgentsSpanModelRequestEndEvent object`99929993    Emitted when a model request completes.99949995    - `type: "span.model_request_end"`99969997    - `id: string`99989999      Unique identifier for this event.1000010001    - `is_error: boolean or null`1000210003      Whether the model request resulted in an error.1000410005    - `model_request_start_id: string`1000610007      The id of the corresponding `span.model_request_start` event.1000810009    - `model_usage: BetaManagedAgentsSpanModelUsage`1001010011      Token usage for a single model request.1001210013    - `processed_at: string`1001410015      A timestamp in RFC 3339 format1001610017      format: date-time1001810019  - `BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent object`1002010021    Periodic heartbeat emitted while an outcome evaluation cycle is in progress. Distinguishes 'evaluation is actively running' from 'evaluation is stuck' between the corresponding `span.outcome_evaluation_start` and `span.outcome_evaluation_end` events.1002210023    - `type: "span.outcome_evaluation_ongoing"`1002410025    - `id: string`1002610027      Unique identifier for this event.1002810029    - `iteration: number`1003010031      0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.1003210033      format: int321003410035    - `outcome_id: string`1003610037      The `outc_` ID of the outcome being evaluated.1003810039    - `processed_at: string`1004010041      A timestamp in RFC 3339 format1004210043      format: date-time1004410045  - `BetaManagedAgentsUserDefineOutcomeEvent object`1004610047    Echo of a `user.define_outcome` input event. Carries the server-generated `outcome_id` that subsequent `span.outcome_evaluation_*` events reference.1004810049    - `type: "user.define_outcome"`1005010051    - `id: string`1005210053      Unique identifier for this event.1005410055    - `description: string`1005610057      What the agent should produce. Copied from the input event.1005810059    - `max_iterations: number or null`1006010061      Evaluate-then-revise cycles before giving up. Default 3, max 20.1006210063      format: int321006410065    - `outcome_id: string`1006610067      Server-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.1006810069    - `processed_at: string`1007010071      A timestamp in RFC 3339 format1007210073      format: date-time1007410075    - `rubric: BetaManagedAgentsFileRubric or BetaManagedAgentsTextRubric`1007610077      Rubric for grading the quality of an outcome.1007810079      - `BetaManagedAgentsFileRubric object`1008010081        Rubric referenced by a file uploaded via the Files API.1008210083        - `type: "file"`1008410085        - `file_id: string`1008610087          ID of the rubric file.1008810089      - `BetaManagedAgentsTextRubric object`1009010091        Rubric content provided inline as text.1009210093        - `type: "text"`1009410095        - `content: string`1009610097          Rubric content. Plain text or markdown — the grader treats it as freeform text.1009810099  - `BetaManagedAgentsSessionDeletedEvent object`1010010101    Emitted when a session has been deleted. Terminates any active event stream — no further events will be emitted for this session.1010210103    - `type: "session.deleted"`1010410105    - `id: string`1010610107      Unique identifier for this event.1010810109    - `processed_at: string`1011010111      A timestamp in RFC 3339 format1011210113      format: date-time1011410115  - `BetaManagedAgentsSessionThreadStatusRunningEvent object`1011610117    A session thread has begun executing. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.1011810119    - `type: "session.thread_status_running"`1012010121    - `id: string`1012210123      Unique identifier for this event.1012410125    - `agent_name: string`1012610127      Name of the agent the thread runs.1012810129    - `processed_at: string`1013010131      A timestamp in RFC 3339 format1013210133      format: date-time1013410135    - `session_thread_id: string`1013610137      Public sthr_ ID of the thread that started running.1013810139  - `BetaManagedAgentsSessionThreadStatusIdleEvent object`1014010141    A session thread has yielded and is awaiting input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.1014210143    - `type: "session.thread_status_idle"`1014410145    - `id: string`1014610147      Unique identifier for this event.1014810149    - `agent_name: string`1015010151      Name of the agent the thread runs.1015210153    - `processed_at: string`1015410155      A timestamp in RFC 3339 format1015610157      format: date-time1015810159    - `session_thread_id: string`1016010161      Public sthr_ ID of the thread that went idle.1016210163    - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or BetaManagedAgentsSessionBudgetReached`1016410165      - `BetaManagedAgentsSessionEndTurn object`1016610167        The agent completed its turn naturally and is ready for the next user message.1016810169      - `BetaManagedAgentsSessionRequiresAction object`1017010171        The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.1017210173      - `BetaManagedAgentsSessionRetriesExhausted object`1017410175        The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`.1017610177      - `BetaManagedAgentsSessionBudgetReached object`1017810179        The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget.1018010181  - `BetaManagedAgentsSessionThreadStatusTerminatedEvent object`1018210183    A session thread has terminated and will accept no further input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.1018410185    - `type: "session.thread_status_terminated"`1018610187    - `id: string`1018810189      Unique identifier for this event.1019010191    - `agent_name: string`1019210193      Name of the agent the thread runs.1019410195    - `processed_at: string`1019610197      A timestamp in RFC 3339 format1019810199      format: date-time1020010201    - `session_thread_id: string`1020210203      Public sthr_ ID of the thread that terminated.1020410205  - `BetaManagedAgentsUserToolResultEvent object`1020610207    Event sent by the client providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.1020810209    - `type: "user.tool_result"`1021010211    - `id: string`1021210213      Unique identifier for this event.1021410215    - `tool_use_id: string`1021610217      The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.1021810219    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`1022010221      The result content returned by the tool.1022210223      - `BetaManagedAgentsTextBlock object`1022410225        Regular text content.1022610227      - `BetaManagedAgentsImageBlock object`1022810229        Image content specified directly as base64 data or as a reference via a URL.1023010231      - `BetaManagedAgentsDocumentBlock object`1023210233        Document content, either specified directly as base64 data, as text, or as a reference via a URL.1023410235      - `BetaManagedAgentsSearchResultBlock object`1023610237        A block containing a web search result.1023810239    - `is_error: optional boolean or null`1024010241      Whether the tool execution resulted in an error.1024210243    - `processed_at: optional string or null`1024410245      A timestamp in RFC 3339 format1024610247      format: date-time1024810249    - `session_thread_id: optional string or null`1025010251      Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.1025210253  - `BetaManagedAgentsSessionThreadStatusRescheduledEvent object`1025410255    A session thread hit a transient error and is retrying automatically. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.1025610257    - `type: "session.thread_status_rescheduled"`1025810259    - `id: string`1026010261      Unique identifier for this event.1026210263    - `agent_name: string`1026410265      Name of the agent the thread runs.1026610267    - `processed_at: string`1026810269      A timestamp in RFC 3339 format1027010271      format: date-time1027210273    - `session_thread_id: string`1027410275      Public sthr_ ID of the thread that is retrying.1027610277  - `BetaManagedAgentsSessionUpdatedEvent object`1027810279    Emitted when an UpdateSession request changed at least one field. Carries only the fields that changed; absent fields were not part of the update. The new configuration applies from the next turn.1028010281    - `type: "session.updated"`1028210283    - `id: string`1028410285      Unique identifier for this event.1028610287    - `processed_at: string`1028810289      A timestamp in RFC 3339 format1029010291      format: date-time1029210293    - `agent: optional BetaManagedAgentsSessionAgent or null`1029410295      Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.1029610297      - `type: "agent"`1029810299      - `id: string`1030010301      - `description: string or null`1030210303      - `mcp_servers: array of BetaManagedAgentsMCPServerURLDefinition`1030410305        - `type: "url"`1030610307        - `name: string`1030810309        - `url: string`1031010311      - `model: BetaManagedAgentsModelConfig`1031210313        Model identifier and configuration.1031410315        - `id: BetaManagedAgentsModel`1031610317          The model that will power your agent.1031810319          See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.1032010321          - `"claude-fable-5-1" or "claude-sonnet-5" or "claude-fable-5" or 11 more`1032210323            The model that will power your agent.1032410325            See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.1032610327            - `"claude-fable-5-1"`1032810329              Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows1033010331            - `"claude-sonnet-5"`1033210333              High-performance model for coding and agents1033410335            - `"claude-fable-5"`1033610337              Next generation of intelligence for the hardest knowledge work and coding problems1033810339            - `"claude-opus-5"`1034010341              Powerful intelligence for long-running agents and coding1034210343            - `"claude-opus-4-8"`1034410345              Powerful intelligence for long-running agents and coding1034610347            - `"claude-opus-4-7"`1034810349              Powerful intelligence for long-running agents and coding1035010351            - `"claude-opus-4-6"`1035210353              Powerful intelligence for long-running agents and coding1035410355            - `"claude-sonnet-4-6"`1035610357              Best combination of speed and intelligence1035810359            - `"claude-haiku-4-5"`1036010361              Fastest model with near-frontier intelligence1036210363            - `"claude-haiku-4-5-20251001"`1036410365              Fastest model with near-frontier intelligence1036610367            - `"claude-opus-4-5"`1036810369              Powerful intelligence for long-running agents and coding1037010371            - `"claude-opus-4-5-20251101"`1037210373              Powerful intelligence for long-running agents and coding1037410375            - `"claude-sonnet-4-5"`1037610377              High-performance model for agents and coding1037810379            - `"claude-sonnet-4-5-20250929"`1038010381              High-performance model for agents and coding1038210383          - `string`1038410385        - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more`1038610387          How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.1038810389          - `BetaManagedAgentsEffortLow object`1039010391            Low effort. Favors latency over reasoning depth.1039210393            - `type: "low"`1039410395          - `BetaManagedAgentsEffortMedium object`1039610397            Medium effort. Balances latency and reasoning depth.1039810399            - `type: "medium"`1040010401          - `BetaManagedAgentsEffortHigh object`1040210403            High effort. Favors reasoning depth.1040410405            - `type: "high"`1040610407          - `BetaManagedAgentsEffortXhigh object`1040810409            Extra-high effort. Not all models accept this level.1041010411            - `type: "xhigh"`1041210413          - `BetaManagedAgentsEffortMax object`1041410415            Maximum effort. Favors reasoning depth over latency.1041610417            - `type: "max"`1041810419        - `inference_geo: optional string`1042010421          Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.1042210423        - `speed: optional "standard" or "fast"`1042410425          Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.1042610427          - `"standard"`1042810429          - `"fast"`1043010431      - `multiagent: BetaManagedAgentsSessionMultiagentCoordinator or null`1043210433        Resolved coordinator topology with full agent definitions for each roster member.1043410435        - `type: "coordinator"`1043610437        - `agents: array of BetaManagedAgentsSessionThreadAgent or BetaManagedAgentsAdvisor`1043810439          Full `agent` definitions the coordinator may spawn as session threads.1044010441          - `BetaManagedAgentsSessionThreadAgent object`1044210443            Resolved `agent` definition for a single `session_thread`. Snapshot of the agent at thread creation time. The multiagent roster is not repeated here; read it from `Session.agent`.1044410445            - `type: "agent"`1044610447            - `id: string`1044810449            - `description: string or null`1045010451            - `mcp_servers: array of BetaManagedAgentsMCPServerURLDefinition`1045210453              - `type: "url"`1045410455              - `name: string`1045610457              - `url: string`1045810459            - `model: BetaManagedAgentsModelConfig`1046010461              Model identifier and configuration.1046210463            - `name: string`1046410465            - `skills: array of BetaManagedAgentsAnthropicSkill or BetaManagedAgentsCustomSkill`1046610467              - `BetaManagedAgentsAnthropicSkill object`1046810469                A resolved Anthropic-managed skill.1047010471                - `type: "anthropic"`1047210473                - `skill_id: string`1047410475                - `version: string`1047610477              - `BetaManagedAgentsCustomSkill object`1047810479                A resolved user-created custom skill.1048010481                - `type: "custom"`1048210483                - `skill_id: string`1048410485                - `version: string`1048610487            - `system: string or null`1048810489            - `tools: array of BetaManagedAgentsAgentToolset20260401 or BetaManagedAgentsMCPToolset or BetaManagedAgentsCustomTool`1049010491              - `BetaManagedAgentsAgentToolset20260401 object`1049210493                - `type: "agent_toolset_20260401"`1049410495                - `configs: array of BetaManagedAgentsAgentToolConfig`1049610497                  - `BetaManagedAgentsBashToolConfig object`1049810499                    Configuration for the bash tool.1050010501                    - `type: "bash"`1050210503                    - `enabled: boolean`1050410505                    - `name: "bash"`1050610507                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1050810509                      Permission policy for tool execution.1051010511                      - `BetaManagedAgentsAlwaysAllowPolicy object`1051210513                        Tool calls are automatically approved without user confirmation.1051410515                        - `type: "always_allow"`1051610517                      - `BetaManagedAgentsAlwaysAskPolicy object`1051810519                        Tool calls require user confirmation before execution.1052010521                        - `type: "always_ask"`1052210523                      - `BetaManagedAgentsAutoPolicy object`1052410525                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1052610527                        - `type: "auto"`1052810529                  - `BetaManagedAgentsEditToolConfig object`1053010531                    Configuration for the edit tool.1053210533                    - `type: "edit"`1053410535                    - `enabled: boolean`1053610537                    - `name: "edit"`1053810539                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1054010541                      Permission policy for tool execution.1054210543                      - `BetaManagedAgentsAlwaysAllowPolicy object`1054410545                        Tool calls are automatically approved without user confirmation.1054610547                      - `BetaManagedAgentsAlwaysAskPolicy object`1054810549                        Tool calls require user confirmation before execution.1055010551                      - `BetaManagedAgentsAutoPolicy object`1055210553                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1055410555                  - `BetaManagedAgentsReadToolConfig object`1055610557                    Configuration for the read tool.1055810559                    - `type: "read"`1056010561                    - `enabled: boolean`1056210563                    - `name: "read"`1056410565                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1056610567                      Permission policy for tool execution.1056810569                      - `BetaManagedAgentsAlwaysAllowPolicy object`1057010571                        Tool calls are automatically approved without user confirmation.1057210573                      - `BetaManagedAgentsAlwaysAskPolicy object`1057410575                        Tool calls require user confirmation before execution.1057610577                      - `BetaManagedAgentsAutoPolicy object`1057810579                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1058010581                  - `BetaManagedAgentsWriteToolConfig object`1058210583                    Configuration for the write tool.1058410585                    - `type: "write"`1058610587                    - `enabled: boolean`1058810589                    - `name: "write"`1059010591                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1059210593                      Permission policy for tool execution.1059410595                      - `BetaManagedAgentsAlwaysAllowPolicy object`1059610597                        Tool calls are automatically approved without user confirmation.1059810599                      - `BetaManagedAgentsAlwaysAskPolicy object`1060010601                        Tool calls require user confirmation before execution.1060210603                      - `BetaManagedAgentsAutoPolicy object`1060410605                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1060610607                  - `BetaManagedAgentsGlobToolConfig object`1060810609                    Configuration for the glob tool.1061010611                    - `type: "glob"`1061210613                    - `enabled: boolean`1061410615                    - `name: "glob"`1061610617                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1061810619                      Permission policy for tool execution.1062010621                      - `BetaManagedAgentsAlwaysAllowPolicy object`1062210623                        Tool calls are automatically approved without user confirmation.1062410625                      - `BetaManagedAgentsAlwaysAskPolicy object`1062610627                        Tool calls require user confirmation before execution.1062810629                      - `BetaManagedAgentsAutoPolicy object`1063010631                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1063210633                  - `BetaManagedAgentsGrepToolConfig object`1063410635                    Configuration for the grep tool.1063610637                    - `type: "grep"`1063810639                    - `enabled: boolean`1064010641                    - `name: "grep"`1064210643                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1064410645                      Permission policy for tool execution.1064610647                      - `BetaManagedAgentsAlwaysAllowPolicy object`1064810649                        Tool calls are automatically approved without user confirmation.1065010651                      - `BetaManagedAgentsAlwaysAskPolicy object`1065210653                        Tool calls require user confirmation before execution.1065410655                      - `BetaManagedAgentsAutoPolicy object`1065610657                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1065810659                  - `BetaManagedAgentsWebFetchToolConfig object`1066010661                    Configuration for the web_fetch tool.1066210663                    - `type: "web_fetch"`1066410665                    - `enabled: boolean`1066610667                    - `name: "web_fetch"`1066810669                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1067010671                      Permission policy for tool execution.1067210673                      - `BetaManagedAgentsAlwaysAllowPolicy object`1067410675                        Tool calls are automatically approved without user confirmation.1067610677                      - `BetaManagedAgentsAlwaysAskPolicy object`1067810679                        Tool calls require user confirmation before execution.1068010681                      - `BetaManagedAgentsAutoPolicy object`1068210683                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1068410685                    - `allowed_domains: optional array of string`1068610687                    - `blocked_domains: optional array of string`1068810689                    - `max_content_tokens: optional number or null`1069010691                      format: int321069210693                  - `BetaManagedAgentsWebSearchToolConfig object`1069410695                    Configuration for the web_search tool.1069610697                    - `type: "web_search"`1069810699                    - `enabled: boolean`1070010701                    - `name: "web_search"`1070210703                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1070410705                      Permission policy for tool execution.1070610707                      - `BetaManagedAgentsAlwaysAllowPolicy object`1070810709                        Tool calls are automatically approved without user confirmation.1071010711                      - `BetaManagedAgentsAlwaysAskPolicy object`1071210713                        Tool calls require user confirmation before execution.1071410715                      - `BetaManagedAgentsAutoPolicy object`1071610717                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1071810719                    - `allowed_domains: optional array of string`1072010721                    - `blocked_domains: optional array of string`1072210723                    - `user_location: optional BetaManagedAgentsUserLocation or null`1072410725                      Approximate user location for search result localization.1072610727                      - `type: "approximate"`1072810729                        Location precision. Only "approximate" is supported.1073010731                      - `city: optional string or null`1073210733                        City name.1073410735                        minLength: 1, maxLength: 2551073610737                      - `country: optional string or null`1073810739                        Two-letter ISO 3166-1 country code, uppercase.1074010741                      - `region: optional string or null`1074210743                        Region or state name.1074410745                        minLength: 1, maxLength: 2551074610747                      - `timezone: optional string or null`1074810749                        IANA timezone identifier, e.g. "America/Los_Angeles".1075010751                        minLength: 1, maxLength: 2551075210753                - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`1075410755                  Resolved default configuration for agent tools.1075610757                  - `enabled: boolean`1075810759                  - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1076010761                    Permission policy for tool execution.1076210763                    - `BetaManagedAgentsAlwaysAllowPolicy object`1076410765                      Tool calls are automatically approved without user confirmation.1076610767                    - `BetaManagedAgentsAlwaysAskPolicy object`1076810769                      Tool calls require user confirmation before execution.1077010771                    - `BetaManagedAgentsAutoPolicy object`1077210773                      The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1077410775              - `BetaManagedAgentsMCPToolset object`1077610777                - `type: "mcp_toolset"`1077810779                - `configs: array of BetaManagedAgentsMCPToolConfig`1078010781                  - `enabled: boolean`1078210783                  - `name: string`1078410785                  - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1078610787                    Permission policy for tool execution.1078810789                    - `BetaManagedAgentsAlwaysAllowPolicy object`1079010791                      Tool calls are automatically approved without user confirmation.1079210793                    - `BetaManagedAgentsAlwaysAskPolicy object`1079410795                      Tool calls require user confirmation before execution.1079610797                    - `BetaManagedAgentsAutoPolicy object`1079810799                      The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1080010801                - `default_config: BetaManagedAgentsMCPToolsetDefaultConfig`1080210803                  Resolved default configuration for all tools from an MCP server.1080410805                  - `enabled: boolean`1080610807                  - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1080810809                    Permission policy for tool execution.1081010811                    - `BetaManagedAgentsAlwaysAllowPolicy object`1081210813                      Tool calls are automatically approved without user confirmation.1081410815                    - `BetaManagedAgentsAlwaysAskPolicy object`1081610817                      Tool calls require user confirmation before execution.1081810819                    - `BetaManagedAgentsAutoPolicy object`1082010821                      The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1082210823                - `mcp_server_name: string`1082410825              - `BetaManagedAgentsCustomTool object`1082610827                A custom tool as returned in API responses.1082810829                - `type: "custom"`1083010831                - `description: string`1083210833                - `input_schema: BetaManagedAgentsCustomToolInputSchema`1083410835                  JSON Schema for custom tool input parameters.1083610837                  - `type: "object"`1083810839                  - `properties: optional map[unknown] or null`1084010841                  - `required: optional array of string or null`1084210843                - `name: string`1084410845            - `version: number`1084610847              format: int321084810849          - `BetaManagedAgentsAdvisor object`1085010851            Platform advisor roster entry: a model the session's primary thread may consult mid-turn.1085210853            - `type: "advisor"`1085410855            - `model: string`1085610857              The advisor model id.1085810859      - `name: string`1086010861      - `skills: array of BetaManagedAgentsAnthropicSkill or BetaManagedAgentsCustomSkill`1086210863        - `BetaManagedAgentsAnthropicSkill object`1086410865          A resolved Anthropic-managed skill.1086610867        - `BetaManagedAgentsCustomSkill object`1086810869          A resolved user-created custom skill.1087010871      - `system: string or null`1087210873      - `tools: array of BetaManagedAgentsAgentToolset20260401 or BetaManagedAgentsMCPToolset or BetaManagedAgentsCustomTool`1087410875        - `BetaManagedAgentsAgentToolset20260401 object`1087610877        - `BetaManagedAgentsMCPToolset object`1087810879        - `BetaManagedAgentsCustomTool object`1088010881          A custom tool as returned in API responses.1088210883      - `version: number`1088410885        format: int321088610887    - `budget: optional BetaManagedAgentsBudgetLimit or null`1088810889      A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.1089010891      - `type: "limit"`1089210893      - `max_list_cost: BetaMonetaryAmount`1089410895        A monetary amount in a specific currency.1089610897        - `amount: string`1089810899          Amount in minor units of the currency, as an integer decimal string with no leading zeros: "2500" is $25.00 and "50" is fifty cents. A string rather than a number so no float rounding is ever applied.1090010901        - `currency: BetaCurrency`1090210903          Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced.1090410905    - `metadata: optional map[string]`1090610907      The session's full metadata bag after the update. Present when the update set non-empty metadata; absent when metadata was unchanged or cleared to empty.1090810909    - `title: optional string or null`1091010911      The session's new title. Present only when the update changed it.1091210913  - `BetaManagedAgentsSystemMessageEvent object`1091410915    A mid-conversation system message event. Carries system-role content that is appended to the session as a `role: "system"` turn.1091610917    - `type: "system.message"`1091810919    - `id: string`1092010921      Unique identifier for this event.1092210923    - `content: array of BetaManagedAgentsSystemContentBlock`1092410925      System content blocks. Text-only.1092610927      - `type: "text"`1092810929      - `text: string`1093010931        The text content.1093210933        minLength: 11093410935    - `processed_at: optional string or null`1093610937      A timestamp in RFC 3339 format1093810939      format: date-time1094010941  - `BetaManagedAgentsSessionUsageEvent object`1094210943    Periodic snapshot of the session's cumulative usage and tracked list cost.1094410945    - `type: "session.usage"`1094610947    - `id: string`1094810949      Unique identifier for this event.1095010951    - `processed_at: string`1095210953      A timestamp in RFC 3339 format1095410955      format: date-time1095610957    - `usage: BetaManagedAgentsSessionUsageSnapshot`1095810959      Point-in-time snapshot of a session's cumulative usage.1096010961      - `active_seconds: optional number`1096210963        Cumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once. This is the duration the session's runtime cost is priced on.1096410965        format: double1096610967      - `cache_creation: optional BetaManagedAgentsCacheCreationUsage`1096810969        Prompt-cache creation token usage broken down by cache lifetime.1097010971        - `ephemeral_1h_input_tokens: optional number`1097210973          Tokens used to create 1-hour ephemeral cache entries.1097410975          format: int321097610977        - `ephemeral_5m_input_tokens: optional number`1097810979          Tokens used to create 5-minute ephemeral cache entries.1098010981          format: int321098210983      - `cache_read_input_tokens: optional number`1098410985        Total tokens read from prompt cache.1098610987        format: int321098810989      - `input_tokens: optional number`1099010991        Total input tokens consumed across all turns.1099210993        format: int321099410995      - `list_cost: optional BetaMonetaryAmount`1099610997        A monetary amount in a specific currency.1099810999      - `output_tokens: optional number`1100011001        Total output tokens generated across all turns.1100211003        format: int321100411005      - `server_tool_use: optional BetaManagedAgentsServerToolUsage`1100611007        Cumulative count of server-executed tool invocations, broken down by tool.1100811009        - `web_fetch_requests: optional number`1101011011          Number of server-executed web fetch requests.1101211013          format: int321101411015        - `web_search_requests: optional number`1101611017          Number of server-executed web search requests.1101811019          format: int321102011021    - `budget: optional BetaManagedAgentsBudgetLimit or null`1102211023      A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.1102411025### Beta Managed Agents Session Requires Action1102611027- `BetaManagedAgentsSessionRequiresAction object`1102811029  The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.1103011031  - `type: "requires_action"`1103211033  - `event_ids: array of string`1103411035    The ids of events the agent is blocked on. Resolving fewer than all re-emits `session.status_idle` with the remainder.1103611037### Beta Managed Agents Session Retries Exhausted1103811039- `BetaManagedAgentsSessionRetriesExhausted object`1104011041  The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`.1104211043  - `type: "retries_exhausted"`1104411045### Beta Managed Agents Session Status Idle Event1104611047- `BetaManagedAgentsSessionStatusIdleEvent object`1104811049  Indicates the agent has paused and is awaiting user input.1105011051  - `type: "session.status_idle"`1105211053  - `id: string`1105411055    Unique identifier for this event.1105611057  - `processed_at: string`1105811059    A timestamp in RFC 3339 format1106011061    format: date-time1106211063  - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or BetaManagedAgentsSessionBudgetReached`1106411065    - `BetaManagedAgentsSessionEndTurn object`1106611067      The agent completed its turn naturally and is ready for the next user message.1106811069      - `type: "end_turn"`1107011071    - `BetaManagedAgentsSessionRequiresAction object`1107211073      The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.1107411075      - `type: "requires_action"`1107611077      - `event_ids: array of string`1107811079        The ids of events the agent is blocked on. Resolving fewer than all re-emits `session.status_idle` with the remainder.1108011081    - `BetaManagedAgentsSessionRetriesExhausted object`1108211083      The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`.1108411085      - `type: "retries_exhausted"`1108611087    - `BetaManagedAgentsSessionBudgetReached object`1108811089      The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget.1109011091      - `type: "budget_reached"`1109211093### Beta Managed Agents Session Status Rescheduled Event1109411095- `BetaManagedAgentsSessionStatusRescheduledEvent object`1109611097  Indicates the session is recovering from an error state and is rescheduled for execution.1109811099  - `type: "session.status_rescheduled"`1110011101  - `id: string`1110211103    Unique identifier for this event.1110411105  - `processed_at: string`1110611107    A timestamp in RFC 3339 format1110811109    format: date-time1111011111### Beta Managed Agents Session Status Running Event1111211113- `BetaManagedAgentsSessionStatusRunningEvent object`1111411115  Indicates the session is actively running and the agent is working.1111611117  - `type: "session.status_running"`1111811119  - `id: string`1112011121    Unique identifier for this event.1112211123  - `processed_at: string`1112411125    A timestamp in RFC 3339 format1112611127    format: date-time1112811129### Beta Managed Agents Session Status Terminated Event1113011131- `BetaManagedAgentsSessionStatusTerminatedEvent object`1113211133  Indicates the session has terminated, either due to an error or completion.1113411135  - `type: "session.status_terminated"`1113611137  - `id: string`1113811139    Unique identifier for this event.1114011141  - `processed_at: string`1114211143    A timestamp in RFC 3339 format1114411145    format: date-time1114611147### Beta Managed Agents Session Thread Created Event1114811149- `BetaManagedAgentsSessionThreadCreatedEvent object`1115011151  Emitted when a subagent is spawned as a new thread. Written to the parent thread's output stream so clients observing the session see child creation.1115211153  - `type: "session.thread_created"`1115411155  - `id: string`1115611157    Unique identifier for this event.1115811159  - `agent_name: string`1116011161    Name of the callable agent the thread runs.1116211163  - `processed_at: string`1116411165    A timestamp in RFC 3339 format1116611167    format: date-time1116811169  - `session_thread_id: string`1117011171    Public `sthr_` ID of the newly created thread.1117211173### Beta Managed Agents Session Thread Status Idle Event1117411175- `BetaManagedAgentsSessionThreadStatusIdleEvent object`1117611177  A session thread has yielded and is awaiting input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.1117811179  - `type: "session.thread_status_idle"`1118011181  - `id: string`1118211183    Unique identifier for this event.1118411185  - `agent_name: string`1118611187    Name of the agent the thread runs.1118811189  - `processed_at: string`1119011191    A timestamp in RFC 3339 format1119211193    format: date-time1119411195  - `session_thread_id: string`1119611197    Public sthr_ ID of the thread that went idle.1119811199  - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or BetaManagedAgentsSessionBudgetReached`1120011201    - `BetaManagedAgentsSessionEndTurn object`1120211203      The agent completed its turn naturally and is ready for the next user message.1120411205      - `type: "end_turn"`1120611207    - `BetaManagedAgentsSessionRequiresAction object`1120811209      The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.1121011211      - `type: "requires_action"`1121211213      - `event_ids: array of string`1121411215        The ids of events the agent is blocked on. Resolving fewer than all re-emits `session.status_idle` with the remainder.1121611217    - `BetaManagedAgentsSessionRetriesExhausted object`1121811219      The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`.1122011221      - `type: "retries_exhausted"`1122211223    - `BetaManagedAgentsSessionBudgetReached object`1122411225      The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget.1122611227      - `type: "budget_reached"`1122811229### Beta Managed Agents Session Thread Status Rescheduled Event1123011231- `BetaManagedAgentsSessionThreadStatusRescheduledEvent object`1123211233  A session thread hit a transient error and is retrying automatically. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.1123411235  - `type: "session.thread_status_rescheduled"`1123611237  - `id: string`1123811239    Unique identifier for this event.1124011241  - `agent_name: string`1124211243    Name of the agent the thread runs.1124411245  - `processed_at: string`1124611247    A timestamp in RFC 3339 format1124811249    format: date-time1125011251  - `session_thread_id: string`1125211253    Public sthr_ ID of the thread that is retrying.1125411255### Beta Managed Agents Session Thread Status Running Event1125611257- `BetaManagedAgentsSessionThreadStatusRunningEvent object`1125811259  A session thread has begun executing. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.1126011261  - `type: "session.thread_status_running"`1126211263  - `id: string`1126411265    Unique identifier for this event.1126611267  - `agent_name: string`1126811269    Name of the agent the thread runs.1127011271  - `processed_at: string`1127211273    A timestamp in RFC 3339 format1127411275    format: date-time1127611277  - `session_thread_id: string`1127811279    Public sthr_ ID of the thread that started running.1128011281### Beta Managed Agents Session Thread Status Terminated Event1128211283- `BetaManagedAgentsSessionThreadStatusTerminatedEvent object`1128411285  A session thread has terminated and will accept no further input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.1128611287  - `type: "session.thread_status_terminated"`1128811289  - `id: string`1129011291    Unique identifier for this event.1129211293  - `agent_name: string`1129411295    Name of the agent the thread runs.1129611297  - `processed_at: string`1129811299    A timestamp in RFC 3339 format1130011301    format: date-time1130211303  - `session_thread_id: string`1130411305    Public sthr_ ID of the thread that terminated.1130611307### Beta Managed Agents Session Usage Snapshot1130811309- `BetaManagedAgentsSessionUsageSnapshot object`1131011311  Point-in-time snapshot of a session's cumulative usage.1131211313  - `active_seconds: optional number`1131411315    Cumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once. This is the duration the session's runtime cost is priced on.1131611317    format: double1131811319  - `cache_creation: optional BetaManagedAgentsCacheCreationUsage`1132011321    Prompt-cache creation token usage broken down by cache lifetime.1132211323    - `ephemeral_1h_input_tokens: optional number`1132411325      Tokens used to create 1-hour ephemeral cache entries.1132611327      format: int321132811329    - `ephemeral_5m_input_tokens: optional number`1133011331      Tokens used to create 5-minute ephemeral cache entries.1133211333      format: int321133411335  - `cache_read_input_tokens: optional number`1133611337    Total tokens read from prompt cache.1133811339    format: int321134011341  - `input_tokens: optional number`1134211343    Total input tokens consumed across all turns.1134411345    format: int321134611347  - `list_cost: optional BetaMonetaryAmount`1134811349    A monetary amount in a specific currency.1135011351    - `amount: string`1135211353      Amount in minor units of the currency, as an integer decimal string with no leading zeros: "2500" is $25.00 and "50" is fifty cents. A string rather than a number so no float rounding is ever applied.1135411355    - `currency: BetaCurrency`1135611357      Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced.1135811359  - `output_tokens: optional number`1136011361    Total output tokens generated across all turns.1136211363    format: int321136411365  - `server_tool_use: optional BetaManagedAgentsServerToolUsage`1136611367    Cumulative count of server-executed tool invocations, broken down by tool.1136811369    - `web_fetch_requests: optional number`1137011371      Number of server-executed web fetch requests.1137211373      format: int321137411375    - `web_search_requests: optional number`1137611377      Number of server-executed web search requests.1137811379      format: int321138011381### Beta Managed Agents Span Model Request End Event1138211383- `BetaManagedAgentsSpanModelRequestEndEvent object`1138411385  Emitted when a model request completes.1138611387  - `type: "span.model_request_end"`1138811389  - `id: string`1139011391    Unique identifier for this event.1139211393  - `is_error: boolean or null`1139411395    Whether the model request resulted in an error.1139611397  - `model_request_start_id: string`1139811399    The id of the corresponding `span.model_request_start` event.1140011401  - `model_usage: BetaManagedAgentsSpanModelUsage`1140211403    Token usage for a single model request.1140411405    - `cache_creation_input_tokens: number`1140611407      Tokens used to create prompt cache in this request.1140811409      format: int321141011411    - `cache_read_input_tokens: number`1141211413      Tokens read from prompt cache in this request.1141411415      format: int321141611417    - `input_tokens: number`1141811419      Input tokens consumed by this request.1142011421      format: int321142211423    - `output_tokens: number`1142411425      Output tokens generated by this request.1142611427      format: int321142811429    - `speed: optional "standard" or "fast" or null`1143011431      Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.1143211433      - `"standard"`1143411435      - `"fast"`1143611437  - `processed_at: string`1143811439    A timestamp in RFC 3339 format1144011441    format: date-time1144211443### Beta Managed Agents Span Model Request Start Event1144411445- `BetaManagedAgentsSpanModelRequestStartEvent object`1144611447  Emitted when a model request is initiated by the agent.1144811449  - `type: "span.model_request_start"`1145011451  - `id: string`1145211453    Unique identifier for this event.1145411455  - `processed_at: string`1145611457    A timestamp in RFC 3339 format1145811459    format: date-time1146011461### Beta Managed Agents Span Model Usage1146211463- `BetaManagedAgentsSpanModelUsage object`1146411465  Token usage for a single model request.1146611467  - `cache_creation_input_tokens: number`1146811469    Tokens used to create prompt cache in this request.1147011471    format: int321147211473  - `cache_read_input_tokens: number`1147411475    Tokens read from prompt cache in this request.1147611477    format: int321147811479  - `input_tokens: number`1148011481    Input tokens consumed by this request.1148211483    format: int321148411485  - `output_tokens: number`1148611487    Output tokens generated by this request.1148811489    format: int321149011491  - `speed: optional "standard" or "fast" or null`1149211493    Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.1149411495    - `"standard"`1149611497    - `"fast"`1149811499### Beta Managed Agents Span Outcome Evaluation End Event1150011501- `BetaManagedAgentsSpanOutcomeEvaluationEndEvent object`1150211503  Emitted when an outcome evaluation cycle completes. Carries the verdict and aggregate token usage. A verdict of `needs_revision` means another evaluation cycle follows; `satisfied`, `max_iterations_reached`, `failed`, or `interrupted` are terminal — no further evaluation cycles follow.1150411505  - `type: "span.outcome_evaluation_end"`1150611507  - `id: string`1150811509    Unique identifier for this event.1151011511  - `explanation: string`1151211513    Human-readable explanation of the verdict. For `needs_revision`, describes which criteria failed and why.1151411515  - `iteration: number`1151611517    0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.1151811519    format: int321152011521  - `outcome_evaluation_start_id: string`1152211523    The id of the corresponding `span.outcome_evaluation_start` event.1152411525  - `outcome_id: string`1152611527    The `outc_` ID of the outcome being evaluated.1152811529  - `processed_at: string`1153011531    A timestamp in RFC 3339 format1153211533    format: date-time1153411535  - `result: string`1153611537    Evaluation verdict. 'satisfied': criteria met, session goes idle. 'needs_revision': criteria not met, another revision cycle follows. 'max_iterations_reached': evaluation budget exhausted with criteria still unmet — one final acknowledgment turn follows before the session goes idle, but no further evaluation runs. 'failed': grader determined the rubric does not apply to the deliverables. 'interrupted': user sent an interrupt while evaluation was in progress.1153811539  - `usage: BetaManagedAgentsSpanModelUsage`1154011541    Token usage for a single model request.1154211543    - `cache_creation_input_tokens: number`1154411545      Tokens used to create prompt cache in this request.1154611547      format: int321154811549    - `cache_read_input_tokens: number`1155011551      Tokens read from prompt cache in this request.1155211553      format: int321155411555    - `input_tokens: number`1155611557      Input tokens consumed by this request.1155811559      format: int321156011561    - `output_tokens: number`1156211563      Output tokens generated by this request.1156411565      format: int321156611567    - `speed: optional "standard" or "fast" or null`1156811569      Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.1157011571      - `"standard"`1157211573      - `"fast"`1157411575### Beta Managed Agents Span Outcome Evaluation Ongoing Event1157611577- `BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent object`1157811579  Periodic heartbeat emitted while an outcome evaluation cycle is in progress. Distinguishes 'evaluation is actively running' from 'evaluation is stuck' between the corresponding `span.outcome_evaluation_start` and `span.outcome_evaluation_end` events.1158011581  - `type: "span.outcome_evaluation_ongoing"`1158211583  - `id: string`1158411585    Unique identifier for this event.1158611587  - `iteration: number`1158811589    0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.1159011591    format: int321159211593  - `outcome_id: string`1159411595    The `outc_` ID of the outcome being evaluated.1159611597  - `processed_at: string`1159811599    A timestamp in RFC 3339 format1160011601    format: date-time1160211603### Beta Managed Agents Span Outcome Evaluation Start Event1160411605- `BetaManagedAgentsSpanOutcomeEvaluationStartEvent object`1160611607  Emitted when an outcome evaluation cycle begins.1160811609  - `type: "span.outcome_evaluation_start"`1161011611  - `id: string`1161211613    Unique identifier for this event.1161411615  - `iteration: number`1161611617    0-indexed revision cycle. 0 is the first evaluation; 1 is the re-evaluation after the first revision; etc.1161811619    format: int321162011621  - `outcome_id: string`1162211623    The `outc_` ID of the outcome being evaluated.1162411625  - `processed_at: string`1162611627    A timestamp in RFC 3339 format1162811629    format: date-time1163011631### Beta Managed Agents Stream Session Events1163211633- `BetaManagedAgentsStreamSessionEvents = BetaManagedAgentsUserMessageEvent or BetaManagedAgentsUserInterruptEvent or BetaManagedAgentsUserToolConfirmationEvent or 34 more`1163411635  Server-sent event in the session stream.1163611637  - `BetaManagedAgentsUserMessageEvent object`1163811639    A user message event in the session conversation.1164011641    - `type: "user.message"`1164211643    - `id: string`1164411645      Unique identifier for this event.1164611647    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`1164811649      Array of content blocks comprising the user message.1165011651      - `BetaManagedAgentsTextBlock object`1165211653        Regular text content.1165411655        - `type: "text"`1165611657        - `text: string`1165811659          The text content.1166011661          minLength: 11166211663      - `BetaManagedAgentsImageBlock object`1166411665        Image content specified directly as base64 data or as a reference via a URL.1166611667        - `type: "image"`1166811669        - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`1167011671          Union type for image source variants.1167211673          - `BetaManagedAgentsBase64ImageSource object`1167411675            Base64-encoded image data.1167611677            - `type: "base64"`1167811679            - `data: string`1168011681              Base64-encoded image data.1168211683              minLength: 11168411685            - `media_type: string`1168611687              MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").1168811689              minLength: 11169011691          - `BetaManagedAgentsURLImageSource object`1169211693            Image referenced by URL.1169411695            - `type: "url"`1169611697            - `url: string`1169811699              URL of the image to fetch.1170011701              minLength: 11170211703          - `BetaManagedAgentsFileImageSource object`1170411705            Image referenced by file ID.1170611707            - `type: "file"`1170811709            - `file_id: string`1171011711              ID of a previously uploaded file.1171211713              minLength: 11171411715      - `BetaManagedAgentsDocumentBlock object`1171611717        Document content, either specified directly as base64 data, as text, or as a reference via a URL.1171811719        - `type: "document"`1172011721        - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`1172211723          Union type for document source variants.1172411725          - `BetaManagedAgentsBase64DocumentSource object`1172611727            Base64-encoded document data.1172811729            - `type: "base64"`1173011731            - `data: string`1173211733              Base64-encoded document data.1173411735              minLength: 11173611737            - `media_type: string`1173811739              MIME type of the document (e.g., "application/pdf").1174011741              minLength: 11174211743          - `BetaManagedAgentsPlainTextDocumentSource object`1174411745            Plain text document content.1174611747            - `type: "text"`1174811749            - `data: string`1175011751              The plain text content.1175211753              minLength: 11175411755            - `media_type: "text/plain"`1175611757              MIME type of the text content. Must be "text/plain".1175811759          - `BetaManagedAgentsURLDocumentSource object`1176011761            Document referenced by URL.1176211763            - `type: "url"`1176411765            - `url: string`1176611767              URL of the document to fetch.1176811769              minLength: 11177011771          - `BetaManagedAgentsFileDocumentSource object`1177211773            Document referenced by file ID.1177411775            - `type: "file"`1177611777            - `file_id: string`1177811779              ID of a previously uploaded file.1178011781              minLength: 11178211783        - `context: optional string or null`1178411785          Additional context about the document for the model.1178611787        - `title: optional string or null`1178811789          The title of the document.1179011791      - `BetaManagedAgentsRedactedBlock object`1179211793        Placeholder for content withheld by Anthropic model policy.1179411795        - `type: "redacted"`1179611797    - `processed_at: optional string or null`1179811799      A timestamp in RFC 3339 format1180011801      format: date-time1180211803  - `BetaManagedAgentsUserInterruptEvent object`1180411805    An interrupt event that pauses agent execution and returns control to the user.1180611807    - `type: "user.interrupt"`1180811809    - `id: string`1181011811      Unique identifier for this event.1181211813    - `processed_at: optional string or null`1181411815      A timestamp in RFC 3339 format1181611817      format: date-time1181811819    - `session_thread_id: optional string or null`1182011821      If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread.1182211823  - `BetaManagedAgentsUserToolConfirmationEvent object`1182411825    A tool confirmation event that approves or denies a pending tool execution.1182611827    - `type: "user.tool_confirmation"`1182811829    - `id: string`1183011831      Unique identifier for this event.1183211833    - `result: "allow" or "deny"`1183411835      UserToolConfirmationResult enum1183611837      - `"allow"`1183811839      - `"deny"`1184011841    - `tool_use_id: string`1184211843      The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.1184411845    - `deny_message: optional string or null`1184611847      Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.1184811849      maxLength: 100001185011851    - `processed_at: optional string or null`1185211853      A timestamp in RFC 3339 format1185411855      format: date-time1185611857    - `session_thread_id: optional string or null`1185811859      Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread.1186011861  - `BetaManagedAgentsUserCustomToolResultEvent object`1186211863    Event sent by the client providing the result of a custom tool execution.1186411865    - `type: "user.custom_tool_result"`1186611867    - `id: string`1186811869      Unique identifier for this event.1187011871    - `custom_tool_use_id: string`1187211873      The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.1187411875    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`1187611877      The result content returned by the tool.1187811879      - `BetaManagedAgentsTextBlock object`1188011881        Regular text content.1188211883      - `BetaManagedAgentsImageBlock object`1188411885        Image content specified directly as base64 data or as a reference via a URL.1188611887      - `BetaManagedAgentsDocumentBlock object`1188811889        Document content, either specified directly as base64 data, as text, or as a reference via a URL.1189011891      - `BetaManagedAgentsSearchResultBlock object`1189211893        A block containing a web search result.1189411895        - `type: "search_result"`1189611897        - `citations: BetaManagedAgentsSearchResultCitations`1189811899          Citation settings for a search result.1190011901          - `enabled: boolean`1190211903            Whether citations are enabled for this search result.1190411905        - `content: array of BetaManagedAgentsSearchResultContent`1190611907          Array of text content blocks from the search result.1190811909          - `type: "text"`1191011911          - `text: string`1191211913            The text content.1191411915            minLength: 11191611917        - `source: string`1191811919          The URL source of the search result.1192011921          minLength: 11192211923        - `title: string`1192411925          The title of the search result.1192611927          minLength: 11192811929    - `is_error: optional boolean or null`1193011931      Whether the tool execution resulted in an error.1193211933    - `processed_at: optional string or null`1193411935      A timestamp in RFC 3339 format1193611937      format: date-time1193811939    - `session_thread_id: optional string or null`1194011941      Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.1194211943  - `BetaManagedAgentsAgentCustomToolUseEvent object`1194411945    Event emitted when the agent calls a custom tool. The session goes idle until the client sends a `user.custom_tool_result` event with the result.1194611947    - `type: "agent.custom_tool_use"`1194811949    - `id: string`1195011951      Unique identifier for this event.1195211953    - `input: map[unknown]`1195411955      Input parameters for the tool call.1195611957    - `name: string`1195811959      Name of the custom tool being called.1196011961    - `processed_at: string`1196211963      A timestamp in RFC 3339 format1196411965      format: date-time1196611967    - `session_thread_id: optional string or null`1196811969      When set, this event was cross-posted from a subagent's thread to surface its custom tool use on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.custom_tool_result` by `custom_tool_use_id`, so clients do not send it back.1197011971  - `BetaManagedAgentsAgentMessageEvent object`1197211973    An agent response event in the session conversation.1197411975    - `type: "agent.message"`1197611977    - `id: string`1197811979      Unique identifier for this event.1198011981    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsRedactedBlock`1198211983      Array of text blocks comprising the agent response.1198411985      - `BetaManagedAgentsTextBlock object`1198611987        Regular text content.1198811989      - `BetaManagedAgentsRedactedBlock object`1199011991        Placeholder for content withheld by Anthropic model policy.1199211993    - `processed_at: string`1199411995      A timestamp in RFC 3339 format1199611997      format: date-time1199811999  - `BetaManagedAgentsAgentThinkingEvent object`1200012001    Indicates the agent is making forward progress via extended thinking. A progress signal, not a content carrier.1200212003    - `type: "agent.thinking"`1200412005    - `id: string`1200612007      Unique identifier for this event.1200812009    - `processed_at: string`1201012011      A timestamp in RFC 3339 format1201212013      format: date-time1201412015  - `BetaManagedAgentsAgentMCPToolUseEvent object`1201612017    Event emitted when the agent invokes a tool provided by an MCP server.1201812019    - `type: "agent.mcp_tool_use"`1202012021    - `id: string`1202212023      Unique identifier for this event.1202412025    - `input: map[unknown]`1202612027      Input parameters for the tool call.1202812029    - `mcp_server_name: string`1203012031      Name of the MCP server providing the tool.1203212033    - `name: string`1203412035      Name of the MCP tool being used.1203612037    - `processed_at: string`1203812039      A timestamp in RFC 3339 format1204012041      format: date-time1204212043    - `evaluated_permission: optional "allow" or "ask" or "deny"`1204412045      AgentEvaluatedPermission enum1204612047      - `"allow"`1204812049      - `"ask"`1205012051      - `"deny"`1205212053    - `evaluation: optional BetaManagedAgentsAgentToolEvaluation`1205412055      Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.1205612057      - `BetaManagedAgentsAgentToolEvaluationAlwaysAllow object`1205812059        The resolved permission_policy was always_allow; accompanies evaluated_permission "allow".1206012061        - `type: "always_allow"`1206212063      - `BetaManagedAgentsAgentToolEvaluationAlwaysAsk object`1206412065        The resolved permission_policy was always_ask; accompanies evaluated_permission "ask".1206612067        - `type: "always_ask"`1206812069      - `BetaManagedAgentsAgentToolEvaluationAuto object`1207012071        The resolved permission_policy was auto: the server judged this invocation individually.1207212073        - `type: "auto"`1207412075        - `evaluated_permission: BetaManagedAgentsAgentAutoEvaluatedPermission`1207612077          The server's per-invocation judgement under the auto permission policy. Its type always equals the event's top-level evaluated_permission. Open union: clients must tolerate unknown variants.1207812079          - `BetaManagedAgentsAgentAutoEvaluatedPermissionAllow object`1208012081            The server judged the invocation safe to execute without client approval.1208212083            - `type: "allow"`1208412085          - `BetaManagedAgentsAgentAutoEvaluatedPermissionAsk object`1208612087            The server reached no judgement; the invocation is held for client approval.1208812089            - `type: "ask"`1209012091            - `reason_code: string`1209212093              The judgement's grounds in registry-bound terms, for client branching and audit rather than end-user display. Open registry; currently "indeterminate" (no judgement was reached). Clients must tolerate values outside this set.1209412095              maxLength: 641209612097          - `BetaManagedAgentsAgentAutoEvaluatedPermissionDeny object`1209812099            The server judged the invocation high-risk; it does not execute and a synthetic error tool result is appended.1210012101            - `type: "deny"`1210212103            - `reason_code: string`1210412105              The judgement's grounds in registry-bound terms. Open registry; currently "high_risk" (judged high-risk; the call does not run). Clients must tolerate values outside this set.1210612107              maxLength: 641210812109    - `session_thread_id: optional string or null`1211012111      When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` by `tool_use_id`, so clients do not send it back.1211212113  - `BetaManagedAgentsAgentMCPToolResultEvent object`1211412115    Event representing the result of an MCP tool execution.1211612117    - `type: "agent.mcp_tool_result"`1211812119    - `id: string`1212012121      Unique identifier for this event.1212212123    - `mcp_tool_use_id: string`1212412125      The id of the `agent.mcp_tool_use` event this result corresponds to.1212612127    - `processed_at: string`1212812129      A timestamp in RFC 3339 format1213012131      format: date-time1213212133    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`1213412135      The result content returned by the tool.1213612137      - `BetaManagedAgentsTextBlock object`1213812139        Regular text content.1214012141      - `BetaManagedAgentsImageBlock object`1214212143        Image content specified directly as base64 data or as a reference via a URL.1214412145      - `BetaManagedAgentsDocumentBlock object`1214612147        Document content, either specified directly as base64 data, as text, or as a reference via a URL.1214812149      - `BetaManagedAgentsSearchResultBlock object`1215012151        A block containing a web search result.1215212153    - `is_error: optional boolean or null`1215412155      Whether the tool execution resulted in an error.1215612157  - `BetaManagedAgentsAgentToolUseEvent object`1215812159    Event emitted when the agent invokes a built-in agent tool.1216012161    - `type: "agent.tool_use"`1216212163    - `id: string`1216412165      Unique identifier for this event.1216612167    - `input: map[unknown]`1216812169      Input parameters for the tool call.1217012171    - `name: string`1217212173      Name of the agent tool being used.1217412175    - `processed_at: string`1217612177      A timestamp in RFC 3339 format1217812179      format: date-time1218012181    - `evaluated_permission: optional "allow" or "ask" or "deny"`1218212183      AgentEvaluatedPermission enum1218412185      - `"allow"`1218612187      - `"ask"`1218812189      - `"deny"`1219012191    - `evaluation: optional BetaManagedAgentsAgentToolEvaluation`1219212193      Names the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.1219412195    - `session_thread_id: optional string or null`1219612197      When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` or `user.tool_result` by `tool_use_id`, so clients do not send it back.1219812199  - `BetaManagedAgentsAgentToolResultEvent object`1220012201    Event representing the result of an agent tool execution.1220212203    - `type: "agent.tool_result"`1220412205    - `id: string`1220612207      Unique identifier for this event.1220812209    - `processed_at: string`1221012211      A timestamp in RFC 3339 format1221212213      format: date-time1221412215    - `tool_use_id: string`1221612217      The id of the `agent.tool_use` event this result corresponds to.1221812219    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`1222012221      The result content returned by the tool.1222212223      - `BetaManagedAgentsTextBlock object`1222412225        Regular text content.1222612227      - `BetaManagedAgentsImageBlock object`1222812229        Image content specified directly as base64 data or as a reference via a URL.1223012231      - `BetaManagedAgentsDocumentBlock object`1223212233        Document content, either specified directly as base64 data, as text, or as a reference via a URL.1223412235      - `BetaManagedAgentsSearchResultBlock object`1223612237        A block containing a web search result.1223812239    - `is_error: optional boolean or null`1224012241      Whether the tool execution resulted in an error.1224212243  - `BetaManagedAgentsAgentThreadMessageReceivedEvent object`1224412245    Delivery event written to the target thread's input stream when an agent-to-agent message arrives.1224612247    - `type: "agent.thread_message_received"`1224812249    - `id: string`1225012251      Unique identifier for this event.1225212253    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`1225412255      Message content blocks.1225612257      - `BetaManagedAgentsTextBlock object`1225812259        Regular text content.1226012261      - `BetaManagedAgentsImageBlock object`1226212263        Image content specified directly as base64 data or as a reference via a URL.1226412265      - `BetaManagedAgentsDocumentBlock object`1226612267        Document content, either specified directly as base64 data, as text, or as a reference via a URL.1226812269      - `BetaManagedAgentsRedactedBlock object`1227012271        Placeholder for content withheld by Anthropic model policy.1227212273    - `from_session_thread_id: string`1227412275      Public `sthr_` ID of the thread that sent the message.1227612277    - `processed_at: string`1227812279      A timestamp in RFC 3339 format1228012281      format: date-time1228212283    - `from_agent_name: optional string or null`1228412285      Name of the callable agent this message came from. Absent when received from the primary agent.1228612287  - `BetaManagedAgentsAgentThreadMessageSentEvent object`1228812289    Observability event emitted to the sender's output stream when an agent-to-agent message is sent.1229012291    - `type: "agent.thread_message_sent"`1229212293    - `id: string`1229412295      Unique identifier for this event.1229612297    - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`1229812299      Message content blocks.1230012301      - `BetaManagedAgentsTextBlock object`1230212303        Regular text content.1230412305      - `BetaManagedAgentsImageBlock object`1230612307        Image content specified directly as base64 data or as a reference via a URL.1230812309      - `BetaManagedAgentsDocumentBlock object`1231012311        Document content, either specified directly as base64 data, as text, or as a reference via a URL.1231212313      - `BetaManagedAgentsRedactedBlock object`1231412315        Placeholder for content withheld by Anthropic model policy.1231612317    - `processed_at: string`1231812319      A timestamp in RFC 3339 format1232012321      format: date-time1232212323    - `to_session_thread_id: string`1232412325      Public `sthr_` ID of the thread the message was sent to.1232612327    - `to_agent_name: optional string or null`1232812329      Name of the callable agent this message was sent to. Absent when sent to the primary agent.1233012331  - `BetaManagedAgentsAgentThreadContextCompactedEvent object`1233212333    Indicates that context compaction (summarization) occurred during the session.1233412335    - `type: "agent.thread_context_compacted"`1233612337    - `id: string`1233812339      Unique identifier for this event.1234012341    - `processed_at: string`1234212343      A timestamp in RFC 3339 format1234412345      format: date-time1234612347  - `BetaManagedAgentsSessionErrorEvent object`1234812349    An error event indicating a problem occurred during session execution.1235012351    - `type: "session.error"`1235212353    - `id: string`1235412355      Unique identifier for this event.1235612357    - `error: BetaManagedAgentsUnknownError or BetaManagedAgentsModelOverloadedError or BetaManagedAgentsModelRateLimitedError or 5 more`1235812359      - `BetaManagedAgentsUnknownError object`1236012361        An unknown or unexpected error occurred during session execution. A fallback variant; clients that don't recognize a new error code can match on `retry_status` and `message` alone.1236212363        - `type: "unknown_error"`1236412365        - `message: string`1236612367          Human-readable error description.1236812369        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`1237012371          What the client should do next in response to this error.1237212373          - `BetaManagedAgentsRetryStatusRetrying object`1237412375            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.1237612377            - `type: "retrying"`1237812379          - `BetaManagedAgentsRetryStatusExhausted object`1238012381            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.1238212383            - `type: "exhausted"`1238412385          - `BetaManagedAgentsRetryStatusTerminal object`1238612387            The session encountered a terminal error and will transition to `terminated` state.1238812389            - `type: "terminal"`1239012391      - `BetaManagedAgentsModelOverloadedError object`1239212393        The model is currently overloaded. Emitted after automatic retries are exhausted.1239412395        - `type: "model_overloaded_error"`1239612397        - `message: string`1239812399          Human-readable error description.1240012401        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`1240212403          What the client should do next in response to this error.1240412405          - `BetaManagedAgentsRetryStatusRetrying object`1240612407            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.1240812409          - `BetaManagedAgentsRetryStatusExhausted object`1241012411            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.1241212413          - `BetaManagedAgentsRetryStatusTerminal object`1241412415            The session encountered a terminal error and will transition to `terminated` state.1241612417      - `BetaManagedAgentsModelRateLimitedError object`1241812419        The model request was rate-limited.1242012421        - `type: "model_rate_limited_error"`1242212423        - `message: string`1242412425          Human-readable error description.1242612427        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`1242812429          What the client should do next in response to this error.1243012431          - `BetaManagedAgentsRetryStatusRetrying object`1243212433            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.1243412435          - `BetaManagedAgentsRetryStatusExhausted object`1243612437            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.1243812439          - `BetaManagedAgentsRetryStatusTerminal object`1244012441            The session encountered a terminal error and will transition to `terminated` state.1244212443      - `BetaManagedAgentsModelRequestFailedError object`1244412445        A model request failed for a reason other than overload or rate-limiting.1244612447        - `type: "model_request_failed_error"`1244812449        - `message: string`1245012451          Human-readable error description.1245212453        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`1245412455          What the client should do next in response to this error.1245612457          - `BetaManagedAgentsRetryStatusRetrying object`1245812459            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.1246012461          - `BetaManagedAgentsRetryStatusExhausted object`1246212463            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.1246412465          - `BetaManagedAgentsRetryStatusTerminal object`1246612467            The session encountered a terminal error and will transition to `terminated` state.1246812469      - `BetaManagedAgentsMCPConnectionFailedError object`1247012471        Failed to connect to an MCP server.1247212473        - `type: "mcp_connection_failed_error"`1247412475        - `mcp_server_name: string`1247612477          Name of the MCP server that failed to connect.1247812479        - `message: string`1248012481          Human-readable error description.1248212483        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`1248412485          What the client should do next in response to this error.1248612487          - `BetaManagedAgentsRetryStatusRetrying object`1248812489            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.1249012491          - `BetaManagedAgentsRetryStatusExhausted object`1249212493            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.1249412495          - `BetaManagedAgentsRetryStatusTerminal object`1249612497            The session encountered a terminal error and will transition to `terminated` state.1249812499      - `BetaManagedAgentsMCPAuthenticationFailedError object`1250012501        Authentication to an MCP server failed.1250212503        - `type: "mcp_authentication_failed_error"`1250412505        - `mcp_server_name: string`1250612507          Name of the MCP server that failed authentication.1250812509        - `message: string`1251012511          Human-readable error description.1251212513        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`1251412515          What the client should do next in response to this error.1251612517          - `BetaManagedAgentsRetryStatusRetrying object`1251812519            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.1252012521          - `BetaManagedAgentsRetryStatusExhausted object`1252212523            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.1252412525          - `BetaManagedAgentsRetryStatusTerminal object`1252612527            The session encountered a terminal error and will transition to `terminated` state.1252812529      - `BetaManagedAgentsBillingError object`1253012531        The caller's organization or workspace cannot make model requests — out of credits or spend limit reached. Retrying with the same credentials will not succeed; the caller must resolve the billing state.1253212533        - `type: "billing_error"`1253412535        - `message: string`1253612537          Human-readable error description.1253812539        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`1254012541          What the client should do next in response to this error.1254212543          - `BetaManagedAgentsRetryStatusRetrying object`1254412545            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.1254612547          - `BetaManagedAgentsRetryStatusExhausted object`1254812549            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.1255012551          - `BetaManagedAgentsRetryStatusTerminal object`1255212553            The session encountered a terminal error and will transition to `terminated` state.1255412555      - `BetaManagedAgentsCredentialHostUnreachableError object`1255612557        An `environment_variable` credential's `auth.networking.allowed_hosts` includes a host the environment's network policy does not permit.1255812559        - `type: "credential_host_unreachable_error"`1256012561        - `credential_id: string`1256212563          ID of the affected credential.1256412565        - `message: string`1256612567          Human-readable error description.1256812569        - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`1257012571          What the client should do next in response to this error.1257212573          - `BetaManagedAgentsRetryStatusRetrying object`1257412575            The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.1257612577          - `BetaManagedAgentsRetryStatusExhausted object`1257812579            This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.1258012581          - `BetaManagedAgentsRetryStatusTerminal object`1258212583            The session encountered a terminal error and will transition to `terminated` state.1258412585        - `vault_id: string`1258612587          ID of the vault containing the affected credential.1258812589    - `processed_at: string`1259012591      A timestamp in RFC 3339 format1259212593      format: date-time1259412595  - `BetaManagedAgentsSessionStatusRescheduledEvent object`1259612597    Indicates the session is recovering from an error state and is rescheduled for execution.1259812599    - `type: "session.status_rescheduled"`1260012601    - `id: string`1260212603      Unique identifier for this event.1260412605    - `processed_at: string`1260612607      A timestamp in RFC 3339 format1260812609      format: date-time1261012611  - `BetaManagedAgentsSessionStatusRunningEvent object`1261212613    Indicates the session is actively running and the agent is working.1261412615    - `type: "session.status_running"`1261612617    - `id: string`1261812619      Unique identifier for this event.1262012621    - `processed_at: string`1262212623      A timestamp in RFC 3339 format1262412625      format: date-time1262612627  - `BetaManagedAgentsSessionStatusIdleEvent object`1262812629    Indicates the agent has paused and is awaiting user input.1263012631    - `type: "session.status_idle"`1263212633    - `id: string`1263412635      Unique identifier for this event.1263612637    - `processed_at: string`1263812639      A timestamp in RFC 3339 format1264012641      format: date-time1264212643    - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or BetaManagedAgentsSessionBudgetReached`1264412645      - `BetaManagedAgentsSessionEndTurn object`1264612647        The agent completed its turn naturally and is ready for the next user message.1264812649        - `type: "end_turn"`1265012651      - `BetaManagedAgentsSessionRequiresAction object`1265212653        The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.1265412655        - `type: "requires_action"`1265612657        - `event_ids: array of string`1265812659          The ids of events the agent is blocked on. Resolving fewer than all re-emits `session.status_idle` with the remainder.1266012661      - `BetaManagedAgentsSessionRetriesExhausted object`1266212663        The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`.1266412665        - `type: "retries_exhausted"`1266612667      - `BetaManagedAgentsSessionBudgetReached object`1266812669        The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget.1267012671        - `type: "budget_reached"`1267212673  - `BetaManagedAgentsSessionStatusTerminatedEvent object`1267412675    Indicates the session has terminated, either due to an error or completion.1267612677    - `type: "session.status_terminated"`1267812679    - `id: string`1268012681      Unique identifier for this event.1268212683    - `processed_at: string`1268412685      A timestamp in RFC 3339 format1268612687      format: date-time1268812689  - `BetaManagedAgentsSessionThreadCreatedEvent object`1269012691    Emitted when a subagent is spawned as a new thread. Written to the parent thread's output stream so clients observing the session see child creation.1269212693    - `type: "session.thread_created"`1269412695    - `id: string`1269612697      Unique identifier for this event.1269812699    - `agent_name: string`1270012701      Name of the callable agent the thread runs.1270212703    - `processed_at: string`1270412705      A timestamp in RFC 3339 format1270612707      format: date-time1270812709    - `session_thread_id: string`1271012711      Public `sthr_` ID of the newly created thread.1271212713  - `BetaManagedAgentsSpanOutcomeEvaluationStartEvent object`1271412715    Emitted when an outcome evaluation cycle begins.1271612717    - `type: "span.outcome_evaluation_start"`1271812719    - `id: string`1272012721      Unique identifier for this event.1272212723    - `iteration: number`1272412725      0-indexed revision cycle. 0 is the first evaluation; 1 is the re-evaluation after the first revision; etc.1272612727      format: int321272812729    - `outcome_id: string`1273012731      The `outc_` ID of the outcome being evaluated.1273212733    - `processed_at: string`1273412735      A timestamp in RFC 3339 format1273612737      format: date-time1273812739  - `BetaManagedAgentsSpanOutcomeEvaluationEndEvent object`1274012741    Emitted when an outcome evaluation cycle completes. Carries the verdict and aggregate token usage. A verdict of `needs_revision` means another evaluation cycle follows; `satisfied`, `max_iterations_reached`, `failed`, or `interrupted` are terminal — no further evaluation cycles follow.1274212743    - `type: "span.outcome_evaluation_end"`1274412745    - `id: string`1274612747      Unique identifier for this event.1274812749    - `explanation: string`1275012751      Human-readable explanation of the verdict. For `needs_revision`, describes which criteria failed and why.1275212753    - `iteration: number`1275412755      0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.1275612757      format: int321275812759    - `outcome_evaluation_start_id: string`1276012761      The id of the corresponding `span.outcome_evaluation_start` event.1276212763    - `outcome_id: string`1276412765      The `outc_` ID of the outcome being evaluated.1276612767    - `processed_at: string`1276812769      A timestamp in RFC 3339 format1277012771      format: date-time1277212773    - `result: string`1277412775      Evaluation verdict. 'satisfied': criteria met, session goes idle. 'needs_revision': criteria not met, another revision cycle follows. 'max_iterations_reached': evaluation budget exhausted with criteria still unmet — one final acknowledgment turn follows before the session goes idle, but no further evaluation runs. 'failed': grader determined the rubric does not apply to the deliverables. 'interrupted': user sent an interrupt while evaluation was in progress.1277612777    - `usage: BetaManagedAgentsSpanModelUsage`1277812779      Token usage for a single model request.1278012781      - `cache_creation_input_tokens: number`1278212783        Tokens used to create prompt cache in this request.1278412785        format: int321278612787      - `cache_read_input_tokens: number`1278812789        Tokens read from prompt cache in this request.1279012791        format: int321279212793      - `input_tokens: number`1279412795        Input tokens consumed by this request.1279612797        format: int321279812799      - `output_tokens: number`1280012801        Output tokens generated by this request.1280212803        format: int321280412805      - `speed: optional "standard" or "fast" or null`1280612807        Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.1280812809        - `"standard"`1281012811        - `"fast"`1281212813  - `BetaManagedAgentsSpanModelRequestStartEvent object`1281412815    Emitted when a model request is initiated by the agent.1281612817    - `type: "span.model_request_start"`1281812819    - `id: string`1282012821      Unique identifier for this event.1282212823    - `processed_at: string`1282412825      A timestamp in RFC 3339 format1282612827      format: date-time1282812829  - `BetaManagedAgentsSpanModelRequestEndEvent object`1283012831    Emitted when a model request completes.1283212833    - `type: "span.model_request_end"`1283412835    - `id: string`1283612837      Unique identifier for this event.1283812839    - `is_error: boolean or null`1284012841      Whether the model request resulted in an error.1284212843    - `model_request_start_id: string`1284412845      The id of the corresponding `span.model_request_start` event.1284612847    - `model_usage: BetaManagedAgentsSpanModelUsage`1284812849      Token usage for a single model request.1285012851    - `processed_at: string`1285212853      A timestamp in RFC 3339 format1285412855      format: date-time1285612857  - `BetaManagedAgentsSpanOutcomeEvaluationOngoingEvent object`1285812859    Periodic heartbeat emitted while an outcome evaluation cycle is in progress. Distinguishes 'evaluation is actively running' from 'evaluation is stuck' between the corresponding `span.outcome_evaluation_start` and `span.outcome_evaluation_end` events.1286012861    - `type: "span.outcome_evaluation_ongoing"`1286212863    - `id: string`1286412865      Unique identifier for this event.1286612867    - `iteration: number`1286812869      0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.1287012871      format: int321287212873    - `outcome_id: string`1287412875      The `outc_` ID of the outcome being evaluated.1287612877    - `processed_at: string`1287812879      A timestamp in RFC 3339 format1288012881      format: date-time1288212883  - `BetaManagedAgentsUserDefineOutcomeEvent object`1288412885    Echo of a `user.define_outcome` input event. Carries the server-generated `outcome_id` that subsequent `span.outcome_evaluation_*` events reference.1288612887    - `type: "user.define_outcome"`1288812889    - `id: string`1289012891      Unique identifier for this event.1289212893    - `description: string`1289412895      What the agent should produce. Copied from the input event.1289612897    - `max_iterations: number or null`1289812899      Evaluate-then-revise cycles before giving up. Default 3, max 20.1290012901      format: int321290212903    - `outcome_id: string`1290412905      Server-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.1290612907    - `processed_at: string`1290812909      A timestamp in RFC 3339 format1291012911      format: date-time1291212913    - `rubric: BetaManagedAgentsFileRubric or BetaManagedAgentsTextRubric`1291412915      Rubric for grading the quality of an outcome.1291612917      - `BetaManagedAgentsFileRubric object`1291812919        Rubric referenced by a file uploaded via the Files API.1292012921        - `type: "file"`1292212923        - `file_id: string`1292412925          ID of the rubric file.1292612927      - `BetaManagedAgentsTextRubric object`1292812929        Rubric content provided inline as text.1293012931        - `type: "text"`1293212933        - `content: string`1293412935          Rubric content. Plain text or markdown — the grader treats it as freeform text.1293612937  - `BetaManagedAgentsSessionDeletedEvent object`1293812939    Emitted when a session has been deleted. Terminates any active event stream — no further events will be emitted for this session.1294012941    - `type: "session.deleted"`1294212943    - `id: string`1294412945      Unique identifier for this event.1294612947    - `processed_at: string`1294812949      A timestamp in RFC 3339 format1295012951      format: date-time1295212953  - `BetaManagedAgentsSessionThreadStatusRunningEvent object`1295412955    A session thread has begun executing. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.1295612957    - `type: "session.thread_status_running"`1295812959    - `id: string`1296012961      Unique identifier for this event.1296212963    - `agent_name: string`1296412965      Name of the agent the thread runs.1296612967    - `processed_at: string`1296812969      A timestamp in RFC 3339 format1297012971      format: date-time1297212973    - `session_thread_id: string`1297412975      Public sthr_ ID of the thread that started running.1297612977  - `BetaManagedAgentsSessionThreadStatusIdleEvent object`1297812979    A session thread has yielded and is awaiting input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.1298012981    - `type: "session.thread_status_idle"`1298212983    - `id: string`1298412985      Unique identifier for this event.1298612987    - `agent_name: string`1298812989      Name of the agent the thread runs.1299012991    - `processed_at: string`1299212993      A timestamp in RFC 3339 format1299412995      format: date-time1299612997    - `session_thread_id: string`1299812999      Public sthr_ ID of the thread that went idle.1300013001    - `stop_reason: BetaManagedAgentsSessionEndTurn or BetaManagedAgentsSessionRequiresAction or BetaManagedAgentsSessionRetriesExhausted or BetaManagedAgentsSessionBudgetReached`1300213003      - `BetaManagedAgentsSessionEndTurn object`1300413005        The agent completed its turn naturally and is ready for the next user message.1300613007      - `BetaManagedAgentsSessionRequiresAction object`1300813009        The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.1301013011      - `BetaManagedAgentsSessionRetriesExhausted object`1301213013        The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`.1301413015      - `BetaManagedAgentsSessionBudgetReached object`1301613017        The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget.1301813019  - `BetaManagedAgentsSessionThreadStatusTerminatedEvent object`1302013021    A session thread has terminated and will accept no further input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.1302213023    - `type: "session.thread_status_terminated"`1302413025    - `id: string`1302613027      Unique identifier for this event.1302813029    - `agent_name: string`1303013031      Name of the agent the thread runs.1303213033    - `processed_at: string`1303413035      A timestamp in RFC 3339 format1303613037      format: date-time1303813039    - `session_thread_id: string`1304013041      Public sthr_ ID of the thread that terminated.1304213043  - `BetaManagedAgentsUserToolResultEvent object`1304413045    Event sent by the client providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.1304613047    - `type: "user.tool_result"`1304813049    - `id: string`1305013051      Unique identifier for this event.1305213053    - `tool_use_id: string`1305413055      The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.1305613057    - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`1305813059      The result content returned by the tool.1306013061      - `BetaManagedAgentsTextBlock object`1306213063        Regular text content.1306413065      - `BetaManagedAgentsImageBlock object`1306613067        Image content specified directly as base64 data or as a reference via a URL.1306813069      - `BetaManagedAgentsDocumentBlock object`1307013071        Document content, either specified directly as base64 data, as text, or as a reference via a URL.1307213073      - `BetaManagedAgentsSearchResultBlock object`1307413075        A block containing a web search result.1307613077    - `is_error: optional boolean or null`1307813079      Whether the tool execution resulted in an error.1308013081    - `processed_at: optional string or null`1308213083      A timestamp in RFC 3339 format1308413085      format: date-time1308613087    - `session_thread_id: optional string or null`1308813089      Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.1309013091  - `BetaManagedAgentsSessionThreadStatusRescheduledEvent object`1309213093    A session thread hit a transient error and is retrying automatically. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.1309413095    - `type: "session.thread_status_rescheduled"`1309613097    - `id: string`1309813099      Unique identifier for this event.1310013101    - `agent_name: string`1310213103      Name of the agent the thread runs.1310413105    - `processed_at: string`1310613107      A timestamp in RFC 3339 format1310813109      format: date-time1311013111    - `session_thread_id: string`1311213113      Public sthr_ ID of the thread that is retrying.1311413115  - `BetaManagedAgentsSessionUpdatedEvent object`1311613117    Emitted when an UpdateSession request changed at least one field. Carries only the fields that changed; absent fields were not part of the update. The new configuration applies from the next turn.1311813119    - `type: "session.updated"`1312013121    - `id: string`1312213123      Unique identifier for this event.1312413125    - `processed_at: string`1312613127      A timestamp in RFC 3339 format1312813129      format: date-time1313013131    - `agent: optional BetaManagedAgentsSessionAgent or null`1313213133      Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.1313413135      - `type: "agent"`1313613137      - `id: string`1313813139      - `description: string or null`1314013141      - `mcp_servers: array of BetaManagedAgentsMCPServerURLDefinition`1314213143        - `type: "url"`1314413145        - `name: string`1314613147        - `url: string`1314813149      - `model: BetaManagedAgentsModelConfig`1315013151        Model identifier and configuration.1315213153        - `id: BetaManagedAgentsModel`1315413155          The model that will power your agent.1315613157          See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.1315813159          - `"claude-fable-5-1" or "claude-sonnet-5" or "claude-fable-5" or 11 more`1316013161            The model that will power your agent.1316213163            See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.1316413165            - `"claude-fable-5-1"`1316613167              Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows1316813169            - `"claude-sonnet-5"`1317013171              High-performance model for coding and agents1317213173            - `"claude-fable-5"`1317413175              Next generation of intelligence for the hardest knowledge work and coding problems1317613177            - `"claude-opus-5"`1317813179              Powerful intelligence for long-running agents and coding1318013181            - `"claude-opus-4-8"`1318213183              Powerful intelligence for long-running agents and coding1318413185            - `"claude-opus-4-7"`1318613187              Powerful intelligence for long-running agents and coding1318813189            - `"claude-opus-4-6"`1319013191              Powerful intelligence for long-running agents and coding1319213193            - `"claude-sonnet-4-6"`1319413195              Best combination of speed and intelligence1319613197            - `"claude-haiku-4-5"`1319813199              Fastest model with near-frontier intelligence1320013201            - `"claude-haiku-4-5-20251001"`1320213203              Fastest model with near-frontier intelligence1320413205            - `"claude-opus-4-5"`1320613207              Powerful intelligence for long-running agents and coding1320813209            - `"claude-opus-4-5-20251101"`1321013211              Powerful intelligence for long-running agents and coding1321213213            - `"claude-sonnet-4-5"`1321413215              High-performance model for agents and coding1321613217            - `"claude-sonnet-4-5-20250929"`1321813219              High-performance model for agents and coding1322013221          - `string`1322213223        - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more`1322413225          How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.1322613227          - `BetaManagedAgentsEffortLow object`1322813229            Low effort. Favors latency over reasoning depth.1323013231            - `type: "low"`1323213233          - `BetaManagedAgentsEffortMedium object`1323413235            Medium effort. Balances latency and reasoning depth.1323613237            - `type: "medium"`1323813239          - `BetaManagedAgentsEffortHigh object`1324013241            High effort. Favors reasoning depth.1324213243            - `type: "high"`1324413245          - `BetaManagedAgentsEffortXhigh object`1324613247            Extra-high effort. Not all models accept this level.1324813249            - `type: "xhigh"`1325013251          - `BetaManagedAgentsEffortMax object`1325213253            Maximum effort. Favors reasoning depth over latency.1325413255            - `type: "max"`1325613257        - `inference_geo: optional string`1325813259          Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.1326013261        - `speed: optional "standard" or "fast"`1326213263          Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.1326413265          - `"standard"`1326613267          - `"fast"`1326813269      - `multiagent: BetaManagedAgentsSessionMultiagentCoordinator or null`1327013271        Resolved coordinator topology with full agent definitions for each roster member.1327213273        - `type: "coordinator"`1327413275        - `agents: array of BetaManagedAgentsSessionThreadAgent or BetaManagedAgentsAdvisor`1327613277          Full `agent` definitions the coordinator may spawn as session threads.1327813279          - `BetaManagedAgentsSessionThreadAgent object`1328013281            Resolved `agent` definition for a single `session_thread`. Snapshot of the agent at thread creation time. The multiagent roster is not repeated here; read it from `Session.agent`.1328213283            - `type: "agent"`1328413285            - `id: string`1328613287            - `description: string or null`1328813289            - `mcp_servers: array of BetaManagedAgentsMCPServerURLDefinition`1329013291              - `type: "url"`1329213293              - `name: string`1329413295              - `url: string`1329613297            - `model: BetaManagedAgentsModelConfig`1329813299              Model identifier and configuration.1330013301            - `name: string`1330213303            - `skills: array of BetaManagedAgentsAnthropicSkill or BetaManagedAgentsCustomSkill`1330413305              - `BetaManagedAgentsAnthropicSkill object`1330613307                A resolved Anthropic-managed skill.1330813309                - `type: "anthropic"`1331013311                - `skill_id: string`1331213313                - `version: string`1331413315              - `BetaManagedAgentsCustomSkill object`1331613317                A resolved user-created custom skill.1331813319                - `type: "custom"`1332013321                - `skill_id: string`1332213323                - `version: string`1332413325            - `system: string or null`1332613327            - `tools: array of BetaManagedAgentsAgentToolset20260401 or BetaManagedAgentsMCPToolset or BetaManagedAgentsCustomTool`1332813329              - `BetaManagedAgentsAgentToolset20260401 object`1333013331                - `type: "agent_toolset_20260401"`1333213333                - `configs: array of BetaManagedAgentsAgentToolConfig`1333413335                  - `BetaManagedAgentsBashToolConfig object`1333613337                    Configuration for the bash tool.1333813339                    - `type: "bash"`1334013341                    - `enabled: boolean`1334213343                    - `name: "bash"`1334413345                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1334613347                      Permission policy for tool execution.1334813349                      - `BetaManagedAgentsAlwaysAllowPolicy object`1335013351                        Tool calls are automatically approved without user confirmation.1335213353                        - `type: "always_allow"`1335413355                      - `BetaManagedAgentsAlwaysAskPolicy object`1335613357                        Tool calls require user confirmation before execution.1335813359                        - `type: "always_ask"`1336013361                      - `BetaManagedAgentsAutoPolicy object`1336213363                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1336413365                        - `type: "auto"`1336613367                  - `BetaManagedAgentsEditToolConfig object`1336813369                    Configuration for the edit tool.1337013371                    - `type: "edit"`1337213373                    - `enabled: boolean`1337413375                    - `name: "edit"`1337613377                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1337813379                      Permission policy for tool execution.1338013381                      - `BetaManagedAgentsAlwaysAllowPolicy object`1338213383                        Tool calls are automatically approved without user confirmation.1338413385                      - `BetaManagedAgentsAlwaysAskPolicy object`1338613387                        Tool calls require user confirmation before execution.1338813389                      - `BetaManagedAgentsAutoPolicy object`1339013391                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1339213393                  - `BetaManagedAgentsReadToolConfig object`1339413395                    Configuration for the read tool.1339613397                    - `type: "read"`1339813399                    - `enabled: boolean`1340013401                    - `name: "read"`1340213403                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1340413405                      Permission policy for tool execution.1340613407                      - `BetaManagedAgentsAlwaysAllowPolicy object`1340813409                        Tool calls are automatically approved without user confirmation.1341013411                      - `BetaManagedAgentsAlwaysAskPolicy object`1341213413                        Tool calls require user confirmation before execution.1341413415                      - `BetaManagedAgentsAutoPolicy object`1341613417                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1341813419                  - `BetaManagedAgentsWriteToolConfig object`1342013421                    Configuration for the write tool.1342213423                    - `type: "write"`1342413425                    - `enabled: boolean`1342613427                    - `name: "write"`1342813429                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1343013431                      Permission policy for tool execution.1343213433                      - `BetaManagedAgentsAlwaysAllowPolicy object`1343413435                        Tool calls are automatically approved without user confirmation.1343613437                      - `BetaManagedAgentsAlwaysAskPolicy object`1343813439                        Tool calls require user confirmation before execution.1344013441                      - `BetaManagedAgentsAutoPolicy object`1344213443                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1344413445                  - `BetaManagedAgentsGlobToolConfig object`1344613447                    Configuration for the glob tool.1344813449                    - `type: "glob"`1345013451                    - `enabled: boolean`1345213453                    - `name: "glob"`1345413455                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1345613457                      Permission policy for tool execution.1345813459                      - `BetaManagedAgentsAlwaysAllowPolicy object`1346013461                        Tool calls are automatically approved without user confirmation.1346213463                      - `BetaManagedAgentsAlwaysAskPolicy object`1346413465                        Tool calls require user confirmation before execution.1346613467                      - `BetaManagedAgentsAutoPolicy object`1346813469                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1347013471                  - `BetaManagedAgentsGrepToolConfig object`1347213473                    Configuration for the grep tool.1347413475                    - `type: "grep"`1347613477                    - `enabled: boolean`1347813479                    - `name: "grep"`1348013481                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1348213483                      Permission policy for tool execution.1348413485                      - `BetaManagedAgentsAlwaysAllowPolicy object`1348613487                        Tool calls are automatically approved without user confirmation.1348813489                      - `BetaManagedAgentsAlwaysAskPolicy object`1349013491                        Tool calls require user confirmation before execution.1349213493                      - `BetaManagedAgentsAutoPolicy object`1349413495                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1349613497                  - `BetaManagedAgentsWebFetchToolConfig object`1349813499                    Configuration for the web_fetch tool.1350013501                    - `type: "web_fetch"`1350213503                    - `enabled: boolean`1350413505                    - `name: "web_fetch"`1350613507                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1350813509                      Permission policy for tool execution.1351013511                      - `BetaManagedAgentsAlwaysAllowPolicy object`1351213513                        Tool calls are automatically approved without user confirmation.1351413515                      - `BetaManagedAgentsAlwaysAskPolicy object`1351613517                        Tool calls require user confirmation before execution.1351813519                      - `BetaManagedAgentsAutoPolicy object`1352013521                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1352213523                    - `allowed_domains: optional array of string`1352413525                    - `blocked_domains: optional array of string`1352613527                    - `max_content_tokens: optional number or null`1352813529                      format: int321353013531                  - `BetaManagedAgentsWebSearchToolConfig object`1353213533                    Configuration for the web_search tool.1353413535                    - `type: "web_search"`1353613537                    - `enabled: boolean`1353813539                    - `name: "web_search"`1354013541                    - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1354213543                      Permission policy for tool execution.1354413545                      - `BetaManagedAgentsAlwaysAllowPolicy object`1354613547                        Tool calls are automatically approved without user confirmation.1354813549                      - `BetaManagedAgentsAlwaysAskPolicy object`1355013551                        Tool calls require user confirmation before execution.1355213553                      - `BetaManagedAgentsAutoPolicy object`1355413555                        The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1355613557                    - `allowed_domains: optional array of string`1355813559                    - `blocked_domains: optional array of string`1356013561                    - `user_location: optional BetaManagedAgentsUserLocation or null`1356213563                      Approximate user location for search result localization.1356413565                      - `type: "approximate"`1356613567                        Location precision. Only "approximate" is supported.1356813569                      - `city: optional string or null`1357013571                        City name.1357213573                        minLength: 1, maxLength: 2551357413575                      - `country: optional string or null`1357613577                        Two-letter ISO 3166-1 country code, uppercase.1357813579                      - `region: optional string or null`1358013581                        Region or state name.1358213583                        minLength: 1, maxLength: 2551358413585                      - `timezone: optional string or null`1358613587                        IANA timezone identifier, e.g. "America/Los_Angeles".1358813589                        minLength: 1, maxLength: 2551359013591                - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`1359213593                  Resolved default configuration for agent tools.1359413595                  - `enabled: boolean`1359613597                  - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1359813599                    Permission policy for tool execution.1360013601                    - `BetaManagedAgentsAlwaysAllowPolicy object`1360213603                      Tool calls are automatically approved without user confirmation.1360413605                    - `BetaManagedAgentsAlwaysAskPolicy object`1360613607                      Tool calls require user confirmation before execution.1360813609                    - `BetaManagedAgentsAutoPolicy object`1361013611                      The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1361213613              - `BetaManagedAgentsMCPToolset object`1361413615                - `type: "mcp_toolset"`1361613617                - `configs: array of BetaManagedAgentsMCPToolConfig`1361813619                  - `enabled: boolean`1362013621                  - `name: string`1362213623                  - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1362413625                    Permission policy for tool execution.1362613627                    - `BetaManagedAgentsAlwaysAllowPolicy object`1362813629                      Tool calls are automatically approved without user confirmation.1363013631                    - `BetaManagedAgentsAlwaysAskPolicy object`1363213633                      Tool calls require user confirmation before execution.1363413635                    - `BetaManagedAgentsAutoPolicy object`1363613637                      The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1363813639                - `default_config: BetaManagedAgentsMCPToolsetDefaultConfig`1364013641                  Resolved default configuration for all tools from an MCP server.1364213643                  - `enabled: boolean`1364413645                  - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or BetaManagedAgentsAutoPolicy`1364613647                    Permission policy for tool execution.1364813649                    - `BetaManagedAgentsAlwaysAllowPolicy object`1365013651                      Tool calls are automatically approved without user confirmation.1365213653                    - `BetaManagedAgentsAlwaysAskPolicy object`1365413655                      Tool calls require user confirmation before execution.1365613657                    - `BetaManagedAgentsAutoPolicy object`1365813659                      The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.1366013661                - `mcp_server_name: string`1366213663              - `BetaManagedAgentsCustomTool object`1366413665                A custom tool as returned in API responses.1366613667                - `type: "custom"`1366813669                - `description: string`1367013671                - `input_schema: BetaManagedAgentsCustomToolInputSchema`1367213673                  JSON Schema for custom tool input parameters.1367413675                  - `type: "object"`1367613677                  - `properties: optional map[unknown] or null`1367813679                  - `required: optional array of string or null`1368013681                - `name: string`1368213683            - `version: number`1368413685              format: int321368613687          - `BetaManagedAgentsAdvisor object`1368813689            Platform advisor roster entry: a model the session's primary thread may consult mid-turn.1369013691            - `type: "advisor"`1369213693            - `model: string`1369413695              The advisor model id.1369613697      - `name: string`1369813699      - `skills: array of BetaManagedAgentsAnthropicSkill or BetaManagedAgentsCustomSkill`1370013701        - `BetaManagedAgentsAnthropicSkill object`1370213703          A resolved Anthropic-managed skill.1370413705        - `BetaManagedAgentsCustomSkill object`1370613707          A resolved user-created custom skill.1370813709      - `system: string or null`1371013711      - `tools: array of BetaManagedAgentsAgentToolset20260401 or BetaManagedAgentsMCPToolset or BetaManagedAgentsCustomTool`1371213713        - `BetaManagedAgentsAgentToolset20260401 object`1371413715        - `BetaManagedAgentsMCPToolset object`1371613717        - `BetaManagedAgentsCustomTool object`1371813719          A custom tool as returned in API responses.1372013721      - `version: number`1372213723        format: int321372413725    - `budget: optional BetaManagedAgentsBudgetLimit or null`1372613727      A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.1372813729      - `type: "limit"`1373013731      - `max_list_cost: BetaMonetaryAmount`1373213733        A monetary amount in a specific currency.1373413735        - `amount: string`1373613737          Amount in minor units of the currency, as an integer decimal string with no leading zeros: "2500" is $25.00 and "50" is fifty cents. A string rather than a number so no float rounding is ever applied.1373813739        - `currency: BetaCurrency`1374013741          Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced.1374213743    - `metadata: optional map[string]`1374413745      The session's full metadata bag after the update. Present when the update set non-empty metadata; absent when metadata was unchanged or cleared to empty.1374613747    - `title: optional string or null`1374813749      The session's new title. Present only when the update changed it.1375013751  - `BetaManagedAgentsStartEvent object`1375213753    Opens a preview of a buffered event. Carries the previewed event's type and id only. Followed by zero or more event_delta events with the same event id, normally concluded by the buffered event carrying that id. If the producing model request ends without that event (an error or interrupt mid-stream), its terminal span.model_request_end closes the preview. Only sent on stream connections that opt in via event_deltas; never appears in event history.1375413755    - `type: "event_start"`1375613757    - `event: BetaManagedAgentsStartEventPreview`1375813759      The previewed event's type and id. The event type determines which delta types the preview's event_delta events carry: agent.message events stream content_delta fragments; agent.thinking previews are start-only — no deltas follow, and the buffered agent.thinking with the same id concludes them.1376013761      - `BetaManagedAgentsAgentMessagePreview object`1376213763        - `type: "agent.message"`1376413765        - `id: string`1376613767          The id the buffered agent.message will carry if it is emitted. Matches the event_id on this preview's event_delta events.1376813769      - `BetaManagedAgentsAgentThinkingPreview object`1377013771        - `type: "agent.thinking"`1377213773        - `id: string`1377413775          The id the buffered agent.thinking will carry if it is emitted. Start-only — no event_delta events follow.1377613777  - `BetaManagedAgentsDeltaEvent object`1377813779    An incremental update to an event that is still being streamed. Deltas are best-effort and may stop early; when the buffered event with id == event_id is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no buffered event — its terminal span.model_request_end closes the preview. Only sent on stream connections that opt in via event_deltas; never appears in event history.1378013781    - `type: "event_delta"`1378213783    - `delta: BetaManagedAgentsDeltaContent`1378413785      One fragment of the previewed event. The delta type is named for the previewed event's field it streams into: agent.message events stream content_delta fragments, each a partial element of the content array.1378613787      - `type: "content_delta"`1378813789      - `content: BetaManagedAgentsTextBlock`1379013791        Regular text content.1379213793      - `index: optional number`1379413795        Which entry in the previewed event's content array this fragment lands in. Insert content as that entry when the index is new; append to the existing entry otherwise.1379613797        format: uint321379813799    - `event_id: string`1380013801      The id of the event being previewed. Matches event.id on the corresponding event_start and the buffered event that reconciles the preview.1380213803  - `BetaManagedAgentsSystemMessageEvent object`1380413805    A mid-conversation system message event. Carries system-role content that is appended to the session as a `role: "system"` turn.1380613807    - `type: "system.message"`1380813809    - `id: string`1381013811      Unique identifier for this event.1381213813    - `content: array of BetaManagedAgentsSystemContentBlock`1381413815      System content blocks. Text-only.1381613817      - `type: "text"`1381813819      - `text: string`1382013821        The text content.1382213823        minLength: 11382413825    - `processed_at: optional string or null`1382613827      A timestamp in RFC 3339 format1382813829      format: date-time1383013831  - `BetaManagedAgentsSessionUsageEvent object`1383213833    Periodic snapshot of the session's cumulative usage and tracked list cost.1383413835    - `type: "session.usage"`1383613837    - `id: string`1383813839      Unique identifier for this event.1384013841    - `processed_at: string`1384213843      A timestamp in RFC 3339 format1384413845      format: date-time1384613847    - `usage: BetaManagedAgentsSessionUsageSnapshot`1384813849      Point-in-time snapshot of a session's cumulative usage.1385013851      - `active_seconds: optional number`1385213853        Cumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once. This is the duration the session's runtime cost is priced on.1385413855        format: double1385613857      - `cache_creation: optional BetaManagedAgentsCacheCreationUsage`1385813859        Prompt-cache creation token usage broken down by cache lifetime.1386013861        - `ephemeral_1h_input_tokens: optional number`1386213863          Tokens used to create 1-hour ephemeral cache entries.1386413865          format: int321386613867        - `ephemeral_5m_input_tokens: optional number`1386813869          Tokens used to create 5-minute ephemeral cache entries.1387013871          format: int321387213873      - `cache_read_input_tokens: optional number`1387413875        Total tokens read from prompt cache.1387613877        format: int321387813879      - `input_tokens: optional number`1388013881        Total input tokens consumed across all turns.1388213883        format: int321388413885      - `list_cost: optional BetaMonetaryAmount`1388613887        A monetary amount in a specific currency.1388813889      - `output_tokens: optional number`1389013891        Total output tokens generated across all turns.1389213893        format: int321389413895      - `server_tool_use: optional BetaManagedAgentsServerToolUsage`1389613897        Cumulative count of server-executed tool invocations, broken down by tool.1389813899        - `web_fetch_requests: optional number`1390013901          Number of server-executed web fetch requests.1390213903          format: int321390413905        - `web_search_requests: optional number`1390613907          Number of server-executed web search requests.1390813909          format: int321391013911    - `budget: optional BetaManagedAgentsBudgetLimit or null`1391213913      A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.1391413915### Beta Managed Agents System Message Event Params1391613917- `BetaManagedAgentsSystemMessageEventParams object`1391813919  Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a `role: "system"` turn rather than replacing the top-level system prompt. At most one per request: it must be the final event and immediately follow the `user.message`, `user.tool_result`, or `user.custom_tool_result` it accompanies. Only supported on models that accept mid-conversation system messages.1392013921  - `type: "system.message"`1392213923  - `content: array of BetaManagedAgentsSystemContentBlock`1392413925    System content blocks to append. Text-only.1392613927    - `type: "text"`1392813929    - `text: string`1393013931      The text content.1393213933      minLength: 11393413935### Beta Managed Agents Text Block1393613937- `BetaManagedAgentsTextBlock object`1393813939  Regular text content.1394013941  - `type: "text"`1394213943  - `text: string`1394413945    The text content.1394613947    minLength: 11394813949### Beta Managed Agents Text Rubric1395013951- `BetaManagedAgentsTextRubric object`1395213953  Rubric content provided inline as text.1395413955  - `type: "text"`1395613957  - `content: string`1395813959    Rubric content. Plain text or markdown — the grader treats it as freeform text.1396013961### Beta Managed Agents Text Rubric Params1396213963- `BetaManagedAgentsTextRubricParams object`1396413965  Rubric content provided inline as text.1396613967  - `type: "text"`1396813969  - `content: string`1397013971    Rubric content. Plain text or markdown — the grader treats it as freeform text. Maximum 262144 characters.1397213973    maxLength: 2621441397413975### Beta Managed Agents Unknown Error1397613977- `BetaManagedAgentsUnknownError object`1397813979  An unknown or unexpected error occurred during session execution. A fallback variant; clients that don't recognize a new error code can match on `retry_status` and `message` alone.1398013981  - `type: "unknown_error"`1398213983  - `message: string`1398413985    Human-readable error description.1398613987  - `retry_status: BetaManagedAgentsRetryStatusRetrying or BetaManagedAgentsRetryStatusExhausted or BetaManagedAgentsRetryStatusTerminal`1398813989    What the client should do next in response to this error.1399013991    - `BetaManagedAgentsRetryStatusRetrying object`1399213993      The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.1399413995      - `type: "retrying"`1399613997    - `BetaManagedAgentsRetryStatusExhausted object`1399813999      This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.1400014001      - `type: "exhausted"`1400214003    - `BetaManagedAgentsRetryStatusTerminal object`1400414005      The session encountered a terminal error and will transition to `terminated` state.1400614007      - `type: "terminal"`1400814009### Beta Managed Agents URL Document Source1401014011- `BetaManagedAgentsURLDocumentSource object`1401214013  Document referenced by URL.1401414015  - `type: "url"`1401614017  - `url: string`1401814019    URL of the document to fetch.1402014021    minLength: 11402214023### Beta Managed Agents URL Image Source1402414025- `BetaManagedAgentsURLImageSource object`1402614027  Image referenced by URL.1402814029  - `type: "url"`1403014031  - `url: string`1403214033    URL of the image to fetch.1403414035    minLength: 11403614037### Beta Managed Agents User Custom Tool Result Event1403814039- `BetaManagedAgentsUserCustomToolResultEvent object`1404014041  Event sent by the client providing the result of a custom tool execution.1404214043  - `type: "user.custom_tool_result"`1404414045  - `id: string`1404614047    Unique identifier for this event.1404814049  - `custom_tool_use_id: string`1405014051    The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.1405214053  - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`1405414055    The result content returned by the tool.1405614057    - `BetaManagedAgentsTextBlock object`1405814059      Regular text content.1406014061      - `type: "text"`1406214063      - `text: string`1406414065        The text content.1406614067        minLength: 11406814069    - `BetaManagedAgentsImageBlock object`1407014071      Image content specified directly as base64 data or as a reference via a URL.1407214073      - `type: "image"`1407414075      - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`1407614077        Union type for image source variants.1407814079        - `BetaManagedAgentsBase64ImageSource object`1408014081          Base64-encoded image data.1408214083          - `type: "base64"`1408414085          - `data: string`1408614087            Base64-encoded image data.1408814089            minLength: 11409014091          - `media_type: string`1409214093            MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").1409414095            minLength: 11409614097        - `BetaManagedAgentsURLImageSource object`1409814099          Image referenced by URL.1410014101          - `type: "url"`1410214103          - `url: string`1410414105            URL of the image to fetch.1410614107            minLength: 11410814109        - `BetaManagedAgentsFileImageSource object`1411014111          Image referenced by file ID.1411214113          - `type: "file"`1411414115          - `file_id: string`1411614117            ID of a previously uploaded file.1411814119            minLength: 11412014121    - `BetaManagedAgentsDocumentBlock object`1412214123      Document content, either specified directly as base64 data, as text, or as a reference via a URL.1412414125      - `type: "document"`1412614127      - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`1412814129        Union type for document source variants.1413014131        - `BetaManagedAgentsBase64DocumentSource object`1413214133          Base64-encoded document data.1413414135          - `type: "base64"`1413614137          - `data: string`1413814139            Base64-encoded document data.1414014141            minLength: 11414214143          - `media_type: string`1414414145            MIME type of the document (e.g., "application/pdf").1414614147            minLength: 11414814149        - `BetaManagedAgentsPlainTextDocumentSource object`1415014151          Plain text document content.1415214153          - `type: "text"`1415414155          - `data: string`1415614157            The plain text content.1415814159            minLength: 11416014161          - `media_type: "text/plain"`1416214163            MIME type of the text content. Must be "text/plain".1416414165        - `BetaManagedAgentsURLDocumentSource object`1416614167          Document referenced by URL.1416814169          - `type: "url"`1417014171          - `url: string`1417214173            URL of the document to fetch.1417414175            minLength: 11417614177        - `BetaManagedAgentsFileDocumentSource object`1417814179          Document referenced by file ID.1418014181          - `type: "file"`1418214183          - `file_id: string`1418414185            ID of a previously uploaded file.1418614187            minLength: 11418814189      - `context: optional string or null`1419014191        Additional context about the document for the model.1419214193      - `title: optional string or null`1419414195        The title of the document.1419614197    - `BetaManagedAgentsSearchResultBlock object`1419814199      A block containing a web search result.1420014201      - `type: "search_result"`1420214203      - `citations: BetaManagedAgentsSearchResultCitations`1420414205        Citation settings for a search result.1420614207        - `enabled: boolean`1420814209          Whether citations are enabled for this search result.1421014211      - `content: array of BetaManagedAgentsSearchResultContent`1421214213        Array of text content blocks from the search result.1421414215        - `type: "text"`1421614217        - `text: string`1421814219          The text content.1422014221          minLength: 11422214223      - `source: string`1422414225        The URL source of the search result.1422614227        minLength: 11422814229      - `title: string`1423014231        The title of the search result.1423214233        minLength: 11423414235  - `is_error: optional boolean or null`1423614237    Whether the tool execution resulted in an error.1423814239  - `processed_at: optional string or null`1424014241    A timestamp in RFC 3339 format1424214243    format: date-time1424414245  - `session_thread_id: optional string or null`1424614247    Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.1424814249### Beta Managed Agents User Custom Tool Result Event Params1425014251- `BetaManagedAgentsUserCustomToolResultEventParams object`1425214253  Parameters for providing the result of a custom tool execution.1425414255  - `type: "user.custom_tool_result"`1425614257  - `custom_tool_use_id: string`1425814259    The id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.1426014261    minLength: 1, maxLength: 1281426214263  - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`1426414265    The result content returned by the tool.1426614267    - `BetaManagedAgentsTextBlock object`1426814269      Regular text content.1427014271      - `type: "text"`1427214273      - `text: string`1427414275        The text content.1427614277        minLength: 11427814279    - `BetaManagedAgentsImageBlock object`1428014281      Image content specified directly as base64 data or as a reference via a URL.1428214283      - `type: "image"`1428414285      - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`1428614287        Union type for image source variants.1428814289        - `BetaManagedAgentsBase64ImageSource object`1429014291          Base64-encoded image data.1429214293          - `type: "base64"`1429414295          - `data: string`1429614297            Base64-encoded image data.1429814299            minLength: 11430014301          - `media_type: string`1430214303            MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").1430414305            minLength: 11430614307        - `BetaManagedAgentsURLImageSource object`1430814309          Image referenced by URL.1431014311          - `type: "url"`1431214313          - `url: string`1431414315            URL of the image to fetch.1431614317            minLength: 11431814319        - `BetaManagedAgentsFileImageSource object`1432014321          Image referenced by file ID.1432214323          - `type: "file"`1432414325          - `file_id: string`1432614327            ID of a previously uploaded file.1432814329            minLength: 11433014331    - `BetaManagedAgentsDocumentBlock object`1433214333      Document content, either specified directly as base64 data, as text, or as a reference via a URL.1433414335      - `type: "document"`1433614337      - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`1433814339        Union type for document source variants.1434014341        - `BetaManagedAgentsBase64DocumentSource object`1434214343          Base64-encoded document data.1434414345          - `type: "base64"`1434614347          - `data: string`1434814349            Base64-encoded document data.1435014351            minLength: 11435214353          - `media_type: string`1435414355            MIME type of the document (e.g., "application/pdf").1435614357            minLength: 11435814359        - `BetaManagedAgentsPlainTextDocumentSource object`1436014361          Plain text document content.1436214363          - `type: "text"`1436414365          - `data: string`1436614367            The plain text content.1436814369            minLength: 11437014371          - `media_type: "text/plain"`1437214373            MIME type of the text content. Must be "text/plain".1437414375        - `BetaManagedAgentsURLDocumentSource object`1437614377          Document referenced by URL.1437814379          - `type: "url"`1438014381          - `url: string`1438214383            URL of the document to fetch.1438414385            minLength: 11438614387        - `BetaManagedAgentsFileDocumentSource object`1438814389          Document referenced by file ID.1439014391          - `type: "file"`1439214393          - `file_id: string`1439414395            ID of a previously uploaded file.1439614397            minLength: 11439814399      - `context: optional string or null`1440014401        Additional context about the document for the model.1440214403      - `title: optional string or null`1440414405        The title of the document.1440614407    - `BetaManagedAgentsSearchResultBlock object`1440814409      A block containing a web search result.1441014411      - `type: "search_result"`1441214413      - `citations: BetaManagedAgentsSearchResultCitations`1441414415        Citation settings for a search result.1441614417        - `enabled: boolean`1441814419          Whether citations are enabled for this search result.1442014421      - `content: array of BetaManagedAgentsSearchResultContent`1442214423        Array of text content blocks from the search result.1442414425        - `type: "text"`1442614427        - `text: string`1442814429          The text content.1443014431          minLength: 11443214433      - `source: string`1443414435        The URL source of the search result.1443614437        minLength: 11443814439      - `title: string`1444014441        The title of the search result.1444214443        minLength: 11444414445  - `is_error: optional boolean or null`1444614447    Whether the tool execution resulted in an error.1444814449### Beta Managed Agents User Define Outcome Event1445014451- `BetaManagedAgentsUserDefineOutcomeEvent object`1445214453  Echo of a `user.define_outcome` input event. Carries the server-generated `outcome_id` that subsequent `span.outcome_evaluation_*` events reference.1445414455  - `type: "user.define_outcome"`1445614457  - `id: string`1445814459    Unique identifier for this event.1446014461  - `description: string`1446214463    What the agent should produce. Copied from the input event.1446414465  - `max_iterations: number or null`1446614467    Evaluate-then-revise cycles before giving up. Default 3, max 20.1446814469    format: int321447014471  - `outcome_id: string`1447214473    Server-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.1447414475  - `processed_at: string`1447614477    A timestamp in RFC 3339 format1447814479    format: date-time1448014481  - `rubric: BetaManagedAgentsFileRubric or BetaManagedAgentsTextRubric`1448214483    Rubric for grading the quality of an outcome.1448414485    - `BetaManagedAgentsFileRubric object`1448614487      Rubric referenced by a file uploaded via the Files API.1448814489      - `type: "file"`1449014491      - `file_id: string`1449214493        ID of the rubric file.1449414495    - `BetaManagedAgentsTextRubric object`1449614497      Rubric content provided inline as text.1449814499      - `type: "text"`1450014501      - `content: string`1450214503        Rubric content. Plain text or markdown — the grader treats it as freeform text.1450414505### Beta Managed Agents User Define Outcome Event Params1450614507- `BetaManagedAgentsUserDefineOutcomeEventParams object`1450814509  Parameters for defining an outcome the agent should work toward. The agent begins work on receipt.1451014511  - `type: "user.define_outcome"`1451214513  - `description: string`1451414515    What the agent should produce. This is the task specification.1451614517  - `rubric: BetaManagedAgentsFileRubricParams or BetaManagedAgentsTextRubricParams`1451814519    Rubric for grading the quality of an outcome.1452014521    - `BetaManagedAgentsFileRubricParams object`1452214523      Rubric referenced by a file uploaded via the Files API.1452414525      - `type: "file"`1452614527      - `file_id: string`1452814529        ID of the rubric file.1453014531    - `BetaManagedAgentsTextRubricParams object`1453214533      Rubric content provided inline as text.1453414535      - `type: "text"`1453614537      - `content: string`1453814539        Rubric content. Plain text or markdown — the grader treats it as freeform text. Maximum 262144 characters.1454014541        maxLength: 2621441454214543  - `max_iterations: optional number or null`1454414545    Eval→revision cycles before giving up. Default 3, max 20.1454614547    format: int321454814549### Beta Managed Agents User Interrupt Event1455014551- `BetaManagedAgentsUserInterruptEvent object`1455214553  An interrupt event that pauses agent execution and returns control to the user.1455414555  - `type: "user.interrupt"`1455614557  - `id: string`1455814559    Unique identifier for this event.1456014561  - `processed_at: optional string or null`1456214563    A timestamp in RFC 3339 format1456414565    format: date-time1456614567  - `session_thread_id: optional string or null`1456814569    If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread.1457014571### Beta Managed Agents User Interrupt Event Params1457214573- `BetaManagedAgentsUserInterruptEventParams object`1457414575  Parameters for sending an interrupt to pause the agent.1457614577  - `type: "user.interrupt"`1457814579  - `session_thread_id: optional string or null`1458014581    If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread.1458214583### Beta Managed Agents User Message Event1458414585- `BetaManagedAgentsUserMessageEvent object`1458614587  A user message event in the session conversation.1458814589  - `type: "user.message"`1459014591  - `id: string`1459214593    Unique identifier for this event.1459414595  - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`1459614597    Array of content blocks comprising the user message.1459814599    - `BetaManagedAgentsTextBlock object`1460014601      Regular text content.1460214603      - `type: "text"`1460414605      - `text: string`1460614607        The text content.1460814609        minLength: 11461014611    - `BetaManagedAgentsImageBlock object`1461214613      Image content specified directly as base64 data or as a reference via a URL.1461414615      - `type: "image"`1461614617      - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`1461814619        Union type for image source variants.1462014621        - `BetaManagedAgentsBase64ImageSource object`1462214623          Base64-encoded image data.1462414625          - `type: "base64"`1462614627          - `data: string`1462814629            Base64-encoded image data.1463014631            minLength: 11463214633          - `media_type: string`1463414635            MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").1463614637            minLength: 11463814639        - `BetaManagedAgentsURLImageSource object`1464014641          Image referenced by URL.1464214643          - `type: "url"`1464414645          - `url: string`1464614647            URL of the image to fetch.1464814649            minLength: 11465014651        - `BetaManagedAgentsFileImageSource object`1465214653          Image referenced by file ID.1465414655          - `type: "file"`1465614657          - `file_id: string`1465814659            ID of a previously uploaded file.1466014661            minLength: 11466214663    - `BetaManagedAgentsDocumentBlock object`1466414665      Document content, either specified directly as base64 data, as text, or as a reference via a URL.1466614667      - `type: "document"`1466814669      - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`1467014671        Union type for document source variants.1467214673        - `BetaManagedAgentsBase64DocumentSource object`1467414675          Base64-encoded document data.1467614677          - `type: "base64"`1467814679          - `data: string`1468014681            Base64-encoded document data.1468214683            minLength: 11468414685          - `media_type: string`1468614687            MIME type of the document (e.g., "application/pdf").1468814689            minLength: 11469014691        - `BetaManagedAgentsPlainTextDocumentSource object`1469214693          Plain text document content.1469414695          - `type: "text"`1469614697          - `data: string`1469814699            The plain text content.1470014701            minLength: 11470214703          - `media_type: "text/plain"`1470414705            MIME type of the text content. Must be "text/plain".1470614707        - `BetaManagedAgentsURLDocumentSource object`1470814709          Document referenced by URL.1471014711          - `type: "url"`1471214713          - `url: string`1471414715            URL of the document to fetch.1471614717            minLength: 11471814719        - `BetaManagedAgentsFileDocumentSource object`1472014721          Document referenced by file ID.1472214723          - `type: "file"`1472414725          - `file_id: string`1472614727            ID of a previously uploaded file.1472814729            minLength: 11473014731      - `context: optional string or null`1473214733        Additional context about the document for the model.1473414735      - `title: optional string or null`1473614737        The title of the document.1473814739    - `BetaManagedAgentsRedactedBlock object`1474014741      Placeholder for content withheld by Anthropic model policy.1474214743      - `type: "redacted"`1474414745  - `processed_at: optional string or null`1474614747    A timestamp in RFC 3339 format1474814749    format: date-time1475014751### Beta Managed Agents User Message Event Params1475214753- `BetaManagedAgentsUserMessageEventParams object`1475414755  Parameters for sending a user message to the session.1475614757  - `type: "user.message"`1475814759  - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsRedactedBlock`1476014761    Array of content blocks for the user message.1476214763    - `BetaManagedAgentsTextBlock object`1476414765      Regular text content.1476614767      - `type: "text"`1476814769      - `text: string`1477014771        The text content.1477214773        minLength: 11477414775    - `BetaManagedAgentsImageBlock object`1477614777      Image content specified directly as base64 data or as a reference via a URL.1477814779      - `type: "image"`1478014781      - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`1478214783        Union type for image source variants.1478414785        - `BetaManagedAgentsBase64ImageSource object`1478614787          Base64-encoded image data.1478814789          - `type: "base64"`1479014791          - `data: string`1479214793            Base64-encoded image data.1479414795            minLength: 11479614797          - `media_type: string`1479814799            MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").1480014801            minLength: 11480214803        - `BetaManagedAgentsURLImageSource object`1480414805          Image referenced by URL.1480614807          - `type: "url"`1480814809          - `url: string`1481014811            URL of the image to fetch.1481214813            minLength: 11481414815        - `BetaManagedAgentsFileImageSource object`1481614817          Image referenced by file ID.1481814819          - `type: "file"`1482014821          - `file_id: string`1482214823            ID of a previously uploaded file.1482414825            minLength: 11482614827    - `BetaManagedAgentsDocumentBlock object`1482814829      Document content, either specified directly as base64 data, as text, or as a reference via a URL.1483014831      - `type: "document"`1483214833      - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`1483414835        Union type for document source variants.1483614837        - `BetaManagedAgentsBase64DocumentSource object`1483814839          Base64-encoded document data.1484014841          - `type: "base64"`1484214843          - `data: string`1484414845            Base64-encoded document data.1484614847            minLength: 11484814849          - `media_type: string`1485014851            MIME type of the document (e.g., "application/pdf").1485214853            minLength: 11485414855        - `BetaManagedAgentsPlainTextDocumentSource object`1485614857          Plain text document content.1485814859          - `type: "text"`1486014861          - `data: string`1486214863            The plain text content.1486414865            minLength: 11486614867          - `media_type: "text/plain"`1486814869            MIME type of the text content. Must be "text/plain".1487014871        - `BetaManagedAgentsURLDocumentSource object`1487214873          Document referenced by URL.1487414875          - `type: "url"`1487614877          - `url: string`1487814879            URL of the document to fetch.1488014881            minLength: 11488214883        - `BetaManagedAgentsFileDocumentSource object`1488414885          Document referenced by file ID.1488614887          - `type: "file"`1488814889          - `file_id: string`1489014891            ID of a previously uploaded file.1489214893            minLength: 11489414895      - `context: optional string or null`1489614897        Additional context about the document for the model.1489814899      - `title: optional string or null`1490014901        The title of the document.1490214903    - `BetaManagedAgentsRedactedBlock object`1490414905      Placeholder for content withheld by Anthropic model policy.1490614907      - `type: "redacted"`1490814909### Beta Managed Agents User Tool Confirmation Event1491014911- `BetaManagedAgentsUserToolConfirmationEvent object`1491214913  A tool confirmation event that approves or denies a pending tool execution.1491414915  - `type: "user.tool_confirmation"`1491614917  - `id: string`1491814919    Unique identifier for this event.1492014921  - `result: "allow" or "deny"`1492214923    UserToolConfirmationResult enum1492414925    - `"allow"`1492614927    - `"deny"`1492814929  - `tool_use_id: string`1493014931    The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.1493214933  - `deny_message: optional string or null`1493414935    Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.1493614937    maxLength: 100001493814939  - `processed_at: optional string or null`1494014941    A timestamp in RFC 3339 format1494214943    format: date-time1494414945  - `session_thread_id: optional string or null`1494614947    Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread.1494814949### Beta Managed Agents User Tool Confirmation Event Params1495014951- `BetaManagedAgentsUserToolConfirmationEventParams object`1495214953  Parameters for confirming or denying a tool execution request.1495414955  - `type: "user.tool_confirmation"`1495614957  - `result: "allow" or "deny"`1495814959    UserToolConfirmationResult enum1496014961    - `"allow"`1496214963    - `"deny"`1496414965  - `tool_use_id: string`1496614967    The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.1496814969    minLength: 1, maxLength: 1281497014971  - `deny_message: optional string or null`1497214973    Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.1497414975    maxLength: 100001497614977### Beta Managed Agents User Tool Result Event Params1497814979- `BetaManagedAgentsUserToolResultEventParams object`1498014981  Parameters for providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.1498214983  - `type: "user.tool_result"`1498414985  - `tool_use_id: string`1498614987    The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.1498814989    minLength: 1, maxLength: 1281499014991  - `content: optional array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock or BetaManagedAgentsSearchResultBlock`1499214993    The result content returned by the tool.1499414995    - `BetaManagedAgentsTextBlock object`1499614997      Regular text content.1499814999      - `type: "text"`1500015001      - `text: string`1500215003        The text content.1500415005        minLength: 11500615007    - `BetaManagedAgentsImageBlock object`1500815009      Image content specified directly as base64 data or as a reference via a URL.1501015011      - `type: "image"`1501215013      - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource`1501415015        Union type for image source variants.1501615017        - `BetaManagedAgentsBase64ImageSource object`1501815019          Base64-encoded image data.1502015021          - `type: "base64"`1502215023          - `data: string`1502415025            Base64-encoded image data.1502615027            minLength: 11502815029          - `media_type: string`1503015031            MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp").1503215033            minLength: 11503415035        - `BetaManagedAgentsURLImageSource object`1503615037          Image referenced by URL.1503815039          - `type: "url"`1504015041          - `url: string`1504215043            URL of the image to fetch.1504415045            minLength: 11504615047        - `BetaManagedAgentsFileImageSource object`1504815049          Image referenced by file ID.1505015051          - `type: "file"`1505215053          - `file_id: string`1505415055            ID of a previously uploaded file.1505615057            minLength: 11505815059    - `BetaManagedAgentsDocumentBlock object`1506015061      Document content, either specified directly as base64 data, as text, or as a reference via a URL.1506215063      - `type: "document"`1506415065      - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource`1506615067        Union type for document source variants.1506815069        - `BetaManagedAgentsBase64DocumentSource object`1507015071          Base64-encoded document data.1507215073          - `type: "base64"`1507415075          - `data: string`1507615077            Base64-encoded document data.1507815079            minLength: 11508015081          - `media_type: string`1508215083            MIME type of the document (e.g., "application/pdf").1508415085            minLength: 11508615087        - `BetaManagedAgentsPlainTextDocumentSource object`1508815089          Plain text document content.1509015091          - `type: "text"`1509215093          - `data: string`1509415095            The plain text content.1509615097            minLength: 11509815099          - `media_type: "text/plain"`1510015101            MIME type of the text content. Must be "text/plain".1510215103        - `BetaManagedAgentsURLDocumentSource object`1510415105          Document referenced by URL.1510615107          - `type: "url"`1510815109          - `url: string`1511015111            URL of the document to fetch.1511215113            minLength: 11511415115        - `BetaManagedAgentsFileDocumentSource object`1511615117          Document referenced by file ID.1511815119          - `type: "file"`1512015121          - `file_id: string`1512215123            ID of a previously uploaded file.1512415125            minLength: 11512615127      - `context: optional string or null`1512815129        Additional context about the document for the model.1513015131      - `title: optional string or null`1513215133        The title of the document.1513415135    - `BetaManagedAgentsSearchResultBlock object`1513615137      A block containing a web search result.1513815139      - `type: "search_result"`1514015141      - `citations: BetaManagedAgentsSearchResultCitations`1514215143        Citation settings for a search result.1514415145        - `enabled: boolean`1514615147          Whether citations are enabled for this search result.1514815149      - `content: array of BetaManagedAgentsSearchResultContent`1515015151        Array of text content blocks from the search result.1515215153        - `type: "text"`1515415155        - `text: string`1515615157          The text content.1515815159          minLength: 11516015161      - `source: string`1516215163        The URL source of the search result.1516415165        minLength: 11516615167      - `title: string`1516815169        The title of the search result.1517015171        minLength: 11517215173  - `is_error: optional boolean or null`1517415175    Whether the tool execution resulted in an error.15176
Files main
Menu

Theme