1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! # A2A Protocol Client
//!
//! This crate provides a client for calling remote A2A (Agent-to-Agent) protocol compliant agents.
//! It supports both streaming and non-streaming interactions over HTTP/HTTPS.
//!
//! ## Features
//!
//! - A2A v1 transport support over HTTP+JSON and JSON-RPC 2.0
//! - Non-streaming and streaming message support
//! - Task retrieval and listing
//! - Agent discovery via agent cards
//! - Authentication support (Bearer tokens)
//! - Error handling with detailed error types
//!
//! ## Example
//!
//! ```rust,no_run
//! use a2a_client::A2AClient;
//! use a2a_types::{Message, Part, Role, SendMessageRequest, part};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! // Create client from agent card URL
//! let client = A2AClient::from_card_url("https://agent.example.com")
//! .await?
//! .with_auth_token("your_api_key");
//!
//! // Create message
//! let message = Message {
//! message_id: "msg_123".to_string(),
//! context_id: String::new(),
//! task_id: String::new(),
//! role: Role::User.into(),
//! parts: vec![Part {
//! content: Some(part::Content::Text("Hello!".to_string())),
//! metadata: None,
//! filename: String::new(),
//! media_type: "text/plain".to_string(),
//! }],
//! metadata: None,
//! extensions: Vec::new(),
//! reference_task_ids: Vec::new(),
//! };
//!
//! // Send message
//! let result = client
//! .send_message(SendMessageRequest {
//! tenant: String::new(),
//! message: Some(message),
//! configuration: None,
//! metadata: None,
//! })
//! .await?;
//! # let _ = result;
//! # Ok(())
//! # }
//! ```
pub use A2AClient;
pub use ;
/// Re-export A2A protocol types so downstream crates can ensure they use the
/// exact same type definitions as the client.