haiku.rag 0.7.5__tar.gz → 0.19.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. haiku_rag-0.19.4/.dockerignore +66 -0
  2. haiku_rag-0.19.4/.gitignore +31 -0
  3. {haiku_rag-0.7.5 → haiku_rag-0.19.4}/.pre-commit-config.yaml +2 -12
  4. haiku_rag-0.19.4/.python-version +1 -0
  5. haiku_rag-0.19.4/CHANGELOG.md +377 -0
  6. haiku_rag-0.19.4/PKG-INFO +196 -0
  7. haiku_rag-0.19.4/README.md +172 -0
  8. {haiku_rag-0.7.5 → haiku_rag-0.19.4}/mkdocs.yml +16 -3
  9. {haiku_rag-0.7.5 → haiku_rag-0.19.4}/pyproject.toml +48 -29
  10. haiku_rag-0.19.4/scripts/build-docker-images.sh +38 -0
  11. haiku_rag-0.19.4/scripts/bump_version.py +155 -0
  12. haiku_rag-0.19.4/server.json +42 -0
  13. haiku_rag-0.19.4/uv.lock +5509 -0
  14. haiku_rag-0.7.5/.github/FUNDING.yml +0 -3
  15. haiku_rag-0.7.5/.github/workflows/build-docs.yml +0 -28
  16. haiku_rag-0.7.5/.github/workflows/build-publish.yml +0 -18
  17. haiku_rag-0.7.5/.gitignore +0 -20
  18. haiku_rag-0.7.5/.python-version +0 -1
  19. haiku_rag-0.7.5/PKG-INFO +0 -131
  20. haiku_rag-0.7.5/README.md +0 -93
  21. haiku_rag-0.7.5/docs/benchmarks.md +0 -36
  22. haiku_rag-0.7.5/docs/cli.md +0 -142
  23. haiku_rag-0.7.5/docs/configuration.md +0 -225
  24. haiku_rag-0.7.5/docs/index.md +0 -62
  25. haiku_rag-0.7.5/docs/installation.md +0 -74
  26. haiku_rag-0.7.5/docs/mcp.md +0 -33
  27. haiku_rag-0.7.5/docs/python.md +0 -188
  28. haiku_rag-0.7.5/docs/server.md +0 -42
  29. haiku_rag-0.7.5/src/haiku/rag/__init__.py +0 -0
  30. haiku_rag-0.7.5/src/haiku/rag/app.py +0 -183
  31. haiku_rag-0.7.5/src/haiku/rag/chunker.py +0 -51
  32. haiku_rag-0.7.5/src/haiku/rag/cli.py +0 -311
  33. haiku_rag-0.7.5/src/haiku/rag/client.py +0 -555
  34. haiku_rag-0.7.5/src/haiku/rag/config.py +0 -67
  35. haiku_rag-0.7.5/src/haiku/rag/embeddings/__init__.py +0 -30
  36. haiku_rag-0.7.5/src/haiku/rag/embeddings/base.py +0 -15
  37. haiku_rag-0.7.5/src/haiku/rag/embeddings/ollama.py +0 -17
  38. haiku_rag-0.7.5/src/haiku/rag/embeddings/openai.py +0 -16
  39. haiku_rag-0.7.5/src/haiku/rag/embeddings/vllm.py +0 -19
  40. haiku_rag-0.7.5/src/haiku/rag/embeddings/voyageai.py +0 -17
  41. haiku_rag-0.7.5/src/haiku/rag/logging.py +0 -53
  42. haiku_rag-0.7.5/src/haiku/rag/mcp.py +0 -144
  43. haiku_rag-0.7.5/src/haiku/rag/migration.py +0 -316
  44. haiku_rag-0.7.5/src/haiku/rag/monitor.py +0 -73
  45. haiku_rag-0.7.5/src/haiku/rag/qa/__init__.py +0 -15
  46. haiku_rag-0.7.5/src/haiku/rag/qa/agent.py +0 -84
  47. haiku_rag-0.7.5/src/haiku/rag/qa/prompts.py +0 -60
  48. haiku_rag-0.7.5/src/haiku/rag/reader.py +0 -115
  49. haiku_rag-0.7.5/src/haiku/rag/reranking/__init__.py +0 -34
  50. haiku_rag-0.7.5/src/haiku/rag/reranking/base.py +0 -13
  51. haiku_rag-0.7.5/src/haiku/rag/reranking/cohere.py +0 -34
  52. haiku_rag-0.7.5/src/haiku/rag/reranking/mxbai.py +0 -28
  53. haiku_rag-0.7.5/src/haiku/rag/reranking/vllm.py +0 -44
  54. haiku_rag-0.7.5/src/haiku/rag/store/__init__.py +0 -4
  55. haiku_rag-0.7.5/src/haiku/rag/store/engine.py +0 -203
  56. haiku_rag-0.7.5/src/haiku/rag/store/models/__init__.py +0 -4
  57. haiku_rag-0.7.5/src/haiku/rag/store/models/chunk.py +0 -15
  58. haiku_rag-0.7.5/src/haiku/rag/store/models/document.py +0 -16
  59. haiku_rag-0.7.5/src/haiku/rag/store/repositories/__init__.py +0 -9
  60. haiku_rag-0.7.5/src/haiku/rag/store/repositories/chunk.py +0 -375
  61. haiku_rag-0.7.5/src/haiku/rag/store/repositories/document.py +0 -214
  62. haiku_rag-0.7.5/src/haiku/rag/store/repositories/settings.py +0 -143
  63. haiku_rag-0.7.5/src/haiku/rag/store/upgrades/__init__.py +0 -1
  64. haiku_rag-0.7.5/src/haiku/rag/utils.py +0 -108
  65. haiku_rag-0.7.5/tests/__init__.py +0 -0
  66. haiku_rag-0.7.5/tests/conftest.py +0 -26
  67. haiku_rag-0.7.5/tests/generate_benchmark_db.py +0 -166
  68. haiku_rag-0.7.5/tests/llm_judge.py +0 -76
  69. haiku_rag-0.7.5/tests/test_app.py +0 -241
  70. haiku_rag-0.7.5/tests/test_chunk.py +0 -197
  71. haiku_rag-0.7.5/tests/test_chunker.py +0 -39
  72. haiku_rag-0.7.5/tests/test_cli.py +0 -157
  73. haiku_rag-0.7.5/tests/test_client.py +0 -752
  74. haiku_rag-0.7.5/tests/test_document.py +0 -108
  75. haiku_rag-0.7.5/tests/test_embedder.py +0 -171
  76. haiku_rag-0.7.5/tests/test_lancedb_connection.py +0 -86
  77. haiku_rag-0.7.5/tests/test_monitor.py +0 -93
  78. haiku_rag-0.7.5/tests/test_qa.py +0 -106
  79. haiku_rag-0.7.5/tests/test_reader.py +0 -23
  80. haiku_rag-0.7.5/tests/test_rebuild.py +0 -49
  81. haiku_rag-0.7.5/tests/test_reranker.py +0 -89
  82. haiku_rag-0.7.5/tests/test_search.py +0 -176
  83. haiku_rag-0.7.5/tests/test_settings.py +0 -84
  84. haiku_rag-0.7.5/tests/test_utils.py +0 -115
  85. haiku_rag-0.7.5/uv.lock +0 -3830
  86. {haiku_rag-0.7.5 → haiku_rag-0.19.4}/LICENSE +0 -0
