Skip to main content

Module router

Module router 

Source
Expand description

Mounting an agent on a router.

use ag_ui::axum::RouterExt;
use axum::Router;
use axum::routing::get;

let app: Router = Router::new()
    .route("/health", get(|| async { "ok" }))
    .route_agui("/agent", CartAgent);

Structs§

AgentEndpoint
An agent plus the per-run settings it is served with.

Traits§

RouterExt
Mounts AG-UI agents on an [axum::Router].