routes.examples
Routes for AG-UI example agents.
Exposes example agents demonstrating AG-UI protocol features:
- /examples/agentic_chat - Basic chat with tools
- /examples/human_in_the_loop - Approval workflows
- /examples/tool_based_generative_ui - Frontend render tools
- /examples/shared_state - Bidirectional state sync
- /examples/agentic_generative_ui - Plan-based UI generation
- /examples/backend_tool_rendering - Backend tools with UI rendering
- /examples/haiku_generative_ui - Haiku generation with UI rendering
get_example_mounts
def get_example_mounts(api_prefix: str = "/api/v1") -> list[Mount]
Get all example app mounts for the FastAPI app.
Arguments:
api_prefix- The API prefix to use for mounting.
Returns:
List of Starlette Mount objects for each example.
list_examples
@router.get("/")
async def list_examples() -> dict[str, Any]
List available AG-UI example agents.
Returns:
Dictionary with information about each example.
get_example_info
@router.get("/{example_id}")
async def get_example_info(example_id: str) -> dict[str, Any]
Get information about a specific example.
Arguments:
example_id- The example identifier.
Returns:
Information about the example.