Agent Messaging
Send structured messages between AI agents on the same team using Kite Cloud — no server infrastructure to operate.
Kite Cloud ships with a first-class agent-to-agent (A2A) messaging primitive. Any agent on your team can send a structured CloudEvent of type com.kite.agent.message addressed to another agent on the same team, and any agent listening for that recipient id receives it in real time over WebSocket.
There is no peer setup, no operator configuration, and no separate server to run. The hosted Kite relay at api.getkite.sh handles persistence, fan-out, and quota.
Why first-class A2A
Webhooks tell your agents about the outside world (a Stripe charge, a GitHub push). A2A messaging lets your agents talk to each other:
- A planner agent hands a refined task off to a worker agent.
- A scraper agent shares findings with a summarizer agent.
- A long-running job posts status updates that other agents subscribe to.
These flows used to require ad-hoc message buses, custom HTTP endpoints, or shared databases. With Kite, they're a CloudEvent.
The com.kite.agent.message event
Every agent message is a CloudEvent v1.0 with type com.kite.agent.message. The data field follows this schema:
{
"specversion": "1.0",
"type": "com.kite.agent.message",
"source": "https://getkite.sh/agents/agent-alpha",
"id": "01HXYZ...",
"data": {
"from": "agent-alpha",
"to": "agent-beta",
"body": "Here are the results you asked for.",
"thread_id": "thread-abc123",
"reply_to_id": "01HABC..."
}
}| Field | Required | Description |
|---|---|---|
from | yes | Sender agent id (any string your agents agree on). |
to | yes | Recipient agent id. Listeners subscribe with agent_to:<this value>. |
body | yes | Free-form message body. Plain text or anything else your agents understand. |
thread_id | no | Optional conversation grouping. |
reply_to_id | no | Optional CloudEvent id this message is replying to. |
Delivery model
Agent messages flow through the same persistence and broadcast layer as any other Kite event:
1. Send — POST the message to https://api.getkite.sh/api/v1/agents/messages?team_id=<team> with your API key. Kite stores the event, charges it against your team's event quota, and broadcasts it. 2. Filter — Listeners subscribe with the agent_to:<agent_id> scope. Kite routes only the matching com.kite.agent.message events to that subscriber. 3. Receive — Listeners get the event over WebSocket within milliseconds, with full CloudEvent metadata.
Messages persist in the team's event log and are replayable on reconnect, so transient listener disconnects don't lose data.
Subscription scopes
The WebSocket subscription grammar adds one new scope for agent messaging:
| Scope | Matches |
|---|---|
* | All events on the team. |
source:<name> | Events whose source contains <name> (e.g. source:github). |
type:<name> | Events whose type contains <name>. |
agent_to:<agent_id> | Only com.kite.agent.message events whose data.to equals <agent_id>. |
Combine with team-scoped API keys: an agent listening as agent_to:agent-alpha will only see messages on its own team that are addressed to it.
Team scoping
A2A is team-scoped. An agent on team A cannot send messages to an agent on team B — the team boundary is enforced server-side both at ingestion (your API key is bound to one team) and at fan-out (the broadcaster never crosses teams).
If you need cross-team agent collaboration, contact us — that's a separate enterprise feature, not part of the hosted A2A primitive.