@autorag/librarian 2.7.0 → 2.9.0
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.
- package/NOTICE +10 -4
- package/README.md +122 -38
- package/dist/agent/agent.d.ts +210 -53
- package/dist/agent/answer-guidelines.d.ts +19 -0
- package/dist/agent/citations.d.ts +43 -0
- package/dist/agent/datasource-skill.d.ts +30 -16
- package/dist/agent/emit-results-tool.d.ts +37 -2
- package/dist/agent/evidence-judgment.d.ts +58 -0
- package/dist/agent/evidence-ledger.d.ts +59 -0
- package/dist/agent/evidence-origins.d.ts +49 -0
- package/dist/agent/fast-answer-tool.d.ts +16 -6
- package/dist/agent/index.d.ts +2 -1
- package/dist/agent/jev-extension.d.ts +68 -0
- package/dist/agent/jikji-find-tool.d.ts +2 -1
- package/dist/agent/pi-session.d.ts +28 -1
- package/dist/agent/query-decomposition.d.ts +25 -0
- package/dist/agent/query-peer-tool.d.ts +3 -0
- package/dist/agent/query-routing.d.ts +115 -0
- package/dist/agent/search-all-tool.d.ts +5 -5
- package/dist/agent/search-documents.d.ts +3 -11
- package/dist/agent/search-minsync-tool.d.ts +5 -5
- package/dist/agent/search-single-datasource-tool.d.ts +9 -8
- package/dist/agent/self-config.d.ts +40 -0
- package/dist/agent/system-prompt.d.ts +3 -3
- package/dist/agent/web-fetch-tool.d.ts +2 -1
- package/dist/agent/web-search-tool.d.ts +2 -1
- package/dist/cli/commands/evidence.d.ts +22 -0
- package/dist/cli/commands/init.d.ts +2 -1
- package/dist/cli/commands/memory.d.ts +1 -1
- package/dist/cli/commands/report.d.ts +1 -1
- package/dist/cli/commands/update-check.d.ts +8 -0
- package/dist/cli/config.d.ts +80 -7
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +3844 -2291
- package/dist/cli/output.d.ts +2 -6
- package/dist/cli/update-check.d.ts +34 -0
- package/dist/cli/version.d.ts +5 -0
- package/dist/config/home.d.ts +6 -0
- package/dist/core.d.ts +30 -6
- package/dist/core.js +7742 -6225
- package/dist/datasource/chunk-store.d.ts +2 -6
- package/dist/datasource/connector-skill.d.ts +2 -3
- package/dist/datasource/index.d.ts +2 -4
- package/dist/datasource/registry.d.ts +11 -13
- package/dist/datasource/scope.d.ts +19 -0
- package/dist/datasource/skills/github-gist/index.d.ts +1 -1
- package/dist/datasource/skills/github-gist/semantic.d.ts +3 -44
- package/dist/datasource/skills/github-gist/skill.d.ts +3 -3
- package/dist/datasource/types.d.ts +14 -28
- package/dist/embedding-runtime/gateway-embedder.d.ts +41 -0
- package/dist/everything/bundle.d.ts +15 -3
- package/dist/everything/client.d.ts +22 -5
- package/dist/everything/index.d.ts +1 -1
- package/dist/filesystem/name-search.d.ts +57 -0
- package/dist/fsearch/client.d.ts +7 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +9139 -6376
- package/dist/jikji/client.d.ts +6 -1
- package/dist/language.d.ts +2 -1
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.js +30542 -0
- package/dist/mcp/server.d.ts +9 -0
- package/dist/memory/check-memory-tool.d.ts +8 -4
- package/dist/memory/context.d.ts +51 -0
- package/dist/memory/index.d.ts +8 -1
- package/dist/memory/judged-evidence.d.ts +32 -0
- package/dist/memory/memory.d.ts +36 -120
- package/dist/memory/renderer.d.ts +16 -7
- package/dist/memory/similar-queries.d.ts +40 -0
- package/dist/minsync/errors.d.ts +14 -0
- package/dist/minsync/index.d.ts +1 -0
- package/dist/minsync/method.d.ts +8 -5
- package/dist/mirror/index.d.ts +1 -1
- package/dist/mirror/paths.d.ts +6 -0
- package/dist/mirror/sync.d.ts +5 -2
- package/dist/parser/defaults.d.ts +16 -5
- package/dist/parser/index.d.ts +1 -1
- package/dist/parser/kordoc.d.ts +8 -1
- package/dist/parser/ocr-engines.d.ts +19 -0
- package/dist/retrieval/bm25.d.ts +19 -0
- package/dist/retrieval/engine.d.ts +33 -43
- package/dist/retrieval/index.d.ts +3 -1
- package/dist/retrieval/merger.d.ts +6 -0
- package/dist/retrieval/rerank.d.ts +4 -2
- package/dist/retrieval/selection.d.ts +89 -0
- package/dist/retrieval/types.d.ts +1 -3
- package/dist/web/search/format.d.ts +5 -2
- package/dist/web/search/index.d.ts +7 -1
- package/package.json +11 -7
- package/skills/autorag/SKILL.md +43 -23
- package/skills/autorag-doctor/SKILL.md +40 -26
- package/skills/autorag-lite-setup/SKILL.md +123 -64
- package/skills/autorag-setup/SKILL.md +107 -22
- package/dist/cli/commands/feedback.d.ts +0 -8
- package/dist/datasource/access-context.d.ts +0 -43
- package/dist/datasource/result-filter.d.ts +0 -64
- package/dist/parser/ocr.d.ts +0 -31
- package/skills/autorag-lite-search/SKILL.md +0 -245
package/NOTICE
CHANGED
|
@@ -6,18 +6,21 @@ legacy/ package license: Apache-2.0
|
|
|
6
6
|
|
|
7
7
|
Third-party production dependencies:
|
|
8
8
|
|
|
9
|
-
@earendil-works/pi-agent-core@
|
|
9
|
+
@earendil-works/pi-agent-core@1.1.0
|
|
10
10
|
License: MIT
|
|
11
11
|
|
|
12
|
-
@earendil-works/pi-ai@
|
|
12
|
+
@earendil-works/pi-ai@1.1.0
|
|
13
13
|
License: MIT
|
|
14
14
|
|
|
15
|
-
@earendil-works/pi-coding-agent@
|
|
15
|
+
@earendil-works/pi-coding-agent@1.1.0
|
|
16
16
|
License: MIT
|
|
17
17
|
|
|
18
|
-
@earendil-works/pi-tui@
|
|
18
|
+
@earendil-works/pi-tui@1.1.0
|
|
19
19
|
License: MIT
|
|
20
20
|
|
|
21
|
+
@modelcontextprotocol/server@2.3.0
|
|
22
|
+
License: Apache-2.0
|
|
23
|
+
|
|
21
24
|
@openrouter/sdk@1.4.21
|
|
22
25
|
License: Apache-2.0
|
|
23
26
|
|
|
@@ -30,6 +33,9 @@ License: MIT
|
|
|
30
33
|
iconv-lite@0.7.3
|
|
31
34
|
License: MIT
|
|
32
35
|
|
|
36
|
+
jev-use@0.8.0
|
|
37
|
+
License: MIT
|
|
38
|
+
|
|
33
39
|
jszip@3.10.1
|
|
34
40
|
License: (MIT OR GPL-3.0-or-later)
|
|
35
41
|
|
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ Three principles drive every design decision in AutoRAG Agent:
|
|
|
61
61
|
|
|
62
62
|
AutoRAG Agent orchestrates five integrated subsystems:
|
|
63
63
|
|
|
64
|
-
1. **
|
|
64
|
+
1. **Retrieval Memory (`check_memory`):** After each answer, cited evidence Jev judges to genuinely support it is stored in `~/.autorag/memory.json`. Later searches receive this conversation's evidence, similar past questions, and long-term insights as **advisory reference** — it never reorders results or overrides current evidence. See [docs/retrieval-memory.md](docs/retrieval-memory.md).
|
|
65
65
|
2. **Pluggable Multi-Method Retrieval:**
|
|
66
66
|
- **BM25 Lexical Search:** Fast keyword ranking via MinSync over parsed markdown mirrors.
|
|
67
67
|
- **Semantic Vector Search:** Dense vector retrieval over CDC chunks via the built-in embedding gateway.
|
|
@@ -69,17 +69,19 @@ AutoRAG Agent orchestrates five integrated subsystems:
|
|
|
69
69
|
- **Jikji Find-First Discovery:** Local CLI-backed fast discovery answer packs.
|
|
70
70
|
- **Everything File-Name Search (Windows):** The bundled [voidtools Everything](https://www.voidtools.com/) indexes file and folder names under your search roots so the agent finds files by name, extension, path, size, or date instantly (`everything_search`).
|
|
71
71
|
- **FSearch File-Name Search (macOS/Linux):** [fsearch-cli](https://github.com/NomaDamas/fsearch-mac) (FSearch) keeps a live, per-workspace name index of your search roots so the agent finds files by name, extension, path, size, or date instantly (`fsearch_search`); without fsearch-cli installed it degrades to a slow filesystem walk.
|
|
72
|
-
- **Datasource Skills:**
|
|
73
|
-
3. **Result Merger &
|
|
72
|
+
- **Datasource Skills:** Federated retrieval across every configured external datasource.
|
|
73
|
+
3. **Result Merger & Scope Narrowing:** Cross-method deduplication, score normalization, and ordinary query-scope narrowing.
|
|
74
74
|
4. **Direct Evidence Reading (`bash`):** The agent directly opens and inspects promising files with `cat`, `grep`, or `find` to verify facts against ground truth.
|
|
75
|
-
5. **Curation
|
|
75
|
+
5. **Curation:** Structured findings are returned via `emit_autorag_results`; cited evidence that Jev judges to genuinely support the answer is remembered as reference context for later searches ([docs/retrieval-memory.md](docs/retrieval-memory.md)).
|
|
76
76
|
|
|
77
77
|
### Pi host boundary
|
|
78
78
|
|
|
79
|
-
AutoRAG uses `@earendil-works/pi-coding-agent` as the runtime host for model sessions. Pi owns provider credentials and OAuth storage, model-runtime dispatch, session JSONL persistence/resume, extension loading, lifecycle events, and the built-in `read`/`bash`/`edit`/`write`/`grep`/`find`/`ls` tools. AutoRAG registers only its domain tools and keeps orchestration outside the host: datasource
|
|
79
|
+
AutoRAG uses `@earendil-works/pi-coding-agent` as the runtime host for model sessions. Pi owns provider credentials and OAuth storage, model-runtime dispatch, session JSONL persistence/resume, extension loading, lifecycle events, and the built-in `read`/`bash`/`edit`/`write`/`grep`/`find`/`ls` tools. AutoRAG registers only its domain tools and keeps orchestration outside the host: datasource orchestration, MinSync/Jikji preparation, memory hints, fast-to-verification two-phase search, structured result emission, and remote-session filtering.
|
|
80
80
|
|
|
81
81
|
The CLI TUI (`autorag tui`) is Pi's interactive mode hosted on the AutoRAG librarian: there is no separate AutoRAG renderer. Pi owns the terminal UI and its native in-session commands — `/login`/`/logout`, `/model`, `/resume`, `/new`, `/tree`, `/compact`, and `/settings` — so provider sign-in and model selection work on first launch even when no AutoRAG model is configured. AutoRAG registers its retrieval tools and streams progress, preliminary answers, and final results into the same Pi session, so resume and two-phase search keep working together.
|
|
82
82
|
|
|
83
|
+
Update notices are AutoRAG's, not Pi's: `autorag tui` suppresses Pi's "run `pi update`" banner (Pi is a bundled host, not a separate install) and instead checks the published `@autorag/librarian` release, showing a one-line notice in the session when a newer version exists. Set `AUTORAG_NO_UPDATE_CHECK=1` to skip the lookup; `AUTORAG_UPDATE_CHECK_URL` overrides the registry endpoint.
|
|
84
|
+
|
|
83
85
|
|
|
84
86
|
---
|
|
85
87
|
|
|
@@ -89,19 +91,20 @@ If you are an AI coding agent or LLM (Claude Code, Cursor, Windsurf, Codex, Senp
|
|
|
89
91
|
|
|
90
92
|
| Skill | Directory | When to Use |
|
|
91
93
|
|---|---|---|
|
|
92
|
-
| **`autorag`** | [`skills/autorag/`](skills/autorag/SKILL.md) |
|
|
93
|
-
| **`autorag-setup`** | [`skills/autorag-setup/`](skills/autorag-setup/SKILL.md) | Installing AutoRAG, configuring
|
|
94
|
-
| **`autorag-lite-setup`** | [`skills/autorag-lite-setup/`](skills/autorag-lite-setup/SKILL.md) |
|
|
95
|
-
| **`autorag-lite-search`** | [`skills/autorag-lite-search/`](skills/autorag-lite-search/SKILL.md) | Performing model-free retrieval, reporting evidence, and recording feedback without an LLM. |
|
|
94
|
+
| **`autorag`** | [`skills/autorag/`](skills/autorag/SKILL.md) | Model-backed querying, searching, comparing, and summarizing with an already configured AutoRAG librarian. |
|
|
95
|
+
| **`autorag-setup`** | [`skills/autorag-setup/`](skills/autorag-setup/SKILL.md) | Installing AutoRAG, configuring the model-backed librarian, adding roots/datasources, running health checks, and registering Lite MCP when needed. |
|
|
96
|
+
| **`autorag-lite-setup`** | [`skills/autorag-lite-setup/`](skills/autorag-lite-setup/SKILL.md) | Installing/registering `autorag-mcp`, initializing model-free config, maintaining indexes, and verifying MCP search. |
|
|
96
97
|
|
|
97
98
|
### Install the skills into your coding agent
|
|
98
99
|
|
|
99
|
-
Skills are not auto-discovered — copy
|
|
100
|
+
Skills are not auto-discovered — copy only the setup skill when an agent needs
|
|
101
|
+
to bootstrap AutoRAG. **Routine AutoRAG Lite retrieval is provided by MCP
|
|
102
|
+
tools, not by a `autorag-lite-search` skill or shell command.**
|
|
100
103
|
|
|
101
104
|
```bash
|
|
102
105
|
# From a clone of this repository
|
|
103
106
|
mkdir -p .claude/skills
|
|
104
|
-
cp -R skills/autorag-lite-setup
|
|
107
|
+
cp -R skills/autorag-lite-setup .claude/skills/
|
|
105
108
|
```
|
|
106
109
|
|
|
107
110
|
```bash
|
|
@@ -109,10 +112,19 @@ cp -R skills/autorag-lite-setup skills/autorag-lite-search .claude/skills/
|
|
|
109
112
|
AUTORAG_SKILLS="$(npm root -g)/@autorag/librarian/skills"
|
|
110
113
|
# Bun global installs live at ~/.bun/install/global/node_modules/@autorag/librarian/skills
|
|
111
114
|
mkdir -p .claude/skills
|
|
112
|
-
cp -R "$AUTORAG_SKILLS/autorag-lite-setup"
|
|
115
|
+
cp -R "$AUTORAG_SKILLS/autorag-lite-setup" .claude/skills/
|
|
113
116
|
```
|
|
114
117
|
|
|
115
|
-
|
|
118
|
+
Run the setup skill once to register the stdio server with the host. Reload the
|
|
119
|
+
agent, then discover the actual tool names and schemas with MCP `tools/list`.
|
|
120
|
+
The normal Lite path is `autorag.status` → `autorag.refresh` when needed →
|
|
121
|
+
`autorag.search`; use `autorag.report` and `autorag.evidence` for the optional
|
|
122
|
+
curation lifecycle. Copy `skills/autorag`
|
|
123
|
+
and `skills/autorag-setup` only when the agent should also drive the
|
|
124
|
+
model-backed librarian, and `skills/autorag-doctor` for diagnostics. Other
|
|
125
|
+
agents read their own skill directories; copy the same setup folder there and
|
|
126
|
+
reload the agent session so it picks up the MCP registration instructions.
|
|
127
|
+
Do not copy or retain the removed `autorag-lite-search` skill.
|
|
116
128
|
|
|
117
129
|
### Quick Agent Workflow
|
|
118
130
|
|
|
@@ -136,6 +148,28 @@ Copy `skills/autorag` and `skills/autorag-setup` the same way when the agent sho
|
|
|
136
148
|
|
|
137
149
|
---
|
|
138
150
|
|
|
151
|
+
## AutoRAG Lite MCP Server
|
|
152
|
+
|
|
153
|
+
Register the package's stdio server with the host; the host owns the process
|
|
154
|
+
lifecycle and sends MCP tool calls:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
AUTORAG_CONFIG=/absolute/path/to/.autorag/config.json autorag-mcp
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
For Claude Code and Codex registration commands, use
|
|
161
|
+
[`skills/autorag-lite-setup/SKILL.md`](skills/autorag-lite-setup/SKILL.md).
|
|
162
|
+
The MCP contract source of truth is [`src/mcp/server.ts`](src/mcp/server.ts)
|
|
163
|
+
(tool registration, schemas, handlers) plus [`src/mcp/index.ts`](src/mcp/index.ts)
|
|
164
|
+
(stdio entrypoint). Discover tools and schemas with MCP `tools/list`; do not
|
|
165
|
+
hard-code a tool count.
|
|
166
|
+
|
|
167
|
+
Core Lite tools include `autorag.status`, `autorag.search`,
|
|
168
|
+
`autorag.search.files`, `autorag.datasources.list`, `autorag.datasources.get`,
|
|
169
|
+
`autorag.refresh`, `autorag.report`, and `autorag.evidence`. Configured
|
|
170
|
+
integrated datasources expose additional scoped search tools. Read-only MCP
|
|
171
|
+
mode omits mutating tools such as refresh and report.
|
|
172
|
+
|
|
139
173
|
## ⚡ AutoRAG Lite: Model-Free Retrieval Engine
|
|
140
174
|
|
|
141
175
|
Need blazing fast local search without configuring an LLM or paying for API tokens? Use **AutoRAG Lite**.
|
|
@@ -143,8 +177,8 @@ Need blazing fast local search without configuring an LLM or paying for API toke
|
|
|
143
177
|
AutoRAG Lite provides the exact same high-performance indexing, BM25 ranking, and local MinSync vector/hybrid retrieval engine as the full librarian, but **runs 100% model-free**:
|
|
144
178
|
|
|
145
179
|
- **Zero LLM Token Usage:** Run purely local BM25 and vector search offline.
|
|
146
|
-
- **Agent Integration Ready:** Use
|
|
147
|
-
- **Fast Local CLI:**
|
|
180
|
+
- **Agent Integration Ready:** Use the AutoRAG Lite MCP server to supply raw context chunks to an external model; the CLI remains a bootstrap and maintenance interface.
|
|
181
|
+
- **Fast Local CLI:** The CLI remains available for terminal-only indexing and repair.
|
|
148
182
|
|
|
149
183
|
```bash
|
|
150
184
|
# Initialize a model-free workspace
|
|
@@ -152,14 +186,12 @@ autorag lite init --search-paths ./documents
|
|
|
152
186
|
|
|
153
187
|
# Index local files and datasources
|
|
154
188
|
autorag lite refresh
|
|
155
|
-
|
|
156
|
-
# Retrieve ranked document chunks (returns JSON candidates with scores)
|
|
157
|
-
autorag lite retrieve "compliance policy exception process" --top-k 5 --json
|
|
158
|
-
|
|
159
|
-
# Check index status and freshness
|
|
160
|
-
autorag lite status
|
|
161
189
|
```
|
|
162
190
|
|
|
191
|
+
Normal Lite retrieval runs through the MCP tools (`autorag.status`,
|
|
192
|
+
`autorag.search`); the CLI remains the bootstrap and maintenance interface for
|
|
193
|
+
indexing and repair.
|
|
194
|
+
|
|
163
195
|
---
|
|
164
196
|
|
|
165
197
|
## 🔌 Supported Datasources
|
|
@@ -179,6 +211,7 @@ AutoRAG Agent connects to external tools and communication platforms using dedic
|
|
|
179
211
|
| **Local Mail Export**| `mail-export` | Built-in `.mbox` / `.eml` parser | Local filesystem mailboxes | Lexical |
|
|
180
212
|
| **Obsidian Vaults** | `obsidian` | [`qmd`](https://github.com/tobi/qmd) CLI | Direct markdown vault indexing | BM25, Semantic |
|
|
181
213
|
| **GitHub** | `github` | GitHub REST API | In-memory fetched Issues and Pull Requests | Lexical, Scoped |
|
|
214
|
+
| **GitHub Gists** | `github-gist` | GitHub REST API | Incremental local index of own-account public and permitted secret Gist content/metadata; token not stored | Lexical (BM25), Local Semantic, Scoped |
|
|
182
215
|
| **Cloud Drives** | `cloud-drive` | [`rclone`](https://rclone.org) CLI | Google Drive (Tier-1), OneDrive, Dropbox, etc. | Incremental Mirror + BM25 |
|
|
183
216
|
| **Photos & Shots** | `clawgallery` | `clawgallery` CLI | Local screenshot and photo store | Hybrid OCR/Visual Search |
|
|
184
217
|
| **RSS / News** | `rss` | Native HTTP Poller | RSS 2.0 & Atom feeds (24h deduplication) | Lexical |
|
|
@@ -243,15 +276,59 @@ falling back to `["ko", "en"]`. Supported tags: `ko`, `en`, `ja`, `zh-hans`,
|
|
|
243
276
|
| `.pptx` | built-in PPTX reader |
|
|
244
277
|
| `.eml` | built-in mail reader |
|
|
245
278
|
| `.txt` `.text` `.md` `.markdown` | plain text (CP949/EUC-KR aware) |
|
|
246
|
-
| `.png` `.jpg` `.jpeg` `.
|
|
279
|
+
| `.png` `.jpg` `.jpeg` `.webp` | `kordoc` image OCR (only when `parserOptions.ocr.enabled` is `true`) |
|
|
280
|
+
|
|
281
|
+
`.bmp` and `.tiff` are not parsed: kordoc rejects both as unsupported.
|
|
282
|
+
|
|
283
|
+
### Making photos and scans searchable
|
|
284
|
+
|
|
285
|
+
Image files and scanned PDF pages become searchable through one switch,
|
|
286
|
+
`parserOptions.ocr.enabled` (default `false`). It is off by default so indexing
|
|
287
|
+
downloads no recognition model and never runs OCR over a photo library. With it
|
|
288
|
+
off, image files are not parsed at all and scanned pages stay unrecognized.
|
|
289
|
+
|
|
290
|
+
```json
|
|
291
|
+
{ "languages": ["ko", "en"], "parserOptions": { "ocr": { "enabled": true } } }
|
|
292
|
+
```
|
|
247
293
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
294
|
+
`kordoc` owns both inputs. The configured `languages` pick the engine:
|
|
295
|
+
|
|
296
|
+
| `languages` | Engine | First-use download |
|
|
297
|
+
|---|---|---|
|
|
298
|
+
| only `ko` and/or `en` | kordoc built-in PP-OCRv5 (local CPU) | ~18 MB from Hugging Face, cached in `~/.cache/kordoc/models` |
|
|
299
|
+
| any other tag (`ja`, `zh-hans`, `fr`, `de`, …) | Tesseract, all configured languages at once (`kor+jpn`) | traineddata per language from the jsDelivr CDN, cached in `<workspace>/.autorag/models/tessdata` |
|
|
300
|
+
|
|
301
|
+
The built-in model has no kana, han, Cyrillic, Thai, Arabic or Devanagari
|
|
302
|
+
characters and drops diacritics in accented Latin text, so those languages need
|
|
303
|
+
Tesseract. Set `parserOptions.ocr.cachePath` to store the Tesseract models
|
|
304
|
+
elsewhere, or `KORDOC_OFFLINE=1` to block the built-in model download. An
|
|
305
|
+
explicit `parserOptions.kordoc.ocr` overrides the language-based choice.
|
|
306
|
+
|
|
307
|
+
Photos and videos are also reachable through two other paths that are not part
|
|
308
|
+
of this switch: the `clawgallery` datasource (captions and visual search over its
|
|
309
|
+
own folders) and Jikji's media index (`jikji.enableMediaIndex`, file facts such as
|
|
310
|
+
pixel size and format only, no content). Video content is not searchable yet.
|
|
252
311
|
|
|
253
312
|
### 2. Search from CLI
|
|
254
313
|
|
|
314
|
+
`autorag search` needs one chat model. `autorag init` does not pick one, so on
|
|
315
|
+
first run either sign in and choose a model inside the TUI:
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
autorag tui # then /login (OAuth or API key) and /model
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
or add the `model` entry to your existing AutoRAG config, preserving its other
|
|
322
|
+
settings. Find provider/model ids with `autorag models list --available`:
|
|
323
|
+
|
|
324
|
+
```json
|
|
325
|
+
"model": { "provider": "<provider>", "id": "<id>" }
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Then run `autorag health`. Do not re-run `autorag init --force` just to select
|
|
329
|
+
a model: it replaces the existing config, including datasource and parser settings.
|
|
330
|
+
Configure the provider's credentials through `/login` or its supported environment variables.
|
|
331
|
+
|
|
255
332
|
```bash
|
|
256
333
|
# Perform a curated search (uses your configured reasoning model)
|
|
257
334
|
autorag search "What are our primary Q3 deliverables?"
|
|
@@ -278,9 +355,6 @@ for (const result of response.results) {
|
|
|
278
355
|
console.log(`[${result.number}] ${result.title} (${result.source})`);
|
|
279
356
|
console.log(` ${result.summary}`);
|
|
280
357
|
}
|
|
281
|
-
|
|
282
|
-
// Record feedback: Result [1] was useful, [2] was not
|
|
283
|
-
agent.recordFeedbackByNumbers(response.sessionId, [1], [2]);
|
|
284
358
|
```
|
|
285
359
|
|
|
286
360
|
---
|
|
@@ -295,11 +369,12 @@ agent.recordFeedbackByNumbers(response.sessionId, [1], [2]);
|
|
|
295
369
|
| `autorag status` | Inspect corpus freshness, indexing status, and vector readiness |
|
|
296
370
|
| `autorag health` | Check model provider authentication, token validity, and API reachability |
|
|
297
371
|
| `autorag models list` | List chat models the pi runtime can resolve (built-ins, `models.json`, custom/extension providers) with provider auth status; never prints credential values |
|
|
372
|
+
| `autorag update-check` | Compare the running `autorag` against the published npm version (also runs on `autorag tui` launch) |
|
|
298
373
|
| `autorag tui` | Open Pi's interactive librarian TUI (`/login`, `/model`, `/resume`, …) |
|
|
299
374
|
| `autorag duplicates [DIR]` | Read-only scan for exact and near-duplicate document families with `dupey` |
|
|
300
|
-
| `autorag lite ...` |
|
|
301
|
-
| `autorag
|
|
302
|
-
| `autorag evidence <session>` | Inspect
|
|
375
|
+
| `autorag lite ...` | CLI bootstrap, indexing repair, terminal maintenance, and fallback interface; agents use MCP for normal Lite operation |
|
|
376
|
+
| `autorag memory inspect` | Render a read-only, path-opaque snapshot of retrieval memory (judged evidence, curated results, evidence chunks, insights); model-free |
|
|
377
|
+
| `autorag evidence <session>` | Inspect persisted evidence behind numbered results; MCP clients normally use `autorag.evidence`, and the CLI stays available for terminal maintenance |
|
|
303
378
|
| `autorag serve` | Start the P2P query server over SimpleX (opt-in) |
|
|
304
379
|
| `autorag p2p ...` | Manage peer trust, query approvals, and sharing policies |
|
|
305
380
|
|
|
@@ -312,6 +387,7 @@ Deep dive into AutoRAG Agent's architecture, security, and integration guides:
|
|
|
312
387
|
- **[MinSync Setup & Embedding QA](docs/minsync-setup.md):** Automatic binary installation, CDC chunking, and EmbeddingGemma verification.
|
|
313
388
|
- **[Local Embedding Runtime & Gateway](docs/embedding-runtime.md):** AutoRAG-owned local gateway, model prefetching, and zero-egress semantic search. Model cards: [`qwen3-embedding-0.6b`](docs/model-cards/qwen3-embedding-0.6b.md), [`embeddinggemma-300m`](docs/model-cards/embeddinggemma-300m.md).
|
|
314
389
|
- **[Datasource Skills Reference](docs/datasource-skills.md):** Full configuration contracts, connection aliases, and connector options.
|
|
390
|
+
- **[Jev Decisions](docs/jev-decisions.md):** Jev query pipeline, **on by default** via OpenRouter: it routes each question to a direct answer (intrinsic knowledge) or local search (everything needing more information; web search is left to the agent after the fast answer), splits multi-part questions into up to five parallel searches (`openrouter/qwen/qwen3.7-flash`), picks which registered datasources to search before the fast answer, and ends the run after the fast answer when that answer is complete. Also covers the `jev` judgment tool, backends (OpenRouter, TypeSafe, Vercel AI Gateway), and how to opt out.
|
|
315
391
|
- **[Manual QA & Datasource Test Harnesses](docs/manual-qa-datasources.md):** Real-world testing guides for Discord, KakaoTalk, Slack, Notion, and email.
|
|
316
392
|
- **[P2P SimpleX Sharing & Path Standard](docs/p2p-path-standard.md):** Decentralized peer query sharing with SimpleX, PII redaction, and approval queues.
|
|
317
393
|
- **[Supply Chain Security & License Audits](docs/supply-chain.md):** Software bill of materials (SBOM) and dependency gate policies.
|
|
@@ -357,13 +433,19 @@ autorag health --json # model resolution + one live completion probe
|
|
|
357
433
|
autorag gateway status --format json # on-demand embedding runtime
|
|
358
434
|
```
|
|
359
435
|
|
|
360
|
-
Indexing is not the same thing as searchability, so always confirm retrieval
|
|
436
|
+
Indexing is not the same thing as searchability, so always confirm retrieval
|
|
437
|
+
itself through the connected Lite MCP server:
|
|
361
438
|
|
|
362
|
-
```
|
|
363
|
-
autorag
|
|
364
|
-
autorag
|
|
439
|
+
```text
|
|
440
|
+
autorag.status {}
|
|
441
|
+
autorag.refresh {}
|
|
442
|
+
autorag.search {"query":"a word that certainly appears","topK":3}
|
|
443
|
+
autorag.search {"query":"recent topic","scope":"/discord/local/**","topK":3}
|
|
365
444
|
```
|
|
366
445
|
|
|
446
|
+
The CLI equivalents remain available for terminal repair, but do not use them
|
|
447
|
+
as the agent's normal Lite search path.
|
|
448
|
+
|
|
367
449
|
Common failures and their fix:
|
|
368
450
|
|
|
369
451
|
| Symptom | Diagnostic code | Fix |
|
|
@@ -371,10 +453,12 @@ Common failures and their fix:
|
|
|
371
453
|
| Results are missing recent files | `stale-index` | `autorag refresh --method parsed,minsync --json` |
|
|
372
454
|
| Semantic search returns nothing after changing the embedder | `embedding-identity-mismatch` | `autorag index rebuild --method minsync` |
|
|
373
455
|
| Gateway will not start, a previous run was killed | `lock-conflict` | `autorag gateway stop`, then retry |
|
|
374
|
-
| A datasource is healthy in its own CLI but absent from results | — |
|
|
456
|
+
| A datasource is healthy in its own CLI but absent from results | — | confirm it is configured under `datasources` and connected through its native CLI |
|
|
375
457
|
| A datasource errors during refresh | `datasource-index-failed` | run that CLI's own `doctor` |
|
|
376
|
-
| MinSync
|
|
458
|
+
| MinSync binary missing (search and refresh fail with `MinSync is required ...`) | — | `cargo install minsync`, or leave `minSync.autoInstall` on and re-run refresh |
|
|
459
|
+
| Jikji missing | `jikji-unavailable` | check the Rust toolchain, re-run refresh |
|
|
377
460
|
| Windows file-name search fails during refresh | `everything-index-failed` | read the ES exit code and stderr in the message, then `autorag refresh --method everything --json` |
|
|
461
|
+
| Every search does a full local search and verification, even for small talk | `query-route-fallback` | set `OPENROUTER_API_KEY` (Jev routing and decomposition are on by default) |
|
|
378
462
|
|
|
379
463
|
Native datasource stores stay owned by their CLIs — AutoRAG never rebuilds them. Fix a broken archive with `lazykatok doctor`, `discrawl --json metadata`, `slacrawl --json doctor`, `wacrawl --json doctor`, `telecrawl --json doctor`, `notcrawl doctor`, `qmd status`, or `mailcrawl doctor`, then re-run `autorag refresh --method datasources --json`.
|
|
380
464
|
|