One LLM call on a complex request fails in unpredictable ways — and free-tier models fail more often than most. TokenEater splits the problem instead of retrying blindly: several agents cooperate as a team, and every answer passes verification before it ships.
request ──> GATEKEEPER ──> BRAIN ──> agents ──> final assembly
│ │ │
route or answer plan & research / code /
directly split creative / critique
- GATEKEEPER — classifies the request: answer directly, delegate to planning, or ask for clarification.
- BRAIN — deep planning: breaks the task into concrete microtasks.
- Agents — execute microtasks, each drawing a model from a pool of free OpenRouter models (research, code, creativity, criticism).
- Final assembly — merges results, verifies quality against explicit criteria, feeds critique back to the worker until the answer passes.
- Runs entirely on free OpenRouter models (
:freetier) - Automatic verification & correction: workers get critiqued and retry until they pass
- Strict JSON contracts between agents, parsed defensively (markdown-fenced JSON included)
- Handles complex multi-step requests that break a single model call
- Model pool is a plain dict in
m.py— swap models without touching logic
git clone https://github.com/alesrg/TokenEater.git
cd TokenEater
pip install -r requirements.txtPut your OpenRouter API key into apiKey at the top of m.py, adjust the models dict if you like, then:
python m.pyAn experimental sandbox for orchestration ideas — the contract-and-verify pattern you'd use between any two services, applied to agents.
Part of alesrg's experiments · built in public