/* AetherShell TUI A2A Protocol Demo
Launch with: ae tui
This demo showcases Agent-to-Agent (A2A) messaging protocol:
- Message bus creation
- Agent registration
- Direct messaging
- Broadcasting
- Task delegation
*/
/* Create the message bus (communication backbone) */
bus := a2a_create_bus {}
/* Register agents with capabilities */
a2a_register_agent bus "researcher" ["research", "analyze", "summarize"]
a2a_register_agent bus "writer" ["write", "edit", "format"]
a2a_register_agent bus "reviewer" ["review", "critique", "approve"]
a2a_register_agent bus "coordinator" ["coordinate", "delegate", "monitor"]
/* Direct message from coordinator to researcher */
a2a_send_message bus {
from: "coordinator",
to: "researcher",
type: "Task",
content: "Research the latest trends in AI agents"
}
/* Broadcast message to all agents */
a2a_send_message bus {
from: "coordinator",
to: "broadcast",
type: "Announcement",
content: "Project kickoff: We're building a technical guide"
}
/* Task delegation with capability matching */
a2a_send_message bus {
from: "coordinator",
to: "researcher",
type: "Delegate",
content: "Find 5 key papers on agent communication",
capabilities_required: ["research", "analyze"]
}
/* Response from researcher to coordinator */
a2a_send_message bus {
from: "researcher",
to: "coordinator",
type: "Response",
content: "Research complete. Found 5 relevant papers.",
in_reply_to: "task-001"
}
/* The TUI provides:
- Message bus visualization (nodes and connections)
- Real-time message flow animation
- Agent status indicators (idle, sending, receiving, processing)
- Message queue display per agent
- Capability registry view
- Message filtering and search
- Delivery confirmation tracking
- Network topology view
*/
print "TUI A2A Protocol Demo Ready! Launch with: ae tui"
print "Watch messages flow between agents in real-time!"