Skip to content
Select themeDarkLightAuto
Documentation version0.5.0-alpha.1
Select languageEnglish
0.5.0-alpha.1 is superseded. Fresh dependency resolution can fail on Rust 1.85. Use the 1.0.0 guide.

Getting started

Connect an agent’s output to a user interface with AG-UI. This SDK lets an agent application (server) emit messages, tool calls and shared state, and an agent client turn that event stream into a conversation and a view.

This is the implementation guide for ag-ui-rust, an independent Rust SDK. See the official AG-UI documentation for protocol concepts and specifications.

This is the 0.5.0-alpha.1 prerelease guide for AG-UI 1.0. Install the exact alpha version using Crates and features. For the stable 0.4 API, use the 0.4.5 guide.

Your application Start with What you will build
Agent application (server) Connect an agent to AG-UI An Agent implementation and an HTTP streaming endpoint
Agent client Call an agent from Rust A server connection, conversation history and streamed output
Both Start the server, then connect the client One conversation between two Rust programs
  1. The client sends user input and conversation history.
  2. The server’s Agent::run calls application logic or a model.
  3. RunContext emits text, tool calls and state changes as AG-UI events.
  4. The client’s Thread applies events to messages and state, exposing each change as an Update.

Your application or agent framework implements model calls, tool execution, authentication, storage and workflow resumption. The SDK supplies protocol types, event production, transports and client state updates.

Application or framework AG-UI SDK
Model loop, executable tool registration and execution Carry tool names, arguments and results as protocol data
Graph routing, parallel tasks and subagent execution Report steps and child-agent output and status
Approval policy, storage and workflow resumption Carry interrupts and responses; snapshot a local conversation

Tool is data: a name, description and argument JSON Schema. It does not register a function. See Tool calls and results for connecting tools that already exist.

Use Rust 1.85 or newer. Enable the axum feature of ag-ui for the server, or http for an HTTP client. Each build guide includes its dependencies and runnable code.

Choose dependencies in Crates and features and read How AG-UI works for the relationship between requests, events and runs.

  • task-board: a server with state changes, tool calls and approvals.
  • board-watch: a Rust CLI client for that server.
  • review-desk: an example connected to a browser UI.