Matryoshka
Token budgets are the silent bottleneck in document-heavy AI workflows — Matryoshka uses REPL state to analyze documents that would otherwise blow past conte…
Analyze documents far larger than an LLM's context window without vector databases or chunking. Based on the Recursive Language Models paper: the model emits commands in Nucleus, a constrained S-expression DSL, which the Lattice logic engine parses, validates, and executes against the document — no arbitrary code execution. Ships as a CLI (rlm) plus the lattice-mcp MCP server, whose handle-based results let coding agents query large files with 80%+ token savings.
- Analyze 200-page contracts without hitting token limits
- Summarize long research papers section by section
- Extract structured data from oversized regulatory filings
Token budgets are the silent bottleneck in document-heavy AI workflows — Matryoshka uses REPL state to analyze documents that would otherwise blow past context limits, enabling real analysis instead of truncated summaries.
Analysts and researchers working with large PDFs, legal filings, or technical specs who need Claude to reason over entire documents without losing detail.
https://github.com/yogthos/Matryoshka
By yogthos
How to Get It
pnpm add -g matryoshka-rlm (or run once without installing: npx matryoshka-rlm "query" ./file.log); includes the lattice-mcp MCP server
Tip: Paste this into a Claude Code conversation. Verify command matches your Claude Code version.
After installing, paste this into Claude:
Help me analyze 200-page contracts without hitting token limits
Trust Signals Auto-scanned
Community Pulse Active
Discussed on Hacker News, Reddit
- Russian Matryoshka Boxes — Reddit · 24007 pts
- Russian disinfo network “Matryoshka” is migrating to Bluesky as exodus from X co — Reddit · 6037 pts
- Joker idea: Matryoshka (and explanation) — Reddit · 1374 pts
3 mentions across 1 sources
Reviewer notes
Auto-scanned review. These are observations, not a security certification.
catalog_hygiene stale-eval refresh: Scored from trust signals (evidence-eval-v1): 146 GitHub stars; 5 contributors; last commit 93d ago; license Apache-2.0.
Things to check
- Recently discovered. Looks promising but has limited community feedback so far. We added it early so you can evaluate it before the crowd finds it.
How to evaluate tools before deploying →
Data shown here comes from public APIs and automated scanning. Reviewer notes reflect one person's experience. This is not a security certification or legal recommendation. Always evaluate tools according to your own organization's policies.
Evaluation
catalog_hygiene stale-eval refresh: Scored from trust signals (evidence-eval-v1): 146 GitHub stars; 5 contributors; last commit 93d ago; license Apache-2.0.