Crate acai

Source
Expand description

acai: Agent2Agent Communication API Implementation

A Rust implementation of the Agent2Agent (A2A) protocol, enabling standardized communication between various AI agents and clients.

This crate provides:

  • Type definitions for all A2A protocol messages and data structures
  • Serialization/deserialization support for JSON-RPC requests and responses
  • Validation of protocol constraints
  • HTTP client for making A2A requests
  • HTTP server for handling A2A requests (supporting both HTTP/1.1 and HTTP/2)
  • Structured logging via indicio

Re-exports§

pub use client::Client;
pub use client::ClientConfig;
pub use client::Error as ClientError;
pub use error::TaskError;
pub use error::UrlValidationError;
pub use error::to_client_error;
pub use error::to_json_rpc_error;
pub use error::to_server_error;
pub use error::to_task_error;
pub use error::validate_url;
pub use server::Error as ServerError;
pub use server::MethodRouter;
pub use server::RequestHandler;
pub use server::Server;
pub use server::ServerConfig;
pub use server::jwks::Claims;
pub use server::jwks::JwksError;
pub use server::jwks::JwksManager;

Modules§

client
A2A Protocol client implementation
error
server
A2A Protocol server implementation

Structs§

AgentAuthentication
Agent Authentication information
AgentCapabilities
Agent Capabilities
AgentCard
Agent Card
AgentProvider
Agent Provider
AgentSkill
Agent Skill
Artifact
Artifact
FileContent
File Content
FormField
Message Part
FormSchema
Form Schema
JsonRpcError
JSON-RPC Error
JsonRpcRequest
JSON-RPC Request
JsonRpcResponse
Generic response for any JSON-RPC method
Message
Message
PushNotificationConfig
Push Notification Configuration
ReqwestError
The Errors that may occur when processing a Request.
Task
Task
TaskArtifactUpdateEvent
Task Artifact Update Event
TaskIdParams
Task ID Parameters
TaskPushNotificationConfig
Task Push Notification Configuration
TaskQueryParams
Task Query Parameters
TaskSendParams
Task Send Parameters
TaskStatus
Task Status
TaskStatusUpdateEvent
Task Status Update Event
TokenData
The return type of a successful call to decode.

Enums§

MessageRole
Message Role
Part
StreamingResponseContent
A streaming response result content type.
TaskState
Task State
Value
Represents any valid JSON value.