Codex Meetup · April 27, 2026 / Singapore
CodeDB: Efficient Code Intelligence Server
Index a codebase once. Serve structured answers to agents through MCP, HTTP, and CLI with lower latency and fewer tokens.

CodeDB + Muonry + sandbox agents
Agents are not only model-bound. They are IO-bound and token-bound.
A coding agent spends a surprising amount of time doing the same loop: walk files, open files, dump raw text, infer structure, edit, read again.
From fast code search to durable code memory
The original idea was already useful: a Zig code intelligence server with MCP, HTTP, CLI, structural indexing, trigram search, word lookup, and dependency graphs.
Code intelligence server: index on startup, answer tree, outline, symbol, search, and dependency questions.
Agent memory layer: snapshots, worker-local indexing, SIMD lookup, remote GitHub queries, locks, heartbeats, and change tracking.
The evolution is from returning matches to maintaining a current, structured model of the codebase.
Index once. Query the codebase like a database.
MCP stdioHTTP :7719CLIOne index serves every tree, symbol, search, and dependency question.
treeoutlinesymbolwordtrigramdepssnapshotwatcherchangesWhere is handleBatch and what can it affect?symbol + outline + deps
useful context, not a whole file dumpAgents ask for the minimum useful structure instead of rediscovering it from raw files.
Structured answers cut token volume by orders of magnitude
Benchmarked on the codedb repo (Apple M4 Pro). Tokens ≈ chars ÷ 4.
search 'allocator'outline main.zigedit handleBatchMost token waste is full-file dumps and repeated reads. codedb returns only what the agent asked for.
v0.2.572 made the index dramatically cheaper
Benchmark: openclaw, 6,315 files, Apple M4 Pro, ReleaseFast.
3.6 s346 ms10x faster~3.5 GB~580 MB-83%~1.9 GB~150 MB-92%152-87%Most queries should stop before touching file contents
T0Word indexDirect exact identifier lookup<1 msT1Trigram covering setIntersect posting lists for candidates~2 msT2SIMD content scan16-byte vector scan on candidates~10 msT3Sparse trigram fallbackSkip covering set when enough hits exist~20 msT4Case-insensitive scanFull content path only when needed~35 msT5Full fallbackDeferred maps and exhaustive path~55 msStart with the cheapest index. Escalate only when cheaper evidence is insufficient.
The action plane: every tool in-process, every op in one call.
- outline
- symbol
- lines
- smart_range
- literal
- word
- regex
- meta
- symbol
- pattern
- range
- after
- verify result
- store
- recall
- cross-session
- N ops · 1 round-trip
- 10× faster
~15 ms / op~0.7 ms / op · 21× fasterA controlled loop: structured context, scoped writes, inspectable trail.
receives task, emits tool calls
file scope lockheartbeat timeoutdeferred opsaudit logsymbols · deps · snapshots · changes
read · edit · diff · memo · batch
Every run is reproducible: same task, same snapshot, same diff. Kuri is our open runtime for this loop.
codedb + muonry: ~9× fewer bytes per task, ~1,600× on search
codedb_index /path/to/repo346 ms · 6,315 files · <2 ms re-indexcodedb_outline src/mcp.zig45 tokens vs ~4,800 for catcodedb_word handleBatch · muonry symbol~170 tokens totalmuonry edit symbol=handleBatch · muonry diff~500 token diff, not the full filecodedb_deps · codedb_changes since=<seq>dep graph + change log, ~200 tokensFull session: ~915 tokens vs ~29,600 for the same task with raw rg + cat.
The same stack, across the whole toolchain.
Index a codebase once. Serve structured answers to agents via MCP, HTTP, and CLI.
346 ms to index 6,315 filesgithub.com/justrach/codedbNext.js DX compiled to WebAssembly and native binaries. No Node.js.
115,093 req/s · <5ms cold start · 260 KBgithub.com/justrach/merjsFastAPI-compatible framework with a Zig HTTP core. Same Python API, way faster.
140,000 req/s · 12–18× faster than FastAPIgithub.com/justrach/turboapiHomebrew-compatible package manager in Zig. Parallel downloads, content-addressed cache.
3.5ms warm install · 13× faster than apt · 1.2 MBgithub.com/justrach/nanobrewMCP server that decomposes large coding tasks across parallel specialised agents.
37 tools · 8 agent roles · auto Opus/Sonnet/Haiku routinggithub.com/justrach/devswarmThe knowledge plane: 18 tools to read code without flooding context.
- functions · structs
- 4–15× fewer tokens
- exact definitions
- with body
- O(1) lookup
- inverted index
- full-text · regex
- scope blocks
- fuzzy file
- typo-tolerant
- imported_by
- transitive blast radius
- full layout
- languages · counts
- range · compact
- if_hash skip
- pipeline
- find→deps→outline
- 20 ops
- 1 round-trip
- recent files
- active surface
- since seq
- polling watch
outline first, read only the slice that matters — every tool feeds the same trigram + word index.
Public code intelligence API — any GitHub repo, no fork, no keys.
https://api.wiki.codesGET /api/<repo>/treefull file tree, paginatedGET /api/<repo>/outlinesymbols + line numbersGET /api/<repo>/symbolexact definitionsGET /api/<repo>/searchfull-text grepGET /api/<repo>/readfile slice by linesGET /api/<repo>/depsimport graphGET /api/<repo>/scorecode health · A–FGET /api/<repo>/cvesknown vulnerabilitiesSame shape as local codedb. The cloud router serves precomputed parquet artifacts — no parse-on-request.
Subagent swarms with an evolutionary loop. codedb feeds them context.
One MCP server, provider-agnostic — Codex routes to GPT-5.5, Claude Code routes to Sonnet / Opus. Per-role model choice, MAP-Elites prompt archive, and a fitness-driven evolutionary loop.
workers execute with prompts sampled from the archive
fitness = success · cost · speed · errors
winners slot into a MAP-Elites grid (token_eff × thoroughness)
softmax weighted — diversity preserved, best prompts win more often
codedb shrinks each worker's context — more workers fit, the archive evolves faster, the swarm gets smarter every run.
Give agents code memory, safe actions, and a sandbox to run in
A structured, current model of the repository.
A precise action layer for reads, edits, diffs, batches, and memory.
A controlled execution loop with scopes, locks, logs, and workflows.
codegraff.com/agents