haiku.rag/examples/ag-ui-research/backend
2025-11-25 12:28:43 +02:00
..
.gitignore Basic skeleton for running an ag-ui demo using starlette and nextjs 2025-10-17 12:43:27 +03:00
agent.py Add support for per-model configuration settings including thinking, temperature and max_tokens 2025-11-25 12:14:24 +02:00
Dockerfile Update ag-ui-research example with haiku.rag-slim image 2025-11-17 14:42:14 +02:00
main.py Rename model to name under model 2025-11-25 12:28:43 +02:00
pyproject.toml Update and lock pydantic-ai-slim 2025-11-14 11:26:09 +02:00
README.md Refactor ag-ui-research. Drop human-in-the-loop, use MemoryObjectSendStream to merge the graph and agent streams together 2025-11-13 13:22:53 +02:00
uv.lock Refactor ag-ui-research. Drop human-in-the-loop, use MemoryObjectSendStream to merge the graph and agent streams together 2025-11-13 13:22:53 +02:00

Haiku.rag Research Assistant Backend

Starlette backend for the haiku.rag interactive research assistant, using the research graph with AG-UI protocol support.

Setup

uv sync
uv run python main.py

The server starts on http://localhost:8000 and uses haiku.rag configuration.

Architecture

The backend uses create_agui_server() from haiku.rag.graph.agui.server which provides:

  • Research graph execution: Multi-iteration research workflow with insight/gap tracking
  • AG-UI protocol: Server-Sent Events (SSE) streaming for real-time state updates
  • Delta state updates: Efficient incremental state synchronization using JSON Patch operations
  • Both research and deep_qa endpoints: /agent/research and /agent/deep_qa

Endpoints

  • GET /health - Health check with configuration info
  • POST /agent/research/stream - Research graph streaming endpoint (AG-UI protocol)
  • POST /agent/deep_qa/stream - Deep QA graph streaming endpoint (AG-UI protocol)