20 GitHub repos cut a Grok bot's token usage 8x, from 100K to 12.5K per task
alexcovo_eth · x · 2026-10-21
An ex-SpaceX engineer shares how he cut his Grok bot's per-task token usage from 100,000 to 12,500 — 8x cheaper, fewer failed runs, and 10x more usable results on the same budget — using 20 open-source repos.
Highlights:
- jsonrepair (mangiucugna/jsonrepair, 5.1k stars): fixes malformed LLM JSON output without regenerating the whole response
- Docling: converts PDFs and office docs into structured content preserving tables and layout
- PyMuPDF4LLM: extracts PDFs to Markdown so the bot loads only needed sections
- LanceDB: stores searchable document chunks for retrieval instead of stuffing full documents
The core levers: what the bot reads, what it repeats, and what it verifies before declaring a task done. A companion course expands the workflow.
More from coding & agent
- Implementer–reviewer: running agents that review other agents for better output — Al_Grigor · 2026-10-21
- Editing video headless with Opus + Python + FFMPEG beats any NLE, dev claims — _AustinCalvert_ · 2026-10-21
- T3 Connect outage: Theo says surge of users hit Cloudflare rate limits, now fixed — thsottiaux · 2026-10-21
- Agent final reports misleading 80.4% of the time when tasks fail, paper finds — HeyAmit_ · 2026-10-21
- Robo Use ships day-one support for Dream-1 with auto-scored bimanual YAM sim suite — ManlingLi_ · 2026-10-21
- DeepSeek ships V4.1-Flash-1017; Qoder offers it free at 0.0x credits until Oct 24 — Med1_Ai · 2026-10-21