@@ -0,0 +1,66 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ *.egg-info/
20
+ .installed.cfg
21
+ *.egg
22
+
23
+ # Virtual environments (uv best practice)
24
+ .venv/
25
+ venv/
26
+ env/
27
+
28
+ # Node.js
29
+ node_modules/
30
+ .next/
31
+ npm-debug.log*
32
+ yarn-debug.log*
33
+ yarn-error.log*
34
+
35
+ # Data
36
+ *.lancedb/
37
+ data/
38
+
39
+ # Docs
40
+ mkdocs.yml
41
+ docs/
42
+
43
+ # IDE
44
+ .vscode/
45
+ .idea/
46
+ *.swp
47
+ *.swo
48
+ *~
49
+
50
+ # OS
51
+ .DS_Store
52
+ Thumbs.db
53
+
54
+ # Git
55
+ .git/
56
+ .gitignore
57
+
58
+ # Development
59
+ tests/
60
+ .pytest_cache/
61
+ .coverage
62
+ htmlcov/
63
+ evaluations/evaluations/data/
64
+ server.json
65
+ # Examples
66
+ examples/
@@ -0,0 +1,31 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ # tests
13
+ .coverage*
14
+ evaluations/evaluations/data/
15
+ tests/data/
16
+ .pytest_cache/
17
+ .ruff_cache/
18
+
19
+ # environment variables and config files
20
+ .env
21
+ haiku.rag.yaml
22
+ TODO.md
23
+ PLAN.md
24
+ DEVNOTES.md
25
+
26
+ # mcp registry
27
+ .mcpregistry_github_token
28
+ .mcpregistry_registry_token
29
+
30
+ # MkDocs site directory when doing local docs builds
31
+ site/
@@ -9,7 +9,7 @@ repos:
9
9
  - id: debug-statements
