A2A

a2

The A2A (Agent-to-Agent) protocol lets Sim call external AI agents that expose an A2A-compatible endpoint. Use it to connect your workflows to remote agents — LLM-powered bots, microservices, and other AI systems — through a standardized message format.

With the A2A block you can:

  • Send messages to external agents: Pass prompts, structured data, or files to a remote agent and get its response.
  • Track and cancel tasks: Poll the state of a long-running task or request its cancellation.
  • Discover capabilities: Fetch an agent's Agent Card to inspect its skills, capabilities, and supported modes.

You need the external agent's endpoint URL and, if it requires authentication, an API key.

Usage Instructions

Use the A2A (Agent-to-Agent) protocol to call external AI agents over the latest A2A specification.

Tools

a2a_send_message

Send a message to an external A2A agent and return its response.

Input

ParameterTypeRequiredDescription
agentUrlstringYesThe A2A agent endpoint URL
messagestringYesThe message text to send
datastringNoOptional structured JSON data to attach (JSON string or object)
filesarrayNoFiles to attach, uploaded or referenced from a previous block
taskIdstringNoExisting task ID to continue
contextIdstringNoConversation context ID to continue
apiKeystringNoAPI key for authentication (if required)

Output

ParameterTypeDescription
contentstringAgent response text
taskIdstringTask identifier
contextIdstringConversation/context identifier
statestringTask lifecycle state: submitted, working, input-required, auth-required, completed, failed, canceled, or rejected
artifactsarrayStructured task output artifacts

a2a_get_task

Retrieve the current state and result of an A2A task.

Input

ParameterTypeRequiredDescription
agentUrlstringYesThe A2A agent endpoint URL
taskIdstringYesThe task ID to retrieve
historyLengthnumberNoMaximum number of history messages to include
apiKeystringNoAPI key for authentication (if required)

Output

ParameterTypeDescription
contentstringAgent response text
taskIdstringTask identifier
contextIdstringConversation/context identifier
statestringTask lifecycle state
artifactsarrayStructured task output artifacts

a2a_cancel_task

Request cancellation of an in-progress A2A task.

Input

ParameterTypeRequiredDescription
agentUrlstringYesThe A2A agent endpoint URL
taskIdstringYesThe task ID to cancel
apiKeystringNoAPI key for authentication (if required)

Output

ParameterTypeDescription
taskIdstringTask identifier
statestringTask lifecycle state after cancellation
canceledbooleanWhether the task reached the canceled state

a2a_get_agent_card

Fetch the Agent Card (discovery document) for an external A2A agent.

Input

ParameterTypeRequiredDescription
agentUrlstringYesThe A2A agent endpoint URL
apiKeystringNoAPI key for authentication (if required)

Output

ParameterTypeDescription
namestringAgent display name
descriptionstringAgent description
urlstringAgent endpoint URL
versionstringThe agent's own version
protocolVersionstringA2A protocol version the agent exposes
capabilitiesjsonAgent capability flags
skillsarraySkills the agent can perform
defaultInputModesarrayDefault accepted input media types
defaultOutputModesarrayDefault produced output media types

Notes

  • Category: blocks
  • Type: a2a
  • Send Message blocks until the agent reaches a terminal (completed, failed, canceled, rejected) or interrupted (input-required, auth-required) state. Use Get Task to poll a task you continue later, and branch on state.
  • Task IDs are scoped to the external agent, not to Sim. Anyone who knows an agent URL and task ID can read or cancel that task unless the agent enforces its own authentication — set an API key for agents that require one.

On this page