Skip to content
Select themeDarkLightAuto
Documentation version0.4.5
Select languageEnglish

Crates and features

ag-ui provides AG-UI protocol types and server/client APIs. Enable features for the role you are building. ag-ui-a2ui handles the separate A2UI protocol.

Your application Dependency and features Main components
HTTP agent server ag-ui, features = ["axum"] Agent, RunContext, RouterExt
HTTP agent client ag-ui, features = ["http"] HttpAgent, Thread, Update
Server without HTTP ag-ui, features = ["server"] run, Runner, event stream
Client with a custom transport ag-ui, features = ["client"] Thread, Transport
Server calling another agent ag-ui, features = ["axum", "http"] Both server and client components
A2UI surface authoring or validation ag-ui-a2ui Choose features in the A2UI guide

axum includes server and sse; http includes client and sse. Protocol types such as Message, Tool, Event and RunAgentInput live at the crate root.

This project uses ag-ui and ag-ui-a2ui. The crates.io names ag-ui-core, ag-ui-server and ag-ui-client belong to a separate community SDK.

Pin both packages to this stable guide’s version when using A2UI with AG-UI:

[dependencies]
ag-ui = { version = "=0.4.5", features = ["http"] }
ag-ui-a2ui = "=0.4.5"

For a server, select axum in place of http. Add ag-ui-a2ui only when your application uses A2UI.

Build a server and Build a client include the relevant Cargo.toml and runnable code. Separate programs only need their own dependencies.

The server and client APIs separate transport from execution. axum connects a Tokio HTTP server; http connects a reqwest HTTP client. With client alone, you supply the transport.

Cargo unifies features requested for the same dependency. A dependency graph that requests both server and client builds both sets of APIs.

See Feature flags for the full list and Platforms and MSRV for supported environments.