Skip to main content

Crate brainwires_a2a

Crate brainwires_a2a 

Source
Expand description

§brainwires-a2a

Agent-to-Agent (A2A) protocol implementation with JSON-RPC, REST, and gRPC bindings.

§Features

  • client — HTTP client for JSON-RPC and REST (reqwest)
  • server — HTTP server for JSON-RPC and REST (hyper)
  • native — Both client and server (default)
  • grpc — gRPC types (prost + tonic)
  • grpc-client — gRPC client transport
  • grpc-server — gRPC server service
  • full — Everything

Re-exports§

pub use agent_card::AgentCapabilities;
pub use agent_card::AgentCard;
pub use agent_card::AgentCardSignature;
pub use agent_card::AgentExtension;
pub use agent_card::AgentInterface;
pub use agent_card::AgentProvider;
pub use agent_card::AgentSkill;
pub use agent_card::ApiKeySecurityScheme;
pub use agent_card::AuthorizationCodeOAuthFlow;
pub use agent_card::ClientCredentialsOAuthFlow;
pub use agent_card::DeviceCodeOAuthFlow;
pub use agent_card::HttpAuthSecurityScheme;
pub use agent_card::ImplicitOAuthFlow;
pub use agent_card::MutualTlsSecurityScheme;
pub use agent_card::OAuth2SecurityScheme;
pub use agent_card::OAuthFlows;
pub use agent_card::OpenIdConnectSecurityScheme;
pub use agent_card::PasswordOAuthFlow;
pub use agent_card::SecurityRequirement;
pub use agent_card::SecurityScheme;
pub use error::A2aError;
pub use jsonrpc::JsonRpcRequest;
pub use jsonrpc::JsonRpcResponse;
pub use jsonrpc::RequestId;
pub use push_notification::AuthenticationInfo;
pub use push_notification::TaskPushNotificationConfig;
pub use streaming::SendMessageResponse;
pub use streaming::StreamResponse;
pub use streaming::TaskArtifactUpdateEvent;
pub use streaming::TaskStatusUpdateEvent;
pub use task::Task;
pub use task::TaskState;
pub use task::TaskStatus;
pub use types::Artifact;
pub use types::Message;
pub use types::Part;
pub use types::Role;
pub use client::A2aClient;
pub use client::Transport;
pub use server::A2aHandler;
pub use server::A2aServer;
pub use params::*;

Modules§

agent_card
Agent card and capability types. Agent card types: AgentCard, AgentCapabilities, AgentSkill, security schemes, OAuth flows.
client
A2A client with transport selection. A2A client — unified client with transport selection.
convert
Type conversions between serde and proto types. Conversions between hand-written serde types and proto-generated types.
error
Error types and JSON-RPC error codes. A2A error types and JSON-RPC error codes.
jsonrpc
JSON-RPC 2.0 envelopes and method constants. JSON-RPC 2.0 envelope types and method constants.
params
Typed request parameter structs. Typed request parameter structs for all A2A methods.
proto
Generated proto types (gRPC feature). Re-export generated proto types from tonic-build.
push_notification
Push notification configuration types. Push notification configuration types.
server
A2A server serving all protocol bindings. A2A server — serves JSON-RPC, REST, and optionally gRPC.
streaming
Streaming event types. Streaming event types for A2A.
task
Task lifecycle types: Task, TaskStatus, TaskState. Task lifecycle types: Task, TaskStatus, TaskState.
types
Core message types: Message, Part, Artifact, Role. Core A2A message types: Message, Part, Artifact, Role.