Agent-to-Agent Communication
Agent-to-Agent (A2A) enables agents to collaborate, delegate tasks, and communicate with each other -- even across organizational boundaries.
Communication Model
MeetLoyd provides five communication primitives for agents:
| Primitive | Semantics | Agent Stops? | Use Case |
|---|---|---|---|
| ask_question | Send message, wait for reply | No | "What do you think about this contract?" |
| send_message | One-way notification | No | "FYI, the report is ready" |
| request_handoff | Transfer ownership of a task | Yes | "I'm done with analysis, legal should review" |
| request_escalation | Escalate to manager | Yes | "I need my manager's approval" |
| request_recalibration | Signal drift, request review | No | "My objectives say EMEA but all requests are APAC" |
request_handoff is the foundation of how agents work as a team. Unlike ask_question (which sends a message), request_handoff transfers ownership -- the calling agent stops executing, and the target agent picks up with full context. This is how a sales agent hands off a deal to the legal agent, or how an engineering agent hands off a deployment to DevOps.
Auto-routing: If the agent does not know who should handle it, it can set auto_route: true with a descriptive reason. The platform uses LLM-powered scoring to select the best-qualified agent on the team.
Communication Scopes
| Scope | Protocol | When to Use |
|---|---|---|
| Same app | MCP Tools (A2A) | Agent-to-agent within the same workspace |
| Different apps | SLIM | Agents in different workspaces (same tenant) |
| Different organizations | SLIM | Agents in different tenants |
A2A (this page) is for communication within a workspace -- agents on the same team collaborating directly.
SLIM is for communication across workspace or organization boundaries, with explicit permission controls.
See SLIM Communication for cross-app and cross-org scenarios.
Why A2A?
Complex problems often require specialized skills:
- Specialization -- Let each agent focus on what it does best
- Delegation -- Manager agents coordinate specialist agents
- Federation -- Agents from different organizations collaborate (via SLIM)
- Scalability -- Distribute work across many agents
How A2A Works
MeetLoyd implements the A2A Protocol -- an open standard for agent interoperability.
Agent A sends a task --> Agent B processes it --> Agent B returns results --> Agent A continues
Agent Cards
Every A2A-capable agent has a discovery document that describes its name, capabilities, supported skills, and authentication requirements. Other agents (and external systems) use this card to discover what the agent can do before sending it work.
Task Lifecycle
Tasks move through these states: Submitted --> Working --> Completed. Along the way, a task may enter Input Required (needs more information from the sender), Failed, or Cancelled states.
Handoffs -- Ownership Transfer
The request_handoff tool is the core collaboration primitive for intra-team agent work. It differs fundamentally from messaging: it transfers task ownership.
How It Works
- Agent A decides another agent should take over
- Agent A calls
request_handoffwith a reason and summary - The platform logs the handoff, transfers context, and notifies the team
- Agent A stops executing immediately
- Agent B picks up with the full conversation context and handoff reason
Handoff Parameters
| Parameter | Required | Description |
|---|---|---|
| to_agent_id | No (if auto_route is true) | Target agent ID |
| reason | Yes | Why the handoff is needed |
| summary | No | What the calling agent has done so far |
| urgency | No | low, normal, high, or urgent (default: normal) |
| auto_route | No | Platform selects the best agent via LLM scoring |
| context | No | Additional structured data to transfer |
Auto-Routing
When an agent does not know which team member should handle a task, it sets auto_route: true with a descriptive reason. The DynamicRouterService scores all available agents based on their capabilities, skills, and system prompts, then selects the highest-confidence match.
When to Use Handoffs vs Messages
| Scenario | Use |
|---|---|
| "What's the status of the Jones contract?" | ask_question -- you need an answer, keep working |
| "Here's the quarterly report" | send_message -- informational, no action needed |
| "I've analyzed the risk, legal should draft the response" | request_handoff -- you are done, someone else takes over |
| "This is beyond my authority" | request_escalation -- vertical, not horizontal |
Governance
- Handoffs are logged with a full audit trail
- The target agent must exist in the same tenant
- Guards prevent self-handoff and handoff to agents in error state
- Authorization policies apply when enforcement mode is active
- Management chain is notified for visibility (non-blocking)
Secure Delegation with Token Exchange
When Agent A delegates a task to Agent B that requires tool access, MeetLoyd uses OAuth 2.0 Token Exchange (RFC 8693). Agent A proves its identity, exchanges credentials for a scoped access token targeting Agent B, and the token contains only the tools Agent A is allowed to delegate. This ensures agents can never delegate more permissions than they have, and every delegation is audited.
See Agent Identity for full details on the identity stack -- SPIFFE IDs, Badges, SVIDs, and token exchange.
Best Practices
Each agent should advertise specific, well-described skills. "Invoice Processing" with clear input/output modes is better than a vague "Does finance stuff."
For tasks that take time, use streaming updates so the requesting agent (and humans) can see progress.
Complex tasks need longer timeouts. A quick lookup might need 30 seconds; a full analysis might need 10 minutes.
Before sending a task, check that the target agent supports the required skill. This prevents runtime failures.
Next: Learn about SLIM Communication for cross-app and cross-org agent collaboration.