|
| 1 | +--- |
| 2 | +title: A2A |
| 3 | +description: Interact with external A2A-compatible agents |
| 4 | +--- |
| 5 | + |
| 6 | +import { BlockInfoCard } from "@/components/ui/block-info-card" |
| 7 | + |
| 8 | +<BlockInfoCard |
| 9 | + type="a2a" |
| 10 | + color="#4151B5" |
| 11 | +/> |
| 12 | + |
| 13 | +{/* MANUAL-CONTENT-START:intro */} |
| 14 | +The A2A (Agent-to-Agent) protocol enables Sim to interact with external AI agents and systems that implement A2A-compatible APIs. With A2A, you can connect Sim’s automations and workflows to remote agents—such as LLM-powered bots, microservices, and other AI-based tools—using a standardized messaging format. |
| 15 | + |
| 16 | +Using the A2A tools in Sim, you can: |
| 17 | + |
| 18 | +- **Send Messages to External Agents**: Communicate directly with remote agents, providing prompts, commands, or data. |
| 19 | +- **Receive and Stream Responses**: Get structured responses, artifacts, or real-time updates from the agent as the task progresses. |
| 20 | +- **Continue Conversations or Tasks**: Carry on multi-turn conversations or workflows by referencing task and context IDs. |
| 21 | +- **Integrate Third-Party AI and Automation**: Leverage external A2A-compatible services as part of your Sim workflows. |
| 22 | + |
| 23 | +These features allow you to build advanced workflows that combine Sim’s native capabilities with the intelligence and automation of external AIs or custom agents. To use A2A integrations, you’ll need the external agent’s endpoint URL and, if required, an API key or credentials. |
| 24 | +{/* MANUAL-CONTENT-END */} |
| 25 | + |
| 26 | + |
| 27 | +## Usage Instructions |
| 28 | + |
| 29 | +Use the A2A (Agent-to-Agent) protocol to interact with external AI agents. |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +## Tools |
| 34 | + |
| 35 | +### `a2a_send_message` |
| 36 | + |
| 37 | +Send a message to an external A2A-compatible agent. |
| 38 | + |
| 39 | +#### Input |
| 40 | + |
| 41 | +| Parameter | Type | Required | Description | |
| 42 | +| --------- | ---- | -------- | ----------- | |
| 43 | +| `agentUrl` | string | Yes | The A2A agent endpoint URL | |
| 44 | +| `message` | string | Yes | Message to send to the agent | |
| 45 | +| `taskId` | string | No | Task ID for continuing an existing task | |
| 46 | +| `contextId` | string | No | Context ID for conversation continuity | |
| 47 | +| `apiKey` | string | No | API key for authentication | |
| 48 | + |
| 49 | +#### Output |
| 50 | + |
| 51 | +| Parameter | Type | Description | |
| 52 | +| --------- | ---- | ----------- | |
| 53 | +| `content` | string | The text response from the agent | |
| 54 | +| `taskId` | string | Task ID for follow-up interactions | |
| 55 | +| `contextId` | string | Context ID for conversation continuity | |
| 56 | +| `state` | string | Task state | |
| 57 | +| `artifacts` | array | Structured output artifacts | |
| 58 | +| `history` | array | Full message history | |
| 59 | + |
| 60 | +### `a2a_get_task` |
| 61 | + |
| 62 | +Query the status of an existing A2A task. |
| 63 | + |
| 64 | +#### Input |
| 65 | + |
| 66 | +| Parameter | Type | Required | Description | |
| 67 | +| --------- | ---- | -------- | ----------- | |
| 68 | +| `agentUrl` | string | Yes | The A2A agent endpoint URL | |
| 69 | +| `taskId` | string | Yes | Task ID to query | |
| 70 | +| `apiKey` | string | No | API key for authentication | |
| 71 | +| `historyLength` | number | No | Number of history messages to include | |
| 72 | + |
| 73 | +#### Output |
| 74 | + |
| 75 | +| Parameter | Type | Description | |
| 76 | +| --------- | ---- | ----------- | |
| 77 | +| `taskId` | string | Task ID | |
| 78 | +| `contextId` | string | Context ID | |
| 79 | +| `state` | string | Task state | |
| 80 | +| `artifacts` | array | Output artifacts | |
| 81 | +| `history` | array | Message history | |
| 82 | + |
| 83 | +### `a2a_cancel_task` |
| 84 | + |
| 85 | +Cancel a running A2A task. |
| 86 | + |
| 87 | +#### Input |
| 88 | + |
| 89 | +| Parameter | Type | Required | Description | |
| 90 | +| --------- | ---- | -------- | ----------- | |
| 91 | +| `agentUrl` | string | Yes | The A2A agent endpoint URL | |
| 92 | +| `taskId` | string | Yes | Task ID to cancel | |
| 93 | +| `apiKey` | string | No | API key for authentication | |
| 94 | + |
| 95 | +#### Output |
| 96 | + |
| 97 | +| Parameter | Type | Description | |
| 98 | +| --------- | ---- | ----------- | |
| 99 | +| `cancelled` | boolean | Whether cancellation was successful | |
| 100 | +| `state` | string | Task state after cancellation | |
| 101 | + |
| 102 | +### `a2a_get_agent_card` |
| 103 | + |
| 104 | +Fetch the Agent Card (discovery document) for an A2A agent. |
| 105 | + |
| 106 | +#### Input |
| 107 | + |
| 108 | +| Parameter | Type | Required | Description | |
| 109 | +| --------- | ---- | -------- | ----------- | |
| 110 | +| `agentUrl` | string | Yes | The A2A agent endpoint URL | |
| 111 | +| `apiKey` | string | No | API key for authentication \(if required\) | |
| 112 | + |
| 113 | +#### Output |
| 114 | + |
| 115 | +| Parameter | Type | Description | |
| 116 | +| --------- | ---- | ----------- | |
| 117 | +| `name` | string | Agent name | |
| 118 | +| `description` | string | Agent description | |
| 119 | +| `url` | string | Agent endpoint URL | |
| 120 | +| `version` | string | Agent version | |
| 121 | +| `capabilities` | object | Agent capabilities \(streaming, pushNotifications, etc.\) | |
| 122 | +| `skills` | array | Skills the agent can perform | |
| 123 | +| `defaultInputModes` | array | Default input modes \(text, file, data\) | |
| 124 | +| `defaultOutputModes` | array | Default output modes \(text, file, data\) | |
| 125 | + |
| 126 | +### `a2a_resubscribe` |
| 127 | + |
| 128 | +Reconnect to an ongoing A2A task stream after connection interruption. |
| 129 | + |
| 130 | +#### Input |
| 131 | + |
| 132 | +| Parameter | Type | Required | Description | |
| 133 | +| --------- | ---- | -------- | ----------- | |
| 134 | +| `agentUrl` | string | Yes | The A2A agent endpoint URL | |
| 135 | +| `taskId` | string | Yes | Task ID to resubscribe to | |
| 136 | +| `apiKey` | string | No | API key for authentication | |
| 137 | + |
| 138 | +#### Output |
| 139 | + |
| 140 | +| Parameter | Type | Description | |
| 141 | +| --------- | ---- | ----------- | |
| 142 | +| `taskId` | string | Task ID | |
| 143 | +| `contextId` | string | Context ID | |
| 144 | +| `state` | string | Current task state | |
| 145 | +| `isRunning` | boolean | Whether the task is still running | |
| 146 | +| `artifacts` | array | Output artifacts | |
| 147 | +| `history` | array | Message history | |
| 148 | + |
| 149 | +### `a2a_set_push_notification` |
| 150 | + |
| 151 | +Configure a webhook to receive task update notifications. |
| 152 | + |
| 153 | +#### Input |
| 154 | + |
| 155 | +| Parameter | Type | Required | Description | |
| 156 | +| --------- | ---- | -------- | ----------- | |
| 157 | +| `agentUrl` | string | Yes | The A2A agent endpoint URL | |
| 158 | +| `taskId` | string | Yes | Task ID to configure notifications for | |
| 159 | +| `webhookUrl` | string | Yes | HTTPS webhook URL to receive notifications | |
| 160 | +| `token` | string | No | Token for webhook validation | |
| 161 | +| `apiKey` | string | No | API key for authentication | |
| 162 | + |
| 163 | +#### Output |
| 164 | + |
| 165 | +| Parameter | Type | Description | |
| 166 | +| --------- | ---- | ----------- | |
| 167 | +| `url` | string | Configured webhook URL | |
| 168 | +| `token` | string | Token for webhook validation | |
| 169 | +| `success` | boolean | Whether configuration was successful | |
| 170 | + |
| 171 | +### `a2a_get_push_notification` |
| 172 | + |
| 173 | +Get the push notification webhook configuration for a task. |
| 174 | + |
| 175 | +#### Input |
| 176 | + |
| 177 | +| Parameter | Type | Required | Description | |
| 178 | +| --------- | ---- | -------- | ----------- | |
| 179 | +| `agentUrl` | string | Yes | The A2A agent endpoint URL | |
| 180 | +| `taskId` | string | Yes | Task ID to get notification config for | |
| 181 | +| `apiKey` | string | No | API key for authentication | |
| 182 | + |
| 183 | +#### Output |
| 184 | + |
| 185 | +| Parameter | Type | Description | |
| 186 | +| --------- | ---- | ----------- | |
| 187 | +| `url` | string | Configured webhook URL | |
| 188 | +| `token` | string | Token for webhook validation | |
| 189 | +| `exists` | boolean | Whether a push notification config exists | |
| 190 | + |
| 191 | +### `a2a_delete_push_notification` |
| 192 | + |
| 193 | +Delete the push notification webhook configuration for a task. |
| 194 | + |
| 195 | +#### Input |
| 196 | + |
| 197 | +| Parameter | Type | Required | Description | |
| 198 | +| --------- | ---- | -------- | ----------- | |
| 199 | +| `agentUrl` | string | Yes | The A2A agent endpoint URL | |
| 200 | +| `taskId` | string | Yes | Task ID to delete notification config for | |
| 201 | +| `pushNotificationConfigId` | string | No | Push notification configuration ID to delete \(optional - server can derive from taskId\) | |
| 202 | +| `apiKey` | string | No | API key for authentication | |
| 203 | + |
| 204 | +#### Output |
| 205 | + |
| 206 | +| Parameter | Type | Description | |
| 207 | +| --------- | ---- | ----------- | |
| 208 | +| `success` | boolean | Whether deletion was successful | |
| 209 | + |
| 210 | + |
| 211 | + |
| 212 | +## Notes |
| 213 | + |
| 214 | +- Category: `tools` |
| 215 | +- Type: `a2a` |
0 commit comments