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

twenty languages

TypeScript, JavaScript, Python, Go, Rust, Java, C, C++, Ruby, PHP, Kotlin, Scala, Swift, Dart, Elixir, Lua, Zig, Haskell, Clojure, OCaml.

/* persistent memory */

your agent
finally
remembers.

session 0 · day one import
# bring your existing docs — sverklo ingests them automatically $ sverklo init .claude/mcp.json · .claude/settings.local.json · CLAUDE.md Scanning for existing project knowledge... imported 18 memories from: · CLAUDE.md (12) — conventions, tech stack · .cursorrules (3) — style preferences · docs/adr/001-prisma.md — decision, tagged adr · docs/adr/002-auth.md — decision, tagged adr · CONTRIBUTING.md (1) — review process
session 1 · tuesday remember
> we decided to use Prisma for the ORM because it gives better TypeScript types than Drizzle ⚡ sverklo_remember category="decision" content: "We chose Prisma over Drizzle for better TypeScript types" tags: ["database", "orm"] git: main@a3f29e1 confidence: 1.0 ✓ memory #42 saved
session 2 · thursday (new conversation) recall
# session start — sverklo://context auto-injected Loaded 3 memories: ORM choice, auth pattern, API conventions > add a new API endpoint for user profiles # Claude knows: Prisma for DB (from memory #42) # Claude knows: JWT validation before DB calls (from memory #43) ⚡ writes endpoint with Prisma + JWT validation — no rediscovery
·

bring your own docs

Auto-imports memories from CLAUDE.md, .cursorrules, AGENTS.md, CONTRIBUTING.md, and ADRs on init. Your existing project knowledge becomes semantically searchable instantly.

·

bi-temporal (unique to sverklo)

Every memory has valid_from_sha and valid_until_sha. Memories are never deleted, only superseded — so you can query "what we believed at commit X". Zep does this for conversations; sverklo is the only one doing it for code.

·

staleness detection

If a memory references a file that no longer exists, it's flagged as stale. No more advice based on deleted code.

·

semantic recall

Memories are embedded and searched the same way as code. Ask "what did we decide about auth?" and get the relevant memory.

·

auto-inject on session start

An MCP resource surfaces top memories to Claude before you type anything. Your decisions travel across sessions automatically.

/* mcp tools */

fifteen 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
sverklo_impact
Find every function/class that references a symbol. Safe refactoring across the symbol graph.
search
sverklo_promote
Promote a memory to core tier — auto-injected into every session as a project invariant.
memory
sverklo_demote
Demote a core memory back to archive. Searched on demand instead of auto-injected.
memory
sverklo_ast_grep
Structural pattern matching via ast-grep binary. Precise symbol queries without embeddings.
search
/* vs the competition */

only one tool
has everything.

The code intelligence and memory space is fragmented. Each competitor gives up at least two of these six dimensions. Sverklo is the only one with all six.
Tool Code-native Local-first MCP drop-in Git-aware memory Symbol graph Bi-temporal
sverklo
claude-mem CC only
Mem0 crippled SDK
Zep / Graphiti Neo4j
Augment Code cloud
Greptile cloud 3rd party
Aider repo-map
Zilliz claude-context Milvus
XRAY MCP partial
The wedge: git-aware bi-temporal memory. Sverklo is the only tool that can tell you what the code looked like when you made that decision — and warn you when the code has drifted since. No one else is code-native and has proper temporal 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 */