pub fn build_router(state: AppState) -> RouterExpand description
Build the axum Router with all API routes.
Routes:
GET /health— returns"ok"(200)GET /tools— returns JSON array ofToolInfoPOST /run— runs the agent with a goal and returns the outcomePOST /sessions— create a new sessionGET /sessions— list all sessionsGET /sessions/:id— get session detail with messagesPOST /sessions/:id/messages— send a message in a sessionDELETE /sessions/:id— remove a sessionGET /sessions/:id/events— SSE stream of agent events for a sessionGET /openapi.json— returns the OpenAPI 3.0.3 specification
Auth is sourced from the RECURSIVE_HTTP_AUTH_KEYS env var. For tests
that need a deterministic auth state (no env-var races across parallel
test threads), use build_router_with_auth instead.