Agent-to-agent communication
When work crosses agent-system boundaries, explicit tasks and artifacts are more dependable than an informal chat transcript.
Delegate work, not unlimited authority
A support system might ask a separate logistics system for a delivery investigation. A2A defines structures for communicating capabilities, messages, tasks, and artifacts across systems. It does not ensure that a remote agent is correct, trustworthy, or authorized to act on behalf of a customer.
How it works
Define the task's expected output and lifecycle: submitted, working, input required, completed, or failed, using the exact states of your chosen protocol version. Track a correlation identifier, deadlines, cancellation, and duplicate submissions. Validate the returned artifact against your contract before using it in a customer response.
A concrete example
A logistics agent returns an estimated arrival date plus the carrier reference used. If it instead asks for a missing tracking number, the support assistant should collect that information rather than treating the task as completed. Completion status and artifact quality are different checks.
Apply it to your assistant
Remove the carrierReference and observe validation fail. Before running the exercise, predict the result. Afterward, explain which assumption changed and add one case where the system should refuse, ask for clarification, or escalate.
All exercise inputs and outputs are deterministic teaching examples. No language model is called. Run the same idea against a versioned dataset before making a production claim.
Key takeaway
Cross-system delegation needs identity, lifecycle management, and artifact validation.
JavaScript exercise: Agent-to-agent communication · code experiment
Remove the carrierReference and observe validation fail.
const task = { id: 'investigation-1', state: 'completed', artifact: { arrival: 'Friday', carrierReference: 'tracking-42' } };
const valid = task.state === 'completed' && typeof task.artifact?.carrierReference === 'string';
console.log({ taskId: task.id, accepted: valid });
console.log('Simplified application contract, not an A2A wire message.');
Knowledge check
A remote task says completed but returns no required evidence. What should the caller do?
- Trust the status field alone
- Mark the artifact invalid and handle the contract failure
- Invent the missing evidence
Answer and explanation
Mark the artifact invalid and handle the contract failure
A completed lifecycle state is not proof that the returned artifact satisfies the caller's acceptance criteria.
Sources
- Agent2Agent Protocol specification — A2A contributors, Living specification. Discovery, messages, tasks, artifacts, and interoperability between agent systems.
Continue learning
- Model Context Protocol — MCP standardizes how applications connect to tools and context. It does not replace authorization or validate the truth of a tool result.
- Agent-to-agent communication — When work crosses agent-system boundaries, explicit tasks and artifacts are more dependable than an informal chat transcript.
- Choosing integration contracts — Tool integration, remote task delegation, and reusable instructions solve different problems. Pick the contract for the boundary you actually have.
- Reusable agent skills — A skill packages instructions and supporting resources for a repeatable task. It is executable guidance, not a new trust level.