a2a_rust/lib.rs
1//! Rust SDK for the A2A Protocol v1.0.
2//!
3//! This crate provides a protocol-accurate type layer plus optional server and
4//! client implementations behind feature flags.
5
6/// HTTP client for discovering and calling remote A2A agents.
7#[cfg(feature = "client")]
8pub mod client;
9/// Transport-neutral error type shared across the crate.
10pub mod error;
11/// JSON-RPC 2.0 envelope types and A2A method/code constants.
12pub mod jsonrpc;
13/// Axum-based server framework for exposing an A2A agent.
14#[cfg(feature = "server")]
15pub mod server;
16/// Task persistence traits and the in-memory store implementation.
17#[cfg(feature = "server")]
18pub mod store;
19/// Protocol request, response, and resource types.
20pub mod types;
21
22#[cfg(feature = "client")]
23pub use crate::client::{
24 A2AClient, A2AClientConfig, A2AClientStream, AgentCardDiscovery, AgentCardDiscoveryConfig,
25};
26pub use crate::error::A2AError;
27#[cfg(feature = "server")]
28pub use crate::store::{InMemoryTaskStore, TaskStore};
29pub use crate::types::*;