Claude Managed Agents

Call a Claude Managed Agent hosted on the Claude Platform from a Sim workflow. Select a Claude Platform account, agent, and environment, then send the task message.

Optional inputs attach credential vaults, a memory store with read or write access and usage instructions, files, and metadata tags. The Run session (create, send, wait for reply) operation waits for the reply and returns final text and a session ID, with token usage when available, for downstream processing and cost tracking. Outputs from the other operations depend on the selected action. Session actions also create, inspect, interrupt, archive, update, or delete sessions; read events; and submit custom-tool results or confirmation responses. File attachments are supported for cloud environments.

Use the block

Run or create a session with a Claude Platform account, agent, and environment. Optionally attach vaults, a memory store, files, and metadata. The Run session operation waits for the agent’s reply and returns final text and a session ID, with token usage when available. Outputs from other operations depend on the selected action.

Actions

Managed Agent Run Session

Open a Claude Platform Managed Agent session and return the assistant response as text.

Inputs and outputs

Input

ParameterTypeRequiredDescription
credentialstringYesClaude Platform credential (Anthropic workspace API key) to run the agent with.
agentstringYesManaged-agent id inside the linked Claude workspace.
environmentstringYesEnvironment id inside the linked Claude workspace.
environmentTypestringNoEnvironment execution model hint ('cloud' | 'self_hosted'); the actual type is re-resolved server-side for routing.
userMessagestringYesThe user message to send to the Managed Agent.
vaultsarrayNoZero or more vault ids for MCP tool auth.
vaultsAckbooleanNoAcknowledgement that the author may use the attached vaults.
memoryStoreIdstringNoOptional Agent Memory Store id.
memoryAccessstringNoMemory store access mode: 'read_write' (default) or 'read_only'.
memoryInstructionsstringNoPer-attachment guidance for how the agent should use the memory store.
filesarrayNoFile attachments (cloud envs only), as [{fileId, mountPath?}].
sessionParametersobjectNoKey/value session metadata forwarded to the session.

Output

ParameterTypeDescription
contentstringFinal assistant text from the Managed Agent session.
sessionIdstringAnthropic session id (for logs / linking).
inputTokensnumberCumulative input tokens for the session.
outputTokensnumberCumulative output tokens for the session.

Managed Agent Create Session

Create a Claude Platform Managed Agent session and return its id without waiting for a reply.

Inputs and outputs

Input

ParameterTypeRequiredDescription
credentialstringYesClaude Platform credential (Anthropic workspace API key) to act with.
agentstringYesManaged-agent id inside the linked Claude workspace.
environmentstringYesEnvironment id inside the linked Claude workspace.
environmentTypestringNoEnvironment execution model hint ('cloud' | 'self_hosted').
userMessagestringNoOptional first message; seeds initial_events and starts the agent immediately.
vaultsarrayNoZero or more vault ids for MCP tool auth.
vaultsAckbooleanNoAcknowledgement that the author may use the attached vaults.
memoryStoreIdstringNoOptional Agent Memory Store id.
memoryAccessstringNoMemory store access mode: 'read_write' (default) or 'read_only'.
memoryInstructionsstringNoPer-attachment guidance for how the agent should use the memory store.
filesarrayNoFile attachments (cloud envs only), as [{fileId, mountPath?}].
sessionParametersobjectNoKey/value session metadata forwarded to the session.

Output

ParameterTypeDescription
sessionIdstringAnthropic session id (sesn_...).
startedbooleanTrue when a first message was seeded, so the agent is already running.

Managed Agent Send Message

Send a user message to an existing Claude Platform Managed Agent session.

Inputs and outputs

Input

ParameterTypeRequiredDescription
credentialstringYesClaude Platform credential (Anthropic workspace API key) to act with.
sessionIdstringYesAnthropic session id (sesn_...) to act on.
userMessagestringYesThe user message to send to the session.

Output

ParameterTypeDescription
sessionIdstringThe session the message was sent to.
sentbooleanTrue when the event was accepted by the API.

Managed Agent Get Session

Read a Managed Agent session: status, stop reason, token usage, metadata, and any tool calls awaiting approval.

Inputs and outputs

Input

ParameterTypeRequiredDescription
credentialstringYesClaude Platform credential (Anthropic workspace API key) to act with.
sessionIdstringYesAnthropic session id (sesn_...) to act on.

Output

ParameterTypeDescription
sessionIdstringThe session that was read.
statusstringSession status — 'idle', 'running', 'rescheduling', or 'terminated'.
stopReasonstringWhy the session last stopped, e.g. 'end_turn' or 'requires_action'.
requiresActionbooleanTrue when the session is waiting on a tool confirmation or custom tool result. If this is true while pendingTools is empty, the session is blocked but the API named no blocking events — surface it rather than treating the session as done.
pendingToolsjsonBlocking tool calls — [{id, eventType, kind, name, input}]. Route by kind: 'confirmation' ids go to Respond To Tool Confirmation, 'custom_tool_result' ids go to Respond To Custom Tool.
metadatajsonSession metadata.
titlestringSession title.
inputTokensnumberCumulative input tokens.
outputTokensnumberCumulative output tokens.

