TokenMizer
Your AI forgets why. TokenMizer remembers.
An OpenAI-compatible proxy that builds a knowledge graph of your
session — decisions, files, errors, goals — and replays it when the
context window runs out. Not a summary: a queryable graph that knows
"we switched from MongoDB to PostgreSQL, and here is why."
One line to adopt · works with Claude, GPT, Gemini, Grok, DeepSeek, Mistral, Cohere, Ollama · MIT
Quick start ·
See it ·
Claude Code & MCP ·
Benchmarks ·
Architecture ·
Roadmap
Real run: 25-node graph, checkpoint ckpt_21a0959c3ddf, 233-token resume. Regenerate with python scripts/gen_demo_gif.py.
---
## The problem
Every AI session has a context limit. When you hit it, the model forgets
every decision and every rationale built over hours of work, and you
spend the first ten minutes of the next session re-explaining the
project.
Summarising the history does not fix this. A summary tells you *what*
was decided; it loses *why*, and it loses what was rejected — so the
model happily re-proposes the thing you moved off three sessions ago.
## Quick start
```bash
pip install "tokenmizer[anthropic,cache]"
export TOKENMIZER_ANTHROPIC_API_KEY=sk-ant-...
tokenmizer serve
```
Then change one line in your client:
```python
from openai import OpenAI
client = OpenAI(
api_key="your-key",
base_url="http://localhost:8000/v1", # only this changes
)
resp = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Continue where we left off"}],
extra_body={"session_id": "my-project"}, # optional, enables memory
)
```
Everything else is unchanged: same request shape, same response shape,
plus a `tokenmizer` block reporting what was saved. Open