add_document_from_file, add_document_from_url, add_document_from_text and delete_document are gone. create_mcp_server and _covering lose read_only; the client always opens with read_only=True, so the --read-only flag before `mcp` is redundant and the docs, Dockerfiles and compose example drop it. Ingestion is `haiku-rag add`/`add-src`/`delete` and haiku-ingester. No known consumer used the write tools; one stdio server per client window made multi-writer the accidental default, and streamable HTTP has no auth. The test_app stub drops a comment and __init__ that described run_mcp constructing the client positionally; every path goes through _covering. Refs #599 |
||
|---|---|---|
| .. | ||
| docker | ||
| samples | ||
| custom_agent.py | ||
| custom_agent_agui.py | ||
| README.md | ||
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:
- Continuous ingestion from a watched directory via
haiku-ingester - MCP server for AI assistant integration
See docker/README.md for setup instructions.
Custom Agent
Script: custom_agent.py
Uses the eagerly loaded RAG capability to build a conversational agent.
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 adapts a native RAG-capable agent to AG-UI. The configuration places the database (HAIKU_RAG_CONFIG_PATH, or ./haiku.rag.yaml):
uv run uvicorn examples.custom_agent_agui:app --reload --port 8000