| Field | Value |
|---|---|
| Canonical URI | https://docs.aion.to/extensions/aion/distribution/1.0.0 |
| Issuer | aion |
| Version | 1.0.0 |
| Activation | This extension is declarative. It will always be active and does not require activation. |
| Related Extensions | Event |
Overview
Distributions are A2A-protocol adapters for external messaging systems. These are intended to allow agents to use these messaging systems as their primary user IO within three contexts:- User Requests: a user sends a message and the agent responds. This is the classic request-response loop most agent frameworks are designed for.
- Event-based Messages: an agent triggers an event during its workflow that results in an outbound message being sent.
- MCP: agents use the A2A messaging adapter as tools, allowing the agent to generatively determine when and where to send a message.
Extensions
Distribution-related functionality, as with all augmentations to the A2A protocol, is wrapped in extensions. These document supported functionality and give servers the ability to communicate about their capabilities. The operations and events defined on this page are categorized in the distributions/base extension: Extension: distributions/base.Domain
The shared concepts among external messaging APIs are normalized into the following domain. Many messaging systems have unique features which are not covered here. This approach helps us get 90% of the necessary integration functionality. If other calls are needed, they can be made available through additional SDK libraries or the developer may need to implement the messaging service’s SDK directly.| Concept | Definition |
|---|---|
| Distribution | Proxy for an external messaging API that maps requests to A2A messages. |
| Message | |
| Context | Conversation or thread; may be nested for chat rooms, forums, or threaded replies. |
| Timeline | |
| Reaction | |
| Post | Single message from a user or agent within a conversation or thread. |
- The Aion server maps requests into framework-specific interactions (for example, Langgraph or ADK).
- Requests include a
distributionIdthat identifies their origin. - Outbound requests can be sent over the GraphQL API using this id or via HTTP at the Distribution’s A2A URI endpoint.
Messages
These operations provide the baseline for interaction among most networks, but they are not comprehensive. Some mediums, such as voice, have additional events. These will be useful for a developer attempting to optimize interactions on such networks. However, Aion’s control plane, servers, and SDKs are designed to minimize integration work. Our primary goal is that your agent can simply follow a standard request-response loop to operate in most mediums. In other words, your agent receives a message and optionally replies to it.Receive Message
Inbound: Distribution → Agent Sent to the agent when a new message is received by the distribution. A message can be received in several contexts. Message responses will be sent back to the requesting user on the same channel on which it was received. It’s unnecessary to send a message event similar to Send Message when replying to a message. The agent’s response, if any, will be considered the reply. For A2A, this means including a Text MessagePart as part of a Message in the RPC’s terminal event. A terminal event can be a Message, Task, or terminal TaskStatusUpdateEvent (any task state that isn’t submitted or working). For a task, we will take the last Message in the history property. For a task status update event, we will take the message in its status property.Event Payload
{explain the parameters in the aion:event}| Trajectory | Definition |
|---|---|
direct-message | The agent received a direct message. |
reply | A user replied to an agent’s post. |
timeline | In an inbound message, someone @mentioned the agent. |
conversation | Posted in a conversation the agent participates in; nested threads include parentConversationId. |
Send Message
Outbound: Agent → Distribution Outbound messages are sent to a distribution endpoint. Aion provides two transport options:- GraphQL: Send a message as a GraphQL subscription query through our API over WebSockets. Aion’s SDKs use this mechanism.
- HTTP SSE: Distributions have an A2A-compatible HTTP endpoint. This uses the standard JSON-RPC format.
Event Payload
{explain the parameters in the aion:event}| Trajectory | Definition |
|---|---|
direct-message | Direct message to a user; requires userId. |
reply | Reply to a user’s message; requires messageId. |
timeline | Post to the agent identity’s timeline. |
conversation | Post to a conversation the agent participates in; requires contextId. |
Get Conversation
Outbound: Agent → Distribution To get conversation history, use the Extension: contexts/get extension.Outstanding Qs
- Should we make the event payload part of the message metadata instead of a message part?
- For long-tail API interactions, if they do not include this “trajectory,” should the distribution fulfill the request as best as possible (e.g., moderation actions)? If so, should the message’s role be “human” instead of “agent”?