Bring the files you already have.
Read Markdown, text and CSV directly. Convert PDF, Office, HTML, images and audio through MarkItDown.
Build a knowledge base from local documents. Retrieve with keywords, meaning, or both, and return structured evidence your agent can read and call directly.
curl -sSL
https://github.com/KuaishouGameMind/arag-cli/releases/latest/download/install.sh |
bash
These outputs come from the released macOS arm64 binary against the repository's own Rust and Python fixtures. No embedding API was configured.
$ arag-cli build-index --input-dir ./docs --no-embedding
⚠ Skipping embeddings (BM25-only mode)
✅ Index build complete
├─ Chunks: 2
├─ Sentences: 6
├─ Mode: BM25-only (no embeddings)
├─ Native read: 2 files
├─ Skipped files: 0
└─ Time: 4.2s
$ arag-cli keyword-search rust safety performance -k 3 --no-cache
{
"tool": "keyword_search",
"results": [{
"chunk_id": "1",
"matched_keywords": ["rust", "safety", "performance"],
"score": 2.6269903156735817,
"snippet": "[Rust Programming Language] | Rust is a systems
programming language focused on safety and performance"
}],
"meta": {
"search_time_ms": 2,
"retrieved_tokens": 40,
"cache_hit": false
}
}
$ arag-cli read-chunk 1
{
"tool": "read_chunk",
"results": [{
"chunk_id": "1",
"metadata": { "source": "rust.md" },
"text": "[Rust Programming Language]\nRust is a systems
programming language focused on safety and performance.\nIt provides
memory safety without garbage collection.",
"tokens": 39
}],
"meta": { "read_time_ms": 0, "cache_hit": false }
}
$ arag-cli inspect-index
{
"tool": "inspect_index",
"index": {
"exists": true,
"format": "rust_native",
"total_sentences": 6,
"total_chunks": 2,
"embedding_dim": 0,
"sample_chunk_ids": ["0", "1"],
"has_embeddings": false
}
}
Local smoke test on 2 fixture chunks; this verifies the workflow, not production-scale throughput.
Start with exact keyword retrieval and no external services. Add embeddings only when your workflow needs semantic or hybrid search.
Use the latest release for your platform.
curl .../install.sh | bash
Markdown, text and CSV are read natively.
arag-cli build-index --input-dir ./docs --no-embedding
Get ranked chunks, snippets and metadata as JSON.
arag-cli keyword-search "query" -k 5
Read Markdown, text and CSV directly. Convert PDF, Office, HTML, images and audio through MarkItDown.
Heading chains travel with each chunk. Tables and code blocks stay atomic instead of breaking mid-structure.
Use local BM25 for exact signals, embeddings for meaning, or RRF hybrid fusion for both.
Stable chunk IDs, source metadata and JSON output let an agent inspect evidence before it answers.
Start local and deterministic. Upgrade the retrieval path without changing the interface your agent calls.
Multi-keyword scoring and snippets with no model, network or API key.
keyword-search
LOCAL
Connect an OpenAI-compatible embedding endpoint when exact words are not enough.
semantic-search
OPTIONAL API
Combine lexical and semantic rankings, then apply adaptive personalized scoring.
search
FUSED
Published project baseline versus the original Python implementation. See the repository for benchmark details.
Arag CLI defines parameter schemas, structured results and diagnostic states for its retrieval commands. Agents can call them through CLI, Agent Skill or REST API.
{
"tools": [{
"function": {
"name": "keyword_search",
"description": "Search for document
chunks using keyword-based exact
text matching (case-insensitive).",
"parameters": {
"required": ["keywords"],
"type": "object"
}
},
"type": "function"
}]
}
Keep indexes current, isolate projects, inspect usage and diagnose failures without stitching together another toolchain.
build-index · update · daemon · inspect-index
Incremental refresh and observable index state
kb create · kb use · kb list · kb delete
Isolated context for each project or domain
cache · history · note · pin · profile
Reuse, annotations, hot chunks and blind spots
health · lint · config · schema
Runtime status, configuration and interface schemas