A2A Protocol
Agent-to-Agent communication protocol
A2A (Agent-to-Agent) enables standardized communication between agents.
Quick Start
- Create an Agent with A2A Card
rust use praisonai::{Agent, A2A, A2AAgentCard}; // First create your agent let agent = Agent::new() .name("Support Agent") .instructions("Help users with support questions") .build()?; // Create A2A card for discovery let card = A2AAgentCard::new() .name("Support Agent") .description("Handles customer support") .url("http://localhost:8080"); // Start A2A server let a2a = A2A::new() .card(card) .build()?; - Connect to Remote Agent
rust use praisonai::A2A; // Connect to another agent let remote = A2A::connect("http://agent-b:8080").await?; // Send a task let task = remote.create_task("Summarize this document").await?; let result = remote.get_task_result(&task.id).await?;
A2A Components
| Component | Description |
|---|---|
A2AAgentCard | Agent’s public identity and capabilities |
A2ATask | Work unit sent between agents |
A2A | Protocol handler for communication |