haiku.rag 0.14.0__py3-none-any.whl → 0.19.3__py3-none-any.whl

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.
README.md CHANGED
@@ -4,22 +4,19 @@ Retrieval-Augmented Generation (RAG) library built on LanceDB.
4
4
 
5
5
  `haiku.rag` is a Retrieval-Augmented Generation (RAG) library built to work with LanceDB as a local vector database. It uses LanceDB for storing embeddings and performs semantic (vector) search as well as full-text search combined through native hybrid search with Reciprocal Rank Fusion. Both open-source (Ollama) as well as commercial (OpenAI, VoyageAI) embedding providers are supported.
6
6
 
7
- > **Note**: Configuration now uses YAML files instead of environment variables. If you're upgrading from an older version, run `haiku-rag init-config --from-env` to migrate your `.env` file to `haiku.rag.yaml`. See [Configuration](https://ggozad.github.io/haiku.rag/configuration/) for details.
8
-
9
7
  ## Features
10
8
 
11
9
  - **Local LanceDB**: No external servers required, supports also LanceDB cloud storage, S3, Google Cloud & Azure
12
- - **Multiple embedding providers**: Ollama, VoyageAI, OpenAI, vLLM
13
- - **Multiple QA providers**: Any provider/model supported by Pydantic AI
14
- - **Research graph (multi‑agent)**: Plan → Search → Evaluate → Synthesize with agentic AI
10
+ - **Multiple embedding providers**: Ollama, LM Studio, VoyageAI, OpenAI, vLLM
11
+ - **Multiple QA providers**: Any provider/model supported by Pydantic AI (Ollama, LM Studio, OpenAI, Anthropic, etc.)
15
12
  - **Native hybrid search**: Vector + full-text search with native LanceDB RRF reranking
16
13
  - **Reranking**: Default search result reranking with MixedBread AI, Cohere, Zero Entropy, or vLLM
17
14
  - **Question answering**: Built-in QA agents on your documents
15
+ - **Research graph (multi‑agent)**: Plan → Search → Evaluate → Synthesize with agentic AI
18
16
  - **File monitoring**: Auto-index files when run as server
19
- - **40+ file formats**: PDF, DOCX, HTML, Markdown, code files, URLs
20
- - **MCP server**: Expose as tools for AI assistants
21
- - **A2A agent**: Conversational agent with context and multi-turn dialogue
22
17
  - **CLI & Python API**: Use from command line or Python
18
+ - **MCP server**: Expose as tools for AI assistants
19
+ - **Flexible document processing**: Local (docling) or remote (docling-serve) processing
23
20
 
24
21
  ## Installation
25
22
 
@@ -31,7 +28,7 @@ Retrieval-Augmented Generation (RAG) library built on LanceDB.
31
28
  uv pip install haiku.rag
32
29
  ```
33
30
 
34
- Includes all features: document processing, all embedding providers, rerankers, and A2A agent support.
31
+ Includes all features: document processing, all embedding providers, and rerankers.
35
32
 
36
33
  ### Slim Package (Minimal Dependencies)
37
34
 
@@ -88,13 +85,13 @@ To customize settings, create a `haiku.rag.yaml` config file (see [Configuration
88
85
 
89
86
  ```python
90
87
  from haiku.rag.client import HaikuRAG
