<< All versions
Skill v1.0.0
currentLLM-judged scan90/100headyai/heady-staging/heady-a2a-protocol
──Details
PublishedOctober 21, 2026 at 07:26 PM
Content Hashsha256:73e384a5e7393600...
Git SHA117a1bf478aa
──Files
Files (1 file, 3.1 KB)
SKILL.md3.1 KBactive
SKILL.md · 98 lines · 3.1 KB
version: "1.0.0" name: heady-a2a-protocol description: Use when implementing Agent-to-Agent (A2A) or Agent-to-UI (A2UI) communication protocols, inter-agent messaging, agent handoffs, or UI integration patterns in the Heady™ ecosystem. Keywords include A2A, A2UI, agent protocol, inter-agent, messaging, handoff, agent communication, protocol, and agent-to-agent. metadata: author: HeadySystems version: '1.0'
Heady™ A2A & A2UI Protocols
When to Use This Skill
Use this skill when the user needs to:
- Implement agent-to-agent communication
- Set up agent-to-UI message passing
- Design inter-agent handoff protocols
- Debug message routing between agents
- Integrate agents with frontend micro-frontends
Module Map
| Module | Path | Role | |
|---|---|---|---|
| a2a | src/protocols/a2a.js | Agent-to-Agent messaging protocol | |
| a2ui | src/protocols/a2ui.js | Agent-to-UI communication bridge |
Instructions
A2A Protocol (Agent-to-Agent)
- Messages use JSON-RPC 2.0 format with Heady™ extensions.
- Each agent has a unique agent_id and capability manifest.
- Discovery: Agents register capabilities in the agent registry.
- Routing: Messages route through the Conductor based on capability matching.
- Handoff: Structured context transfer using context capsules.
Message Format
json
{"jsonrpc": "2.0","method": "agent.execute","params": {"from_agent": "brain-bee-001","to_agent": "memory-bee-003","task": {"type": "memory.store","payload": { "key": "conversation_context", "value": "..." },"priority": 1.618,"deadline_ms": 2618},"context_capsule": {"working_memory": "...","session_context": "...","relevance_score": 0.891}},"id": "msg-uuid-here"}
Handoff Protocol
- Source agent serializes context capsule.
- Conductor validates target agent capability.
- Context capsule transferred with phi-weighted priority.
- Target agent acknowledges receipt and begins execution.
- Source agent receives completion notification.
A2UI Protocol (Agent-to-UI)
- Uses Server-Sent Events (SSE) for agent -> UI streaming.
- Uses WebSocket for bidirectional UI <-> agent communication.
- UI events map to agent actions through the action registry.
- Streaming tokens use SSE with chunked transfer encoding.
- UI state sync uses optimistic updates with reconciliation.
Event Types
| Event | Direction | Purpose | |
|---|---|---|---|
| agent.thinking | Agent -> UI | Show reasoning progress | |
| agent.response | Agent -> UI | Stream response tokens | |
| agent.tool_call | Agent -> UI | Display tool execution | |
| user.input | UI -> Agent | User message/action | |
| user.interrupt | UI -> Agent | Cancel current operation | |
| state.sync | Bidirectional | Synchronize shared state |
Security
- All A2A messages signed with agent keypair.
- A2UI messages authenticated via session token.
- Rate limiting per agent pair (phi-scaled: 89, 144, 233 msg/s).
- Context capsules encrypted in transit.
Output Format
- Protocol Configuration
- Message Flow Diagram
- Agent Capability Manifest
- Handoff Sequence
- Security Verification