Managed Agent List Events

Read a Managed Agent session's event history and the agent's reply text.

Inputs and outputs

Input

ParameterTypeRequiredDescription
credentialstringYesClaude Platform credential (Anthropic workspace API key) to act with.
sessionIdstringYesAnthropic session id (sesn_...) to act on.
eventTypesarrayNoOptional event-type filter, e.g. ['agent.message']. Omit to return every event.
limitnumberNoMaximum events to return, keeping the most recent (default 500).

Output

ParameterTypeDescription
sessionIdstringThe session that was read.
eventsjsonSession events, oldest first.
countnumberNumber of events returned.
assistantTextstringConcatenated text of every persisted agent.message, in order.
truncatedbooleanTrue when the limit was hit and older events were dropped.

Managed Agent Update Session

Update a Managed Agent session's title or metadata.

Inputs and outputs

Input

ParameterTypeRequiredDescription
credentialstringYesClaude Platform credential (Anthropic workspace API key) to act with.
sessionIdstringYesAnthropic session id (sesn_...) to act on.
titlestringNoNew session title.
sessionParametersobjectNoReplacement metadata map (replaces all stored metadata, not merged). Leaving it empty leaves the stored metadata unchanged — use clearMetadata to remove it.
clearMetadatabooleanNoRemoves all of the session's stored metadata. Overrides any map supplied above.

Output

ParameterTypeDescription
sessionIdstringThe session that was updated.
updatedbooleanTrue when the update was accepted.
metadatajsonMetadata after the update.
titlestringTitle after the update.

Managed Agent Interrupt Session

Stop a running Managed Agent session; it stays usable afterwards.

Inputs and outputs

Input

ParameterTypeRequiredDescription
credentialstringYesClaude Platform credential (Anthropic workspace API key) to act with.
sessionIdstringYesAnthropic session id (sesn_...) to act on.

Output

ParameterTypeDescription
sessionIdstringThe session that was interrupted.
interruptedbooleanTrue when the interrupt was accepted.

Managed Agent Respond To Tool Confirmation

Allow or deny the tool calls a Managed Agent session is waiting on before it can continue.

Inputs and outputs

Input

ParameterTypeRequiredDescription
credentialstringYesClaude Platform credential (Anthropic workspace API key) to act with.
sessionIdstringYesAnthropic session id (sesn_...) to act on.
toolUseIdsarrayYesBlocking tool-use EVENT ids, from Get Session pendingTools[].id where kind is 'confirmation' (not toolu_ ids).
decisionstringYes'allow' to let the tools run, or 'deny' to reject them.
denyMessagestringNoReason surfaced to the agent. Only sent when the decision is deny.

Output

ParameterTypeDescription
sessionIdstringThe session that was answered.
decisionstringThe decision applied — 'allow' or 'deny'.
confirmedToolUseIdsjsonThe tool-use event ids that were answered.

Managed Agent Respond To Custom Tool

Return the result of a custom tool a Managed Agent session is waiting on so it can continue.

Inputs and outputs

Input

ParameterTypeRequiredDescription
credentialstringYesClaude Platform credential (Anthropic workspace API key) to act with.
sessionIdstringYesAnthropic session id (sesn_...) to act on.
customToolUseIdstringYesThe custom tool-use EVENT id being answered, from Get Session pendingTools[].id where kind is 'custom_tool_result'.
resultstringYesThe tool's output, returned to the agent as text.
isErrorbooleanNoMark the result as a failure so the agent can adjust its approach.

Output

ParameterTypeDescription
sessionIdstringThe session that was answered.
answeredToolUseIdstringThe custom tool-use event id that was answered.

Managed Agent Archive Session

Archive a Managed Agent session, preserving its history. Not reversible.

Inputs and outputs

Input

ParameterTypeRequiredDescription
credentialstringYesClaude Platform credential (Anthropic workspace API key) to act with.
sessionIdstringYesAnthropic session id (sesn_...) to act on.

Output

ParameterTypeDescription
sessionIdstringThe session that was archived.
archivedbooleanTrue when the archive was accepted.

Managed Agent Delete Session

Permanently delete a Managed Agent session, its events, and its sandbox. Not reversible.

Inputs and outputs

Input

ParameterTypeRequiredDescription
credentialstringYesClaude Platform credential (Anthropic workspace API key) to act with.
sessionIdstringYesAnthropic session id (sesn_...) to act on.

Output

ParameterTypeDescription
sessionIdstringThe session that was deleted.
deletedbooleanTrue when the delete was accepted.