haiku.rag/examples
Yiorgis Gozadinos d9acdfba9d
prompt builder
2026-02-13 11:21:09 +02:00
..
docker Remove a2a examples, clean up 2026-01-19 16:53:40 +02:00
samples Use biome on the frontend for linting, add to CI 2026-01-16 15:03:41 +02:00
custom_agent.py prompt builder 2026-02-13 11:21:09 +02:00
custom_agent_agui.py prompt builder 2026-02-13 11:21:09 +02:00
README.md Agentic example with and without agui 2026-02-13 10:40:36 +02:00

haiku.rag Examples

This directory contains example scripts demonstrating various features of haiku.rag.

Docker Example

Directory: docker/

Complete Docker setup for running haiku.rag with all services:

  • File monitoring for automatic document indexing
  • MCP server for AI assistant integration

See docker/README.md for setup instructions.

Custom Agent

Script: custom_agent.py

Composes search, qa, and document toolsets into a pydantic-ai Agent using AgentDeps and prepare_context. Shows how to run queries and inspect accumulated state (citations, QA history).

uv run python examples/custom_agent.py /path/to/db.lancedb

Custom Agent with AG-UI Streaming

Script: custom_agent_agui.py

A Starlette app that serves an AG-UI streaming endpoint using composed toolsets, AgentDeps, and ToolContextCache for multi-session support.

DB_PATH=/path/to/db.lancedb uv run uvicorn examples.custom_agent_agui:app --reload --port 8000