10
10
  - repo: https://github.com/astral-sh/ruff-pre-commit
11
11
  # Ruff version.
12
- rev: v0.11.4
12
+ rev: v0.14.3
13
13
  hooks:
14
14
  # Run the linter.
15
15
  - id: ruff
@@ -17,16 +17,6 @@ repos:
17
17
  - id: ruff-format
18
18
 
19
19
  - repo: https://github.com/RobertCraigie/pyright-python
20
- rev: v1.1.399
20
+ rev: v1.1.407
21
21
  hooks:
22
22
  - id: pyright
23
-
24
- # - repo: https://github.com/RodrigoGonzalez/check-mkdocs
25
- # rev: v1.2.0
26
- # hooks:
27
- # - id: check-mkdocs
28
- # name: check-mkdocs
29
- # args: ["--config", "mkdocs.yml"] # Optional, mkdocs.yml is the default
30
- # # If you have additional plugins or libraries that are not included in
31
- # # check-mkdocs, add them here
32
- # additional_dependencies: ["mkdocs-material"]
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,377 @@
1
+ # Changelog
2
+ ## [Unreleased]
3
+
4
+ ## [0.19.4] - 2025-11-28
5
+
6
+ ### Added
7
+
8
+ - **Rebuild Modes**: New options for `rebuild` command to control what gets rebuilt
9
+ - `--embed-only`: Only regenerate embeddings, keeping existing chunks (fastest option when changing embedding model)
10
+ - `--rechunk`: Re-chunk from existing document content without accessing source files
11
+ - Default (no flag): Full rebuild with source file re-conversion
12
+ - Python API: `rebuild_database(mode=RebuildMode.EMBED_ONLY | RECHUNK | FULL)`
13
+
14
+ ## [0.19.3] - 2025-11-27
15
+
16
+ ### Changed
17
+
18
+ - **Async Chunker**: `DoclingServeChunker` now uses `httpx.AsyncClient` instead of sync `requests`
19
+
20
+ ### Fixed
21
+
22
+ - **OCR Options**: Fixed `DoclingLocalConverter` using base `OcrOptions` class which docling's OCR factory doesn't recognize. Now uses `OcrAutoOptions` for automatic OCR engine selection.
23
+ - **Dependencies**: Added `opencv-python-headless` to the `docling` optional dependency for table structure detection.
24
+
25
+ ## [0.19.2] - 2025-11-27
26
+
27
+ ### Changed
28
+
29
+ - **Async Converters**: Made document converters fully async
30
+ - `BaseConverter.convert_file()` and `convert_text()` are now async methods
31
+ - `DoclingLocalConverter` wraps blocking Docling operations with `asyncio.to_thread()`
32
+ - `DoclingServeConverter` now uses `httpx.AsyncClient` instead of sync `requests`
33
+ - **Async Model Prefetch**: `prefetch_models()` is now async
34
+ - Uses `httpx.AsyncClient` for Ollama model pulls
35
+ - Wraps blocking Docling and HuggingFace downloads with `asyncio.to_thread()`
36
+
37
+ ## [0.19.1] - 2025-11-26
38
+
39
+ ### Added
40
+
41
+ - **LM Studio Provider**: Added support for LM Studio as a provider for embeddings and QA/research models
42
+ - Configure with `provider: lm_studio` in embeddings, QA, or research model settings
43
+ - Supports thinking control for reasoning models (gpt-oss, etc.)
44
+ - Default base URL: `http://localhost:1234`
45
+
46
+ ### Fixed
47
+
48
+ - **Configuration**: Fixed `init-config` command generating invalid configuration files (#165)
49
+ - Refactored `generate_default_config()` to use Pydantic model serialization instead of manual dict construction
50
+ - Updated `qa`, `research`, and `reranking` sections to use new `ModelConfig` structure
51
+
52
+ ## [0.19.0] - 2025-11-25
53
+
54
+ ### Added
55
+
56
+ - **Model Customization**: Added support for per-model configuration settings
57
+ - New `enable_thinking` parameter to control reasoning behavior (true/false/None)
58
+ - Support for `temperature` and `max_tokens` settings on QA and research models
59
+ - All settings apply to any provider that supports them
60
+ - **Database Inspector**: New `inspect` CLI command launches interactive TUI for browsing documents and chunks & searching
61
+ - **Evaluations**: Added `evaluations` CLI script for running benchmarks (replaces `python -m evaluations.benchmark`)
62
+ - **Evaluations**: Added `--db` option to override evaluation database path
63
+ - Default database location moved to haiku.rag data directory:
64
+ - macOS: `~/Library/Application Support/haiku.rag/evaluations/dbs/`
65
+ - Linux: `~/.local/share/haiku.rag/evaluations/dbs/`
66
+ - Windows: `C:/Users/<USER>/AppData/Roaming/haiku.rag/evaluations/dbs/`
67
+ - Previously stored in `evaluations/data/` within the repository
68
+ - **Evaluations**: Added comprehensive experiment metadata tracking for better reproducibility
69
+ - Records dataset name, test case count, and all model configurations
70
+ - Tracks embedder settings: provider, model, and vector dimensions
71
+ - Tracks QA model: provider and model name
72
+ - Tracks judge model: provider and model name for LLM evaluation
73
+ - Tracks processing parameters: `chunk_size` and `context_chunk_radius`
74
+ - Tracks retrieval configuration: `retrieval_limit` for number of chunks retrieved
75
+ - Tracks reranking configuration: `rerank_provider` and `rerank_model`
76
+ - Enables comparison of evaluation runs with different configurations in Logfire
77
+ - **Evaluations**: Refactored retrieval evaluation to use pydantic-ai experiment framework
78
+ - New `evaluators` module with `MRREvaluator` (Mean Reciprocal Rank) and `MAPEvaluator` (Mean Average Precision)
79
+ - Retrieval benchmarks now use `Dataset.evaluate()` with full Logfire experiment tracking
80
+ - Dataset specifications now declare their retrieval evaluator (MRR for RepliQA, MAP for Wix)
81
+ - Replaced Recall@K and Success@K with industry-standard MRR and MAP metrics
82
+ - Unified evaluation framework for both retrieval and QA benchmarks
83
+ - **AG-UI Events**: Enhanced ActivitySnapshot events with richer structured data
84
+ - Added `stepName` field to identify which graph node emitted each activity
85
+ - Added structured fields to activity content while preserving backward-compatible `message` field:
86
+ - **Planning**: `sub_questions` - list of sub-question strings
87
+ - **Searching**: `query` - the search query, `confidence` - answer confidence (on success), `error` - error message (on failure)
88
+ - **Analyzing** (research): `insights` - list of insight objects, `gaps` - list of gap objects, `resolved_gaps` - list of resolved gap strings
89
+ - **Evaluating** (research): `confidence` - confidence score, `is_sufficient` - sufficiency flag
90
+ - **Evaluating** (deep QA): `is_sufficient` - sufficiency flag, `iterations` - iteration count
91
+
92
+ ### Changed
93
+
94
+ - **Evaluations**: Renamed `--qa-limit` CLI parameter to `--limit`, now applies to both retrieval and QA benchmarks
95
+ - **Evaluations**: Retrieval evaluator selection moved from runtime logic to dataset configuration
96
+
97
+ ## [0.18.0] - 2025-11-21
98
+
99
+ ### Added
100
+
101
+ - **Manual Vector Indexing**: New `create-index` CLI command for explicit vector index creation
102
+ - Creates IVF_PQ indexes
103
+ - Requires minimum 256 chunks (LanceDB training data requirement)
104
+ - New `search.vector_index_metric` config option: `cosine` (default), `l2`, or `dot`
105
+ - New `search.vector_refine_factor` config option (default: 30) for accuracy/speed tradeoff
106
+ - Indexes not created automatically during ingestion to avoid performance degradation
107
+ - Manual rebuilding required after adding significant new data
108
+ - **Enhanced Info Command**: `haiku-rag info` now shows storage sizes and vector index statistics
109
+ - Displays storage size for documents and chunks tables in human-readable format
110
+ - Shows vector index status (exists/not created)
111
+ - Shows indexed and unindexed chunk counts for monitoring index staleness
112
+
113
+ ### Changed
114
+
115
+ - **BREAKING: Default Embedding Model**: Changed default embedding model from `qwen3-embedding` to `qwen3-embedding:4b` with vector dimension 2560 (previously 4096)
116
+ - New installations will use the smaller, more efficient 4B parameter model by default
117
+ - **Action required**: Existing databases created with the old default will be incompatible. Users must either:
118
+ - Explicitly set `embeddings.model: "qwen3-embedding"` and `embeddings.vector_dim: 4096` in their config to maintain compatibility with existing databases
119
+ - Or run `haiku-rag rebuild` to re-embed all documents with the new default
120
+ - This change provides better performance for most use cases while reducing resource requirements
121
+ - **Evaluations**: Improved evaluation dataset naming and simplified evaluator configuration
122
+ - `EvalDataset` now accepts dataset name for better organization in Logfire
123
+ - Added `--name` CLI parameter to override evaluation run names
124
+ - Removed `IsInstance` evaluator, using only `LLMJudge` for QA evaluation
125
+ - **Search Accuracy**: Applied `refine_factor` to vector and hybrid searches for improved accuracy
126
+ - Retrieves `refine_factor * limit` candidates and re-ranks in memory
127
+ - Higher values increase accuracy but slow down queries
128
+
129
+ ### Fixed
130
+
131
+ - **AG-UI Activity Events**: Activity events now correctly use structured dict content instead of strings
132
+ - **Graph Configuration**: Graph builder functions now properly accept and use non-global config (#149)
133
+ - `build_research_graph()` and `build_deep_qa_graph()` now pass config to all agents and model creation
134
+ - `get_model()` utility function accepts `config` parameter (defaults to global Config)
135
+ - Allows creating multiple graphs with different configurations in the same application
136
+
137
+
138
+ ## [0.17.2] - 2025-11-19
139
+
140
+ ### Added
141
+
142
+ - **Document Update API**: New `update_document_fields()` method for partial document updates
143
+ - Update individual fields (content, metadata, title, chunks) without fetching full document
144
+ - Support for custom chunks or auto-generation from content
145
+
146
+ ### Changed
147
+
148
+ - **Chunk Creation**: `ChunkRepository.create()` now accepts both single chunks and lists for batch insertion
149
+ - Batch insertion reduces LanceDB version creation when adding multiple chunks with custom chunks
150
+ - Batch embedding generation for improved performance with multiple chunks
151
+ - Updated core dependencies
152
+
153
+ ## [0.17.1] - 2025-11-18
154
+
155
+ ### Added
156
+
157
+ - **Conversion Options**: Fine-grained control over document conversion for both local and remote converters
158
+ - New `conversion_options` config section in `ProcessingConfig`
159
+ - OCR settings: `do_ocr`, `force_ocr`, `ocr_lang` for controlling OCR behavior
160
+ - Table extraction: `do_table_structure`, `table_mode` (fast/accurate), `table_cell_matching`
161
+ - Image settings: `images_scale` to control image resolution
162
+ - Options work identically with both `docling-local` and `docling-serve` converters
163
+
164
+ ### Changed
165
+
166
+ - Increase reranking candidate retrieval multiplier from 3x to 10x for improved result quality
167
+ - **Docker Images**: Main `haiku.rag` image no longer automatically built and published
168
+ - **Conversion Options**: Removed the legacy `pdf_backend` setting; docling now chooses the optimal backend automatically
169
+
170
+ ## [0.17.0] - 2025-11-17
171
+
172
+ ### Added
173
+
174
+ - **Remote Processing**: Support for docling-serve as remote document processing and chunking service
175
+ - New `converter` config option: `docling-local` (default) or `docling-serve`
176
+ - New `chunker` config option: `docling-local` (default) or `docling-serve`
177
+ - New `providers.docling_serve` config section with `base_url`, `api_key`, and `timeout`
178
+ - Comprehensive error handling for connection, timeout, and authentication issues
179
+ - **Chunking Strategies**: Support for both hybrid and hierarchical chunking
180
+ - New `chunker_type` config option: `hybrid` (default) or `hierarchical`
181
+ - Hybrid chunking: Structure-aware splitting that respects document boundaries
182
+ - Hierarchical chunking: Preserves document hierarchy for nested documents
183
+ - **Table Serialization Control**: Configurable table representation in chunks
184
+ - New `chunking_use_markdown_tables` config option (default: `false`)
185
+ - `false`: Tables serialized as narrative text ("Value A, Column 2 = Value B")
186
+ - `true`: Tables preserved as markdown format with structure
187
+ - **Chunking Configuration**: Additional chunking control options
188
+ - New `chunking_merge_peers` config option (default: `true`) to merge undersized successive chunks
189
+ - **Docker Images**: Two Docker images for different deployment scenarios
190
+ - `haiku.rag`: Full image with all dependencies for self-contained deployments
191
+ - `haiku.rag-slim`: Minimal image designed for use with external docling-serve
192
+ - Multi-platform support (linux/amd64, linux/arm64)
193
+ - Docker Compose examples with docling-serve integration
194
+ - Automated CI/CD workflows for both images
195
+ - Build script (`scripts/build-docker-images.sh`) for local multi-platform builds
196
+
197
+ ### Changed
198
+
199
+ - **BREAKING: Chunking Tokenizer**: Switched from tiktoken to HuggingFace tokenizers for consistency with docling-serve
200
+ - Default tokenizer changed from tiktoken "gpt-4o" to "Qwen/Qwen3-Embedding-0.6B"
201
+ - New `chunking_tokenizer` config option in `ProcessingConfig` for customization
202
+ - `download-models` CLI command now also downloads the configured HuggingFace tokenizer
203
+ - **Docker Examples**: Updated examples to demonstrate remote processing
204
+ - `examples/docker` now uses slim image with docling-serve
205
+ - `examples/ag-ui-research` backend uses slim image with docling-serve
206
+ - Configuration examples include remote processing setup
207
+
208
+ ## [0.16.1] - 2025-11-14
209
+
210
+ ### Changed
211
+
212
+ - **Evaluations**: Refactored QA benchmark to run entire dataset as single evaluation for better Logfire experiment tracking
213
+ - **Evaluations**: Added `.env` file loading support via `python-dotenv` dependency
214
+
215
+ ## [0.16.0] - 2025-11-13
216
+
217
+ ### Added
218
+
219
+ - **AG-UI Protocol Support**: Full AG-UI (Agent-UI) protocol implementation for graph execution with event streaming
220
+ - New `AGUIEmitter` class for emitting AG-UI events from graphs
221
+ - Support for all AG-UI event types: lifecycle events (`RUN_STARTED`, `RUN_FINISHED`, `RUN_ERROR`), step events (`STEP_STARTED`, `STEP_FINISHED`), state updates (`STATE_SNAPSHOT`, `STATE_DELTA`), activity narration (`ACTIVITY_SNAPSHOT`), and text messages (`TEXT_MESSAGE_CHUNK`)
222
+ - `AGUIConsoleRenderer` for rendering AG-UI event streams to terminal with Rich formatting
223
+ - `stream_graph()` utility function for executing graphs with AG-UI event emission
224
+ - State diff computation for efficient state synchronization
225
+ - **Delta State Updates**: AG-UI emitter now supports incremental state updates via JSON Patch operations (`STATE_DELTA` events) to reduce bandwidth, configurable via `use_deltas` parameter (enabled by default)
226
+ - **AG-UI Server**: Starlette-based HTTP server for serving graphs via AG-UI protocol
227
+ - Server-Sent Events (SSE) streaming endpoint at `/v1/agent/stream`
228
+ - Health check endpoint at `/health`
229
+ - Full CORS support configurable via `agui` config section
230
+ - `create_agui_server()` function for programmatic server creation
231
+ - **Deep QA AG-UI Support**: Deep QA graph now fully supports AG-UI event streaming
232
+ - Integration with `AGUIEmitter` for progress tracking
233
+ - Step-by-step execution visibility via AG-UI events
234
+ - **CLI AG-UI Flag**: New `--agui` flag for `serve` command to start AG-UI server
235
+ - **Graph Module**: New unified `haiku.rag.graph` module containing all graph-related functionality
236
+ - **Common Graph Nodes**: New factory functions (`create_plan_node`, `create_search_node`) in `haiku.rag.graph.common.nodes` for reusable graph components
237
+ - **AG-UI Research Example**: New full-stack example (`examples/ag-ui-research`) demonstrating agent+graph architecture with CopilotKit frontend
238
+ - Pydantic AI agent with research tool that invokes the research graph
239
+ - Custom AG-UI streaming endpoint with anyio memory streams
240
+ - React/Next.js frontend with split-pane UI showing live research state
241
+ - Real-time progress tracking of questions, answers, insights, and gaps
242
+ - Docker Compose setup for easy local development
243
+
244
+ ### Changed
245
+
246
+ - **Vacuum Retention**: Default `vacuum_retention_seconds` increased from 60 seconds to 86400 seconds (1 day) for better version retention in typical workflows
247
+ - **BREAKING**: Major refactoring of graph-related code into unified `haiku.rag.graph` module structure:
248
+ - `haiku.rag.research` → `haiku.rag.graph.research`
249
+ - `haiku.rag.qa.deep` → `haiku.rag.graph.deep_qa`
250
+ - `haiku.rag.agui` → `haiku.rag.graph.agui`
251
+ - `haiku.rag.graph_common` → `haiku.rag.graph.common`
252
+ - **BREAKING**: Research and Deep QA graphs now use AG-UI event protocol instead of direct console logging
253
+ - Removed `console` and `stream` parameters from graph dependencies
254
+ - All progress updates now emit through `AGUIEmitter`
255
+ - **BREAKING**: `ResearchState` converted from dataclass to Pydantic `BaseModel` for JSON serialization and AG-UI compatibility
256
+ - Research and Deep QA graphs now emit detailed execution events for better observability
257
+ - CLI research command now uses AG-UI event rendering for `--verbose` output
258
+ - Improved graph execution visibility with step-by-step progress tracking
259
+ - Updated all documentation to reflect new import paths and AG-UI usage
260
+ - Updated examples (ag-ui-research, a2a-server) to use new import paths
261
+
262
+ ### Fixed
263
+
264
+ - **Document Creation**: Optimized `create_document` to skip unnecessary DoclingDocument conversion when chunks are pre-provided
265
+ - **FileReader**: Error messages now include both original exception details and file path for easier debugging
266
+ - **Database Auto-creation**: Read operations (search, list, get, ask, research) no longer auto-create empty databases. Write operations (add, add-src, delete, rebuild) still create the database as needed. This prevents the confusing scenario where a search query creates an empty database. Fixes issue #137.
267
+
268
+ ### Removed
269
+
270
+ - **BREAKING**: Removed `disable_autocreate` config option - the behavior is now automatic based on operation type
271
+ - **BREAKING**: Removed legacy `ResearchStream` and `ResearchStreamEvent` classes (replaced by AG-UI event protocol)
272
+
273
+ ## [0.15.0] - 2025-11-07
274
+
275
+ ### Added
276
+
277
+ - **File Monitor**: Orphan deletion feature - automatically removes documents from database when source files are deleted (enabled via `monitor.delete_orphans` config option, default: false)
278
+
279
+ ### Changed
280
+
281
+ - **Configuration**: All CLI commands now properly support `--config` parameter for specifying custom configuration files
282
+ - Configuration loading consolidated across CLI, app, and client with consistent resolution order
283
+ - `HaikuRAGApp` and MCP server now accept `config` parameter for programmatic configuration
284
+ - Updated CLI documentation to clarify global vs per-command options
285
+ - **BREAKING**: Standardized configuration filename to `haiku.rag.yaml` in user directories (was incorrectly using `config.yaml`). Users with existing `config.yaml` in their user directory will need to rename it to `haiku.rag.yaml`
286
+
287
+ ### Fixed
288
+
289
+ - **File Monitor**: Fixed incorrect "Updated document" logging for unchanged files - monitor now properly skips files when MD5 hash hasn't changed
290
+
291
+ ### Removed
292
+
293
+ - **BREAKING**: A2A (Agent-to-Agent) protocol support has been moved to a separate self-contained package in `examples/a2a-server/`. The A2A server is no longer part of the main haiku.rag package. Users who need A2A functionality can install and run it from the examples directory with `cd examples/a2a-server && uv sync`.
294
+ - **BREAKING**: Removed deprecated `.env`-based configuration system. The `haiku-rag init-config --from-env` command and `load_config_from_env()` function have been removed. All configuration must now be done via YAML files. Environment variables for API keys (e.g., `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`) and service URLs (e.g., `OLLAMA_BASE_URL`) are still supported and can be set via `.env` files.
295
+
296
+ ## [0.14.1] - 2025-11-06
297
+
298
+ ### Added
299
+
300
+ - Migrated research and deep QA agents to use Pydantic Graph beta API for better graph execution
301
+ - Automatic semaphore-based concurrency control for parallel sub-question processing
302
+ - `max_concurrency` parameter for controlling parallel execution in research and deep QA (default: 1)
303
+
304
+ ### Changed
305
+
306
+ - **BREAKING**: Research and Deep QA graphs now use `pydantic_graph.beta` instead of the class-based graph implementation
307
+ - Refactored graph common patterns into `graph_common` module
308
+ - Sub-questions now process using `.map()` for true parallel execution
309
+ - Improved graph structure with cleaner node definitions and flow control
310
+ - Pinned critical dependencies: `docling-core`, `lancedb`, `docling`
311
+
312
+ ## [0.14.0] - 2024-11-05
313
+
314
+ ### Added
315
+
316
+ - New `haiku.rag-slim` package with minimal dependencies for users who want to install only what they need
317
+ - Evaluations package (`haiku.rag-evals`) for internal benchmarking and testing
318
+ - Improved search filtering performance by using pandas DataFrames for joins instead of SQL WHERE IN clauses
319
+
320
+ ### Changed
321
+
322
+ - **BREAKING**: Restructured project into UV workspace with three packages:
323
+ - `haiku.rag-slim` - Core package with minimal dependencies
324
+ - `haiku.rag` - Full package with all extras (recommended for most users)
325
+ - `haiku.rag-evals` - Internal benchmarking and evaluation tools
326
+ - Migrated from `pydantic-ai` to `pydantic-ai-slim` with extras system
327
+ - Docling is now an optional dependency (install with `haiku.rag-slim[docling]`)
328
+ - Package metadata checks now use `haiku.rag-slim` (always present) instead of `haiku.rag`
329
+ - Docker image optimized: removed evaluations package, reducing installed packages from 307 to 259
330
+ - Improved vector search performance through optimized score normalization
331
+
332
+ ### Fixed
333
+
334
+ - ImportError now properly raised when optional docling dependency is missing
335
+
336
+ ## [0.13.3] - 2024-11-04
337
+
338
+ ### Added
339
+
340
+ - Support for Zero Entropy reranker
341
+ - Filter parameter to `search()` for filtering documents before search
342
+ - Filter parameter to CLI `search` command
343
+ - Filter parameter to CLI `list` command for filtering document listings
344
+ - Config option to pass custom configuration files to evaluation commands
345
+ - Document filtering now respects configured include/exclude patterns when using `add-src` with directories
346
+ - Max retries to insight_agent when producing structured output
347
+
348
+ ### Fixed
349
+
350
+ - CLI now loads `.env` files at startup
351
+ - Info command no longer attempts to use deprecated `.env` settings
352
+ - Documentation typos
353
+
354
+ ## [0.13.2] - 2024-11-04
355
+
356
+ ### Added
357
+
358
+ - Gitignore-style pattern filtering for file monitoring using pathspec
359
+ - Include/exclude pattern documentation for FileMonitor
360
+
361
+ ### Changed
362
+
363
+ - Moved monitor configuration to its own section in config
364
+ - Improved configuration documentation
365
+ - Updated dependencies
366
+
367
+ ## [0.13.1] - 2024-11-03
368
+
369
+ ### Added
370
+
371
+ - Initial version tracking
372
+
373
+ [Unreleased]: https://github.com/ggozad/haiku.rag/compare/0.14.0...HEAD
374
+ [0.14.0]: https://github.com/ggozad/haiku.rag/compare/0.13.3...0.14.0
375
+ [0.13.3]: https://github.com/ggozad/haiku.rag/compare/0.13.2...0.13.3
376
+ [0.13.2]: https://github.com/ggozad/haiku.rag/compare/0.13.1...0.13.2
377
+ [0.13.1]: https://github.com/ggozad/haiku.rag/releases/tag/0.13.1