Skip to content

Commit ce7b30a

Browse files
feat(a2a): added a2a protocol (#2784)
* feat(a2a): a2a added * feat(a2a): added a2a protocol * remove migrations * readd migrations * consolidated permissions utils * consolidated tag-input, output select -> combobox, added tags for A2A * cleanup up utils, share same deployed state as other tabs * ack PR comments * more * updated code examples * solely rely on tanstack query to vend data and invalidate query key's, remove custom caching --------- Co-authored-by: Emir Karabeg <[email protected]>
1 parent 5c771e1 commit ce7b30a

File tree

70 files changed

+17889
-483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+17889
-483
lines changed

apps/docs/components/icons.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4078,6 +4078,31 @@ export function McpIcon(props: SVGProps<SVGSVGElement>) {
40784078
)
40794079
}
40804080

4081+
export function A2AIcon(props: SVGProps<SVGSVGElement>) {
4082+
return (
4083+
<svg {...props} viewBox='0 0 860 860' fill='none' xmlns='http://www.w3.org/2000/svg'>
4084+
<circle cx='544' cy='307' r='27' fill='currentColor' />
4085+
<circle cx='154' cy='307' r='27' fill='currentColor' />
4086+
<circle cx='706' cy='307' r='27' fill='currentColor' />
4087+
<circle cx='316' cy='307' r='27' fill='currentColor' />
4088+
<path
4089+
d='M336.5 191.003H162C97.6588 191.003 45.5 243.162 45.5 307.503C45.5 371.844 97.6442 424.003 161.985 424.003C206.551 424.003 256.288 424.003 296.5 424.003C487.5 424.003 374 191.005 569 191.001C613.886 191 658.966 191 698.025 191C762.366 191.001 814.5 243.16 814.5 307.501C814.5 371.843 762.34 424.003 697.998 424.003H523.5'
4090+
stroke='currentColor'
4091+
strokeWidth='48'
4092+
strokeLinecap='round'
4093+
/>
4094+
<path
4095+
d='M256 510.002C270.359 510.002 282 521.643 282 536.002C282 550.361 270.359 562.002 256 562.002H148C133.641 562.002 122 550.361 122 536.002C122 521.643 133.641 510.002 148 510.002H256ZM712 510.002C726.359 510.002 738 521.643 738 536.002C738 550.361 726.359 562.002 712 562.002H360C345.641 562.002 334 550.361 334 536.002C334 521.643 345.641 510.002 360 510.002H712Z'
4096+
fill='currentColor'
4097+
/>
4098+
<path
4099+
d='M444 628.002C458.359 628.002 470 639.643 470 654.002C470 668.361 458.359 680.002 444 680.002H100C85.6406 680.002 74 668.361 74 654.002C74 639.643 85.6406 628.002 100 628.002H444ZM548 628.002C562.359 628.002 574 639.643 574 654.002C574 668.361 562.359 680.002 548 680.002C533.641 680.002 522 668.361 522 654.002C522 639.643 533.641 628.002 548 628.002ZM760 628.002C774.359 628.002 786 639.643 786 654.002C786 668.361 774.359 680.002 760 680.002H652C637.641 680.002 626 668.361 626 654.002C626 639.643 637.641 628.002 652 628.002H760Z'
4100+
fill='currentColor'
4101+
/>
4102+
</svg>
4103+
)
4104+
}
4105+
40814106
export function WordpressIcon(props: SVGProps<SVGSVGElement>) {
40824107
return (
40834108
<svg {...props} xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25.925 25.925'>

apps/docs/components/ui/icon-mapping.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import type { ComponentType, SVGProps } from 'react'
66
import {
7+
A2AIcon,
78
AhrefsIcon,
89
AirtableIcon,
910
ApifyIcon,
@@ -127,6 +128,7 @@ import {
127128
type IconComponent = ComponentType<SVGProps<SVGSVGElement>>
128129

129130
export const blockTypeToIconMap: Record<string, IconComponent> = {
131+
a2a: A2AIcon,
130132
ahrefs: AhrefsIcon,
131133
airtable: AirtableIcon,
132134
apify: ApifyIcon,
Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
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`

apps/docs/content/docs/en/tools/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"pages": [
33
"index",
4+
"a2a",
45
"ahrefs",
56
"airtable",
67
"apify",

0 commit comments

Comments
 (0)