Expand description
Agent2Agent (A2A) Protocol support for VT Code
This module implements the A2A Protocol, an open standard enabling communication and interoperability between AI agents.
§Features
- Agent Discovery: Via Agent Cards at
/.well-known/agent-card.json - Task Lifecycle Management: States like
submitted,working,completed - Real-time Streaming: Via Server-Sent Events (SSE)
- Rich Content Types: Text, file, and structured data parts
§Usage
ⓘ
use vtcode_core::a2a::{AgentCard, TaskManager, Message, Part};
// Create an agent card
let card = AgentCard::new("vtcode-agent", "VT Code AI Agent", "1.0.0");
// Create a task manager
let manager = TaskManager::new();
let task = manager.create_task(None).await;Re-exports§
pub use agent_card::AgentCapabilities;pub use agent_card::AgentCard;pub use agent_card::AgentProvider;pub use agent_card::AgentSkill;pub use client::A2aClient;pub use errors::A2aError;pub use errors::A2aErrorCode;pub use errors::A2aResult;pub use rpc::JsonRpcError;pub use rpc::JsonRpcRequest;pub use rpc::JsonRpcResponse;pub use rpc::SendStreamingMessageResponse;pub use rpc::StreamingEvent;pub use rpc::TaskPushNotificationConfig;pub use task_manager::TaskManager;pub use types::Artifact;pub use types::FileContent;pub use types::Message;pub use types::MessageRole;pub use types::Part;pub use types::Task;pub use types::TaskState;pub use types::TaskStatus;pub use webhook::WebhookError;pub use webhook::WebhookNotifier;
Modules§
- agent_
card - Agent Card for A2A Protocol
- cli
- A2A Protocol CLI commands
- client
- A2A client for interacting with remote A2A agents. Provides helper methods for discovery, task operations, and streaming.
- errors
- A2A Protocol error types and error codes
- rpc
- JSON-RPC 2.0 structures for A2A Protocol
- server
- A2A HTTP Server using axum
- task_
manager - A2A Task Manager
- types
- A2A Protocol core data types
- webhook
- Webhook delivery for A2A push notifications