sverklo
/* code intelligence for ai agents */

sverklo 

Your AI agent wastes 70% of tokens reading irrelevant files. Sverklo indexes your codebase locally — hybrid semantic search with PageRank ranking and persistent memory. Zero config.
~/your-project claude code
# install sverklo and set it up in any project $ npm install -g sverklo $ cd your-project && sverklo init .claude/mcp.json .claude/settings.local.json CLAUDE.md # ask your agent anything — sverklo is preferred automatically > how does the auth middleware work? ⚡ sverklo_search query="authentication middleware" ─ src/middleware/auth.ts:42 validateToken() score: 0.89 ─ src/routes/auth.ts:18 requireAuth() score: 0.84 ─ src/lib/jwt.ts:12 verifyJWT() score: 0.81 ✓ 3 results in 23ms — 847 files searched, 2,431 tokens used
/* the problem */
70%
tokens wasted
Agents grep through irrelevant files, burning your context window on noise.
10–30m
lost per session
Developers rebuild context every session. Decisions vanish after compaction.
<50ms
with sverklo
Semantic search finds exactly the right code. Memories persist across sessions.
/* how it works */

indexed.
ranked.
remembered.

01

hybrid search

BM25 for precision, semantic embeddings for recall, PageRank for structural importance — fused via RRF. Faster and more accurate than grep.

02

local embeddings

all-MiniLM-L6-v2 via ONNX runtime. 384-dimensional vectors generated on your machine. No API calls, no data leaves your laptop.

03

pagerank ranking

Files that are imported by many others rank higher. Your agent finds the actually-important code first, not just keyword matches.

04

persistent memory

Save decisions, patterns, and preferences with git-state linking. Stale memories flagged automatically when referenced files change.

05

incremental

File watcher updates the index on every save. Dependency graph and PageRank recompute in real time. Always fresh.

06

ten languages

TypeScript, JavaScript, Python, Go, Rust, Java, C, C++, Ruby, PHP. More coming. Structural parsing for each.

/* mcp tools */

ten tools
your agent
actually uses.

Each tool gets registered with the MCP server's instructions field, telling Claude to prefer them over built-in grep. Combined with a SessionStart hook, adoption is guaranteed.
sverklo_search
Hybrid semantic + text search across the codebase. Preferred over grep.
search
sverklo_overview
Structural codebase map ranked by PageRank importance.
search
sverklo_lookup
Direct symbol lookup by name with full definitions.
search
sverklo_refs
Find all references to a function, class, or type.
search
sverklo_deps
Show file dependency graph — imports and importers with ref counts.
search
sverklo_status
Index health check. File count, chunk count, languages.
meta
sverklo_remember
Save decisions, patterns, preferences. Linked to current git state.
memory
sverklo_recall
Semantic search over saved memories. Stale detection included.
memory
sverklo_forget
Remove a memory by ID.
memory
sverklo_memories
List memories with health metrics — age, access count, staleness.
memory
/* install */

three commands.
zero config.

01 — install
Global npm install
npm install -g sverklocopy
Requires Node 20+. Works on macOS, Linux, Windows.
02 — setup
Initialize in your project
sverklo initcopy
Creates .claude/mcp.json, adds SessionStart hook, appends CLAUDE.md instructions. Idempotent.
03 — start coding
Open your agent
claudecopy
First run downloads the embedding model (~90MB, ~30s). After that, instant.
/* works with */