Claude Managed Agents

Claude

Claude Managed Agents are agents you build and host on the Claude Platform. Anthropic runs the agent loop, and the Claude Managed Agents block calls one from a Sim workflow.

With Claude Managed Agents, you can:

  • Run a hosted agent: Send a message to an agent in your Claude workspace and get its final response back
  • Pick the environment: Choose the agent and the environment it runs in, so the same workflow can target development or production
  • Attach credential vaults: Give the agent scoped access to the credentials it needs for the run
  • Use a memory store: Connect a memory store with read or write access and pass instructions for how the agent should use it
  • Send files: Attach files to the run for the agent to work with
  • Tag runs with metadata: Add key-value tags so runs can be traced and grouped later

In Sim, the Claude Managed Agents block lets a workflow hand work to an agent that lives on the Claude Platform instead of assembling the prompt, tools, and loop yourself. The block returns the agent's final text alongside its session ID and token counts, so you can chain the response into later blocks and track cost per run.

Usage Instructions

Invoke a Claude Platform Managed Agent from a workflow. Select a Claude Platform account, pick an agent and environment from that workspace, optionally attach vaults, a memory store, and files, and add metadata tags. Returns the assistant's final text.

Actions

Managed Agent Run Session

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

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.
modelInputstringNoNo description

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.

Input

ParameterTypeRequiredDescription
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.

Input

ParameterTypeRequiredDescription
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.

Input

ParameterTypeRequiredDescription

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.

Input

ParameterTypeRequiredDescription
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.

Input

ParameterTypeRequiredDescription
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.

Input

ParameterTypeRequiredDescription

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.

Input

ParameterTypeRequiredDescription
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.

Input

ParameterTypeRequiredDescription
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.

Input

ParameterTypeRequiredDescription

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.

Input

ParameterTypeRequiredDescription

Output

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

On this page