diff --git a/docs/agents.md b/docs/agents/index.md similarity index 95% rename from docs/agents.md rename to docs/agents/index.md index 5b3f47ac..4fa00b3f 100644 --- a/docs/agents.md +++ b/docs/agents/index.md @@ -7,7 +7,7 @@ Four agentic flows are provided by haiku.rag: - **Research Graph** — a multi-step research workflow with question decomposition - **RLM Agent** — complex analytical tasks via sandboxed Python code execution (see [RLM Agent](rlm.md)) -See [QA and Research Configuration](configuration/qa-research.md) for configuring model, iterations, concurrency, and other settings. +See [QA and Research Configuration](../configuration/qa-research.md) for configuring model, iterations, concurrency, and other settings. ## Simple QA Agent @@ -51,11 +51,11 @@ async with HaikuRAG(path_to_db) as client: ## Chat Agent -The chat agent enables multi-turn conversational RAG. It is built from composable [toolsets](tools.md) and maintains session state to improve follow-up answers. +The chat agent enables multi-turn conversational RAG. It is built from composable [toolsets](../tools.md) and maintains session state to improve follow-up answers. Key features: -- **Composable toolsets**: Built from reusable `FunctionToolset` factories — see [Toolsets](tools.md) +- **Composable toolsets**: Built from reusable `FunctionToolset` factories — see [Toolsets](../tools.md) - **Semantic prior answer recall**: Similar prior Q/A pairs are retrieved and passed to the research planner, which can skip searching when they suffice - **Background summarization**: After each `ask` call, the QA history is summarized into a compact session context for the next request - **Document filtering**: Session-level or per-query document filtering @@ -67,7 +67,7 @@ haiku-rag chat haiku-rag chat --db /path/to/database.lancedb ``` -See [Applications](apps.md#chat-tui) for the full TUI interface guide. +See [Applications](../apps.md#chat-tui) for the full TUI interface guide. ### Python Usage @@ -123,7 +123,7 @@ Available features: | QA | `FEATURE_QA` | `ask` | | Analysis | `FEATURE_ANALYSIS` | `analyze` | -The system prompt is automatically composed to match the selected features. See [Toolsets](tools.md) for details on each toolset's parameters and behavior. +The system prompt is automatically composed to match the selected features. See [Toolsets](../tools.md) for details on each toolset's parameters and behavior. ### Session State @@ -309,4 +309,4 @@ state.search_filter = "id IN ('doc-123', 'doc-456')" report = await graph.run(state=state, deps=deps) ``` -The filter applies to all search operations in the graph. See [Filtering Search Results](python.md#filtering-search-results) for available filter columns and syntax. +The filter applies to all search operations in the graph. See [Filtering Search Results](../python.md#filtering-search-results) for available filter columns and syntax. diff --git a/docs/rlm.md b/docs/agents/rlm.md similarity index 100% rename from docs/rlm.md rename to docs/agents/rlm.md diff --git a/docs/cli.md b/docs/cli.md index 968d2b7d..853ec828 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -282,7 +282,7 @@ Flags: - `--filter` / `-f`: SQL WHERE clause to restrict document access - `--document` / `-d`: Pre-load a document by title or ID (can repeat) -See [RLM Agent](rlm.md) for details on capabilities and configuration. +See [RLM Agent](agents/rlm.md) for details on capabilities and configuration. ## Server diff --git a/docs/configuration/qa-research.md b/docs/configuration/qa-research.md index 7a0e9fc5..0fee4bb3 100644 --- a/docs/configuration/qa-research.md +++ b/docs/configuration/qa-research.md @@ -79,4 +79,4 @@ rlm: - **code_timeout**: Maximum seconds for each code execution (default: 60) - **max_output_chars**: Truncate code output after this many characters (default: 50000) -See [RLM Agent](../rlm.md) for usage details. +See [RLM Agent](../agents/rlm.md) for usage details. diff --git a/docs/index.md b/docs/index.md index 1de71954..3f5d7d80 100644 --- a/docs/index.md +++ b/docs/index.md @@ -64,8 +64,8 @@ haiku-rag chat # Interactive conversation mode - [CLI](cli.md) - Command line interface usage - [Python](python.md) - Python API reference - [Custom Pipelines](custom-pipelines.md) - Build custom processing workflows -- [Agents](agents.md) - QA, chat, and research agents -- [RLM Agent](rlm.md) - Complex analytical tasks via code execution +- [Agents](agents/index.md) - QA, chat, and research agents +- [RLM Agent](agents/rlm.md) - Complex analytical tasks via code execution - [Applications](apps.md) - Chat TUI, web app, and inspector - [Server](server.md) - File monitoring and server mode - [MCP](mcp.md) - Model Context Protocol integration diff --git a/docs/python.md b/docs/python.md index a047b8e1..bbd58cdd 100644 --- a/docs/python.md +++ b/docs/python.md @@ -398,7 +398,7 @@ The QA agent searches your documents for relevant information and uses the confi The QA provider and model are configured in `haiku.rag.yaml` or can be passed directly to the client (see [Configuration](configuration/index.md)). -See also: [Agents](agents.md) for details on the QA agent and the multi‑agent research workflow. +See also: [Agents](agents/index.md) for details on the QA agent and the multi‑agent research workflow. ## RLM (Recursive Language Model) @@ -425,7 +425,7 @@ result = await client.rlm( The RLM agent writes and executes Python code in a sandboxed environment to solve problems that traditional RAG struggles with: aggregation, computation, and multi-document analysis. -See [RLM Agent](rlm.md) for details on capabilities and configuration. +See [RLM Agent](agents/rlm.md) for details on capabilities and configuration. ## Building Custom Agents diff --git a/docs/tools.md b/docs/tools.md index dfd5b18d..fc6d0ec8 100644 --- a/docs/tools.md +++ b/docs/tools.md @@ -177,7 +177,7 @@ analysis = create_analysis_toolset(client, config, context=context) **Tool: `analyze(task, document_name?)`** -Executes a computational task via code execution and returns an `AnalysisResult`. Requires Docker — see [RLM Agent](rlm.md) for setup. +Executes a computational task via code execution and returns an `AnalysisResult`. Requires Docker — see [RLM Agent](agents/rlm.md) for setup. ## Composing Custom Agents diff --git a/docs/tutorial.md b/docs/tutorial.md index c84312a8..effd733a 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -206,6 +206,6 @@ The following people are presenting talks at PyCon Finland 2025: - **[Chat](apps.md#chat-tui)** - Interactive conversations with `haiku-rag chat` - **[CLI Reference](cli.md)** - All available commands and options - **[Python API](python.md)** - Use haiku.rag in your Python applications -- **[Agents](agents.md)** - Deep QA and multi-agent research workflows +- **[Agents](agents/index.md)** - Deep QA and multi-agent research workflows - **[Configuration](configuration/index.md)** - Complete YAML configuration reference - **[Server Mode](server.md)** - File monitoring and MCP server diff --git a/mkdocs.yml b/mkdocs.yml index b5497574..ba20c134 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -71,9 +71,10 @@ nav: - Python: python.md - Custom Pipelines: custom-pipelines.md - Tuning: tuning.md - - Agents: agents.md + - Agents: + - agents/index.md + - RLM Agent: agents/rlm.md - Toolsets: tools.md - - RLM Agent: rlm.md - Applications: apps.md - Server: server.md - Remote processing: remote-processing.md