Take tasks from other assistants (A2A)
Let other AI assistants give tasks to yours from outside your server, with a key and a list of who can call.
A2A is a standard way for one AI assistant to send tasks to another. In the app it's in Messaging as A2A. This page explains how to let other assistants give tasks to yours from outside your server.
Whoever calls gives your assistant work
The tasks that arrive through A2A are done by your assistant, the same one you talk to, with what's in its memory. In those tasks it searches the web, but it doesn't open your files, run programs or look things up in your connected apps. Every task comes out of your AI usage. Only give keys to people you know.
When calls from outside get through
Calls from outside reach A2A only if all of this is true:
- A2A is connected on that assistant.
- A2A has a key, in the per-caller keys field or in the shared key field.
- The listening address field is
0.0.0.0. - Your server isn't paused, for example because of a pending payment.
On top of that, your assistant turns down everyone who calls if you haven't told it who can call. We explain it in step 3.
Open A2A
Open the A2A card
In the app, open Messaging and click A2A. If you have several assistants, pick the one that will take the tasks at the top.
Create the keys
In the per-caller keys field (A2A per-peer tokens (name:token, comma-separated; or empty)), put one key for each assistant that will call yours, in the form name:key and separated by commas. For example, ana:key1,luis:key2. This is what we recommend: each one calls with its own name and has its own call limit.
If you'd rather have a single key for everyone, put it in the shared key field (A2A shared bearer token (or empty for localhost-only)). Then everyone who calls counts as one and they share a limit of 60 calls per minute.
Use long keys that are hard to guess, like a password.
Decide who can call
Before you save, ask that same assistant for one of these two things:
- To put in
A2A_TRUSTED_PEERSthe names from the per-caller keys that can call, separated by commas. For example: "SetA2A_TRUSTED_PEERSto ana,luis". - To set
A2A_ALLOW_ALL_USERStotrue, to let in anyone who has a valid key. This is what you need with the shared key.
Without either of them, your assistant turns down everyone who calls from outside. A list of addresses doesn't work: behind your server, all calls arrive from the same address. The names on the list only work with per-caller keys.
Set the listening address
In the listening address field (A2A bind host (default 127.0.0.1)), type 0.0.0.0. If you leave it empty, A2A only takes calls from inside your server, even with a key. A specific address, like your server's, doesn't work.
Pick the port, if you have A2A on more than one assistant
Each assistant with A2A needs its own number in A2A port (default 9900). If you leave it empty, 9900 is used, so on the second assistant put another one, for example 9901.
Save
Click Save changes. On your main assistant, then click Restart now. On your other assistants, A2A starts when you save, without a restart.
Give the address to whoever calls
When A2A is open, the card shows its address in Address of this channel:. It's your assistant's address followed by /a2a/ and the assistant's name. On your main assistant, that name is default. Give that address and their key to whoever will call.
If you change something while A2A is running
Your assistant reads the keys, the list of who can call, the listening address and the port when A2A starts. If you change any of that while it's already running, on any of your assistants, it applies after a restart, and that restarts all your assistants. Until then it keeps the old settings. If you changed the port, the address may stop working until you restart.
To restart from the app, click your name, at the bottom left, and then the Assistant connected line, the one that says Restart assistant.
Good to know
- With A2A open, anyone can read your assistant's profile card without a key, with its name and its tools, and its A2A usage figures.
- With the shared key, everyone who calls shares a limit of 60 calls per minute. With per-caller keys, each one has their own.
- While your server is paused, A2A takes nothing from outside.
If something goes wrong
The key they use doesn't match any of yours. Check that they copied the whole key. If you changed the keys while A2A was running, restart your assistant.
Your assistant doesn't know that person can call. Ask it to add their name to A2A_TRUSTED_PEERS, or to set A2A_ALLOW_ALL_USERS to true, and restart your assistant.
Check the list in When calls from outside get through: the key, 0.0.0.0 in the listening address and that A2A is connected. If you changed something while A2A was running, restart your assistant.