91
- from haiku.rag.research import (
92
- PlanNode,
88
+ from haiku.rag.config import Config
89
+ from haiku.rag.graph.agui import stream_graph
90
+ from haiku.rag.graph.research import (
93
91
  ResearchContext,
94
92
  ResearchDeps,
95
93
  ResearchState,
96
94
  build_research_graph,
97
- stream_research_graph,
98
95
  )
99
96
 
100
97
  async with HaikuRAG("database.lancedb") as client:
@@ -115,41 +112,31 @@ async with HaikuRAG("database.lancedb") as client:
115
112
  print(answer)
116
113
 
117
114
  # Multi‑agent research pipeline (Plan → Search → Evaluate → Synthesize)
118
- graph = build_research_graph()
115
+ # Graph settings (provider, model, max_iterations, etc.) come from config
116
+ graph = build_research_graph(config=Config)
119
117
  question = (
120
118
  "What are the main drivers and trends of global temperature "
121
119
  "anomalies since 1990?"
122
120
  )
123
- state = ResearchState(
124
- context=ResearchContext(original_question=question),
125
- max_iterations=2,
126
- confidence_threshold=0.8,
127
- max_concurrency=2,
128
- )
121
+ context = ResearchContext(original_question=question)
122
+ state = ResearchState.from_config(context=context, config=Config)
129
123
  deps = ResearchDeps(client=client)
130
124
 
131
125
  # Blocking run (final result only)
132
- result = await graph.run(
133
- PlanNode(provider="openai", model="gpt-4o-mini"),
134
- state=state,
135
- deps=deps,
136
- )
137
- print(result.output.title)
138
-
139
- # Streaming progress (log/report/error events)
140
- async for event in stream_research_graph(
141
- graph,
142
- PlanNode(provider="openai", model="gpt-4o-mini"),
143
- state,
144
- deps,
145
- ):
146
- if event.type == "log":
147
- iteration = event.state.iterations if event.state else state.iterations
148
- print(f"[{iteration}] {event.message}")
149
- elif event.type == "report":
126
+ report = await graph.run(state=state, deps=deps)
127
+ print(report.title)
128
+
129
+ # Streaming progress (AG-UI events)
130
+ async for event in stream_graph(graph, state, deps):
131
+ if event["type"] == "STEP_STARTED":
132
+ print(f"Starting step: {event['stepName']}")
133
+ elif event["type"] == "ACTIVITY_SNAPSHOT":
134
+ print(f" {event['content']}")
135
+ elif event["type"] == "RUN_FINISHED":
150
136
  print("\nResearch complete!\n")
151
- print(event.report.title)
152
- print(event.report.executive_summary)
137
+ result = event["result"]
138
+ print(result["title"])
139
+ print(result["executive_summary"])
153
140
  ```
154
141
 
155
142
  ## MCP Server
@@ -162,32 +149,13 @@ haiku-rag serve --stdio
162
149
 
163
150
  Provides tools for document management and search directly in your AI assistant.
164
151
 
165
- ## A2A Agent
166
-
167
- Run as a conversational agent with the Agent-to-Agent protocol:
168
-
169
- ```bash
170
- # Start the A2A server
171
- haiku-rag serve --a2a
172
-
173
- # Connect with the interactive client (in another terminal)
174
- haiku-rag a2aclient
175
- ```
176
-
177
- The A2A agent provides:
178
-
179
- - Multi-turn dialogue with context
180
- - Intelligent multi-search for complex questions
181
- - Source citations with titles and URIs
182
- - Full document retrieval on request
183
-
184
152
  ## Examples
185
153
 
186
154
  See the [examples directory](examples/) for working examples:
187
155
 
188
156
  - **[Interactive Research Assistant](examples/ag-ui-research/)** - Full-stack research assistant with Pydantic AI and AG-UI featuring human-in-the-loop approval and real-time state synchronization
189
- - **[Docker Setup](examples/docker/)** - Complete Docker deployment with file monitoring, MCP server, and A2A agent
190
- - **[A2A Security](examples/a2a-security/)** - Authentication examples (API key, OAuth2, GitHub)
157
+ - **[Docker Setup](examples/docker/)** - Complete Docker deployment with file monitoring and MCP server
158
+ - **[A2A Server](examples/a2a-server/)** - Self-contained A2A protocol server package with conversational agent interface
191
159
 
192
160
  ## Documentation
193
161
 
@@ -199,7 +167,6 @@ Full documentation at: https://ggozad.github.io/haiku.rag/
199
167
  - [Python API](https://ggozad.github.io/haiku.rag/python/) - Complete API docs
200
168
  - [Agents](https://ggozad.github.io/haiku.rag/agents/) - QA agent and multi-agent research
201
169
  - [MCP Server](https://ggozad.github.io/haiku.rag/mcp/) - Model Context Protocol integration
202
- - [A2A Agent](https://ggozad.github.io/haiku.rag/a2a/) - Agent-to-Agent protocol support
203
170
  - [Benchmarks](https://ggozad.github.io/haiku.rag/benchmarks/) - Performance Benchmarks
204
171
 
205
172
  mcp-name: io.github.ggozad/haiku-rag
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: haiku.rag
3
- Version: 0.14.0
3
+ Version: 0.19.3
4
4
  Summary: Agentic Retrieval Augmented Generation (RAG) with LanceDB
5
5
  Author-email: Yiorgis Gozadinos <ggozadinos@gmail.com>
6
6
  License: MIT
@@ -17,7 +17,9 @@ Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
18
  Classifier: Typing :: Typed
19
19
  Requires-Python: >=3.12
20
- Requires-Dist: haiku-rag-slim[a2a,cohere,docling,mxbai,voyageai,zeroentropy]
20
+ Requires-Dist: haiku-rag-slim[cohere,docling,inspector,mxbai,voyageai,zeroentropy]==0.19.3
21
+ Provides-Extra: inspector
22
+ Requires-Dist: textual>=1.0.0; extra == 'inspector'
21
23
  Description-Content-Type: text/markdown
22
24
 
23
25
  # Haiku RAG
@@ -26,22 +28,19 @@ Retrieval-Augmented Generation (RAG) library built on LanceDB.
26
28
 
27
29
  `haiku.rag` is a Retrieval-Augmented Generation (RAG) library built to work with LanceDB as a local vector database. It uses LanceDB for storing embeddings and performs semantic (vector) search as well as full-text search combined through native hybrid search with Reciprocal Rank Fusion. Both open-source (Ollama) as well as commercial (OpenAI, VoyageAI) embedding providers are supported.
28
30
 
29
- > **Note**: Configuration now uses YAML files instead of environment variables. If you're upgrading from an older version, run `haiku-rag init-config --from-env` to migrate your `.env` file to `haiku.rag.yaml`. See [Configuration](https://ggozad.github.io/haiku.rag/configuration/) for details.
30
-
31
31
  ## Features
32
32
 
33
33
  - **Local LanceDB**: No external servers required, supports also LanceDB cloud storage, S3, Google Cloud & Azure
34
- - **Multiple embedding providers**: Ollama, VoyageAI, OpenAI, vLLM
35
- - **Multiple QA providers**: Any provider/model supported by Pydantic AI
36
- - **Research graph (multi‑agent)**: Plan → Search → Evaluate → Synthesize with agentic AI
34
+ - **Multiple embedding providers**: Ollama, LM Studio, VoyageAI, OpenAI, vLLM
35
+ - **Multiple QA providers**: Any provider/model supported by Pydantic AI (Ollama, LM Studio, OpenAI, Anthropic, etc.)
37
36
  - **Native hybrid search**: Vector + full-text search with native LanceDB RRF reranking
38
37
  - **Reranking**: Default search result reranking with MixedBread AI, Cohere, Zero Entropy, or vLLM
39
38
  - **Question answering**: Built-in QA agents on your documents
39
+ - **Research graph (multi‑agent)**: Plan → Search → Evaluate → Synthesize with agentic AI
40
40
  - **File monitoring**: Auto-index files when run as server
41
- - **40+ file formats**: PDF, DOCX, HTML, Markdown, code files, URLs
42
- - **MCP server**: Expose as tools for AI assistants
43
- - **A2A agent**: Conversational agent with context and multi-turn dialogue
44
41
  - **CLI & Python API**: Use from command line or Python
42
+ - **MCP server**: Expose as tools for AI assistants
43
+ - **Flexible document processing**: Local (docling) or remote (docling-serve) processing
45
44
 
46
45
  ## Installation
47
46
 
@@ -53,7 +52,7 @@ Retrieval-Augmented Generation (RAG) library built on LanceDB.
53
52
  uv pip install haiku.rag
54
53
  ```
55
54
 
56
- Includes all features: document processing, all embedding providers, rerankers, and A2A agent support.
55
+ Includes all features: document processing, all embedding providers, and rerankers.
57
56
 
58
57
  ### Slim Package (Minimal Dependencies)
59
58
 
@@ -110,13 +109,13 @@ To customize settings, create a `haiku.rag.yaml` config file (see [Configuration
110
109
 
111
110
  ```python
112
111
  from haiku.rag.client import HaikuRAG
113
- from haiku.rag.research import (
114
- PlanNode,
112
+ from haiku.rag.config import Config
113
+ from haiku.rag.graph.agui import stream_graph
114
+ from haiku.rag.graph.research import (
115
115
  ResearchContext,
116
116
  ResearchDeps,
117
117
  ResearchState,
118
118
  build_research_graph,
119
- stream_research_graph,
120
119
  )
121
120
 
122
121
  async with HaikuRAG("database.lancedb") as client:
@@ -137,41 +136,31 @@ async with HaikuRAG("database.lancedb") as client:
137
136
  print(answer)
138
137
 
139
138
  # Multi‑agent research pipeline (Plan → Search → Evaluate → Synthesize)
140
- graph = build_research_graph()
139
+ # Graph settings (provider, model, max_iterations, etc.) come from config
140
+ graph = build_research_graph(config=Config)
141
141
  question = (
142
142
  "What are the main drivers and trends of global temperature "
143
143
  "anomalies since 1990?"
144
144
  )
145
- state = ResearchState(
146
- context=ResearchContext(original_question=question),
147
- max_iterations=2,
148
- confidence_threshold=0.8,
149
- max_concurrency=2,
150
- )
145
+ context = ResearchContext(original_question=question)
146
+ state = ResearchState.from_config(context=context, config=Config)
151
147
  deps = ResearchDeps(client=client)
152
148
 
153
149
  # Blocking run (final result only)
154
- result = await graph.run(
155
- PlanNode(provider="openai", model="gpt-4o-mini"),
156
- state=state,
157
- deps=deps,
158
- )
159
- print(result.output.title)
160
-
161
- # Streaming progress (log/report/error events)
162
- async for event in stream_research_graph(
163
- graph,
164
- PlanNode(provider="openai", model="gpt-4o-mini"),
165
- state,
166
- deps,
167
- ):
168
- if event.type == "log":
169
- iteration = event.state.iterations if event.state else state.iterations
170
- print(f"[{iteration}] {event.message}")
171
- elif event.type == "report":
150
+ report = await graph.run(state=state, deps=deps)
151
+ print(report.title)
152
+
153
+ # Streaming progress (AG-UI events)
154
+ async for event in stream_graph(graph, state, deps):
155
+ if event["type"] == "STEP_STARTED":
156
+ print(f"Starting step: {event['stepName']}")
157
+ elif event["type"] == "ACTIVITY_SNAPSHOT":
158
+ print(f" {event['content']}")
159
+ elif event["type"] == "RUN_FINISHED":
172
160
  print("\nResearch complete!\n")
173
- print(event.report.title)
174
- print(event.report.executive_summary)
161
+ result = event["result"]
162
+ print(result["title"])
163
+ print(result["executive_summary"])
175
164
  ```
176
165
 
177
166
  ## MCP Server
@@ -184,32 +173,13 @@ haiku-rag serve --stdio
184
173
 
185
174
  Provides tools for document management and search directly in your AI assistant.
186
175
 
187
- ## A2A Agent
188
-
189
- Run as a conversational agent with the Agent-to-Agent protocol:
190
-
191
- ```bash
192
- # Start the A2A server
193
- haiku-rag serve --a2a
194
-
195
- # Connect with the interactive client (in another terminal)
196
- haiku-rag a2aclient
197
- ```
198
-
199
- The A2A agent provides:
200
-
201
- - Multi-turn dialogue with context
202
- - Intelligent multi-search for complex questions
203
- - Source citations with titles and URIs
204
- - Full document retrieval on request
205
-
206
176
  ## Examples
207
177
 
208
178
  See the [examples directory](examples/) for working examples:
209
179
 
210
180
  - **[Interactive Research Assistant](examples/ag-ui-research/)** - Full-stack research assistant with Pydantic AI and AG-UI featuring human-in-the-loop approval and real-time state synchronization
211
- - **[Docker Setup](examples/docker/)** - Complete Docker deployment with file monitoring, MCP server, and A2A agent
212
- - **[A2A Security](examples/a2a-security/)** - Authentication examples (API key, OAuth2, GitHub)
181
+ - **[Docker Setup](examples/docker/)** - Complete Docker deployment with file monitoring and MCP server
182
+ - **[A2A Server](examples/a2a-server/)** - Self-contained A2A protocol server package with conversational agent interface
213
183
 
214
184
  ## Documentation
215
185
 
@@ -221,7 +191,6 @@ Full documentation at: https://ggozad.github.io/haiku.rag/
221
191
  - [Python API](https://ggozad.github.io/haiku.rag/python/) - Complete API docs
222
192
  - [Agents](https://ggozad.github.io/haiku.rag/agents/) - QA agent and multi-agent research
223
193
  - [MCP Server](https://ggozad.github.io/haiku.rag/mcp/) - Model Context Protocol integration
224
- - [A2A Agent](https://ggozad.github.io/haiku.rag/a2a/) - Agent-to-Agent protocol support
225
194
  - [Benchmarks](https://ggozad.github.io/haiku.rag/benchmarks/) - Performance Benchmarks
226
195
 
227
196
  mcp-name: io.github.ggozad/haiku-rag
@@ -0,0 +1,6 @@
1
+ README.md,sha256=3Y4bUYJ-gnWPH_zeCdHK_NZcej9JvA2JdnKoSY0eu6o,6377
2
+ haiku_rag-0.19.3.dist-info/METADATA,sha256=BUpAqkIkKsZTQ1mGopYaSKlvlUC6cRBQtpvLfz-5h5M,7338
3
+ haiku_rag-0.19.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
4
+ haiku_rag-0.19.3.dist-info/entry_points.txt,sha256=G1U3nAkNd5YDYd4v0tuYFbriz0i-JheCsFuT9kIoGCI,48
5
+ haiku_rag-0.19.3.dist-info/licenses/LICENSE,sha256=eXZrWjSk9PwYFNK9yUczl3oPl95Z4V9UXH7bPN46iPo,1065
6
+ haiku_rag-0.19.3.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,6 +0,0 @@
1
- README.md,sha256=N8nk6cs6JkWHAmVz3ci7lTiLr6Xq_UqifWGivZnuPJU,7216
2
- haiku_rag-0.14.0.dist-info/METADATA,sha256=I3H0hBrGIgDwtIvFe9tnu2-PeLESLlhEHVrgmrKCnr4,8085
3
- haiku_rag-0.14.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
4
- haiku_rag-0.14.0.dist-info/entry_points.txt,sha256=G1U3nAkNd5YDYd4v0tuYFbriz0i-JheCsFuT9kIoGCI,48
5
- haiku_rag-0.14.0.dist-info/licenses/LICENSE,sha256=eXZrWjSk9PwYFNK9yUczl3oPl95Z4V9UXH7bPN46iPo,1065
6
- haiku_rag-0.14.0.dist-info/RECORD,,