Expand description
Durable A2A v1.0 protocol layer for klieo agents.
Implements the Agent-to-Agent (A2A) v1.0 specification
wire types, JSON-RPC envelope, and a server-side dispatcher atop
klieo_core::Pubsub + klieo_core::KvStore.
§Why durable A2A?
Today A2A runs over HTTP/JSON-RPC + WebSocket. Klieo’s angle:
implement the same wire shape over NATS JetStream + KV +
JobQueue. Inter-agent calls inherit the durability, leasing,
dedup, and DLQ semantics of klieo_core::JobQueue — A2A but
work-doesn’t-get-stuck.
Wire-compatible at the JSON-RPC envelope level: a payload
produced by adk-python deserialises into our SendMessageParams
cleanly. Only the transport differs.
§Architecture asymmetry
server::A2aServer takes Arc<dyn Pubsub> (not
Arc<dyn RequestReply>) because klieo-core’s
klieo_core::RequestReply trait is client-side only. The
server listens on <app_prefix>.a2a.<agent_id>.rpc via
klieo_core::Pubsub::subscribe and replies by publishing on a
per-request reply subject extracted from message headers. A typed
server-side trait would tighten the API; deferred until a second
protocol-server consumer exists.
Re-exports§
pub use auth::RequestContext;pub use client::A2aClient;pub use conformance::run_conformance_suite;pub use conformance::CaseStatus;pub use conformance::ConformanceCase;pub use conformance::ConformanceReport;pub use envelope::codes;pub use envelope::A2aHeaders;pub use envelope::A2aMethod;pub use envelope::JsonRpcError;pub use envelope::JsonRpcRequest;pub use envelope::JsonRpcResponse;pub use error::A2aBuilderError;pub use error::A2aError;pub use handler::A2aHandler;pub use handler::EchoHandler;pub use server::A2aDispatcher;pub use server::A2aDispatcherBuilder;pub use server::A2aServer;pub use server::TaskEvent;pub use server::TaskEventSink;pub use server::TaskEventStream;pub use server::LEADER_TTL;pub use task_store::A2aTaskStore;pub use types::AgentCapabilities;pub use types::AgentCard;pub use types::AgentCardSignature;pub use types::AgentInterface;pub use types::AgentProvider;pub use types::AgentSkill;pub use types::Artifact;pub use types::CancelTaskParams;pub use types::DeletePushNotificationConfigParams;pub use types::GetExtendedAgentCardParams;pub use types::GetPushNotificationConfigParams;pub use types::GetTaskParams;pub use types::ListPushNotificationConfigsParams;pub use types::ListPushNotificationConfigsResult;pub use types::ListTasksParams;pub use types::ListTasksResult;pub use types::Message;pub use types::Part;pub use types::PushNotificationConfig;pub use types::PushNotificationConfigParams;pub use types::Role;pub use types::SendMessageParams;pub use types::SendMessageResult;pub use types::SubscribeToTaskParams;pub use types::Task;pub use types::TaskStatus;
Modules§
- auth
- A2A-specific request-context bag.
- client
- Typed client for calling an A2A agent over
klieo_core::Pubsub. - conformance
- A2A v1.0 conformance suite.
- envelope
- JSON-RPC 2.0 envelope + A2A method enum + standard A2A headers.
- error
- A2A error type with JSON-RPC code mapping.
- handler
A2aHandlertrait +EchoHandlertest fixture.- http
- HTTP/SSE transport for
A2aDispatcher. Streamable HTTP shape per A2A v1.0 §9.4.2: singlePOST /a2a; server picks JSON vs SSE response based on JSON-RPC method. - server
A2aServer— listens on a NATS-style request/reply subject and dispatches incoming JSON-RPC payloads to anA2aHandler.- task_
store A2aTaskStore— durable Task persistence overklieo_core::KvStore.- types
- A2A v1.0 wire types —
Part,Message,Artifact,Task,AgentCard.