speedydivid / TokenForge
git clone https://github.com/speedydivid/TokenForge.git
TokenForge Β· 3d ago
Context window optimization for AI coding agents. Sandboxes tool output (98% reduction), persists session memory via SQLite + FTS5, and enforces routing across 17 platforms through MCP + hooks. Works with Claude Code, Gemini CLI, VS Code Copilot, OpenCode, Codex CLI.
β
stars, 24h
+31
stars, 7 days Β· #1,302
+31
stars, 30 days Β· #8,681
31
β
total Β· +31% this week
0
forks Β· 0 open issues
Star history starts 2026-10-20; the chart appears after the second daily snapshot.
LanguageJavaScript
Licenseβ
Created2026-10-17 (3d ago)
Last push3d ago
Watchers2
OwnerUser
GitHub topics
aiaiagentaiagentsclaudeclaude-aiclaude-codeclaude-code-pluginclaude-plugincodextoken-based-authenticationtoken-efficiencytoken-optimizationtoken-usagetokenforgetokenizationtokenomics
Links
- GitHub: github.com/speedydivid/TokenForge
- Releases Β· Issues Β· Hacker News mentions
README excerpt
# TokenForge **Less Context. More Coding.** TokenForge is an open-source context optimization engine designed to reduce token consumption, preserve session memory, and improve efficiency across AI-powered coding workflows. Stop wasting context on massive tool outputs and repeated explanations. TokenForge filters unnecessary output, stores persistent session knowledge, and routes tool interactions through a unified optimization layer. ## β¨ Features - **Context Compression** β reduce unnecessary tool output by up to 98% in supported workflows. - **Persistent Memory** β store and retrieve session knowledge using SQLite and FTS5 full-text search. - **Smart Tool Routing** β manage tool interactions across 17 supported platforms. - **MCP Integration** β connect AI coding agents through the Model Context Protocol. - **Automatic Hooks** β optimize tool output and context flow directly within supported workflows. - **Session Continuity** β retain useful context between sessions without repeatedly explaining the same things. - **Token Efficiency** β reduce redundant context and keep coding sessions focused. - **Multi-Agent Support** β integrate with popular AI-powered development environments. ## π§© Supported Platforms Designed for workflows involving: - Claude Code - Gemini CLI - VS Code Copilot - OpenCode - Codex CLI ## βοΈ How It Works 1. Intercepts supported tool interactions through hooks and MCP integrations. 2. Filters or compresses excessive tool output before it reaches the agent. 3. Stores useful session information in a local SQLite database. 4. Retrieves relevant memories through FTS5 search. 5. Routes supported interactions through a consistent optimization layer. ## π― Why TokenForge? - Less context wasted on repetitive tool output. - Lower token consumption in supported workflows. - Persistent knowledge across coding sessions. - A unified approach to AI agent integrations. - A more focused development experience. ## π Project Keywords `ai-agents` `token-optimization` `context-engineering` `mcp` `sqlite` `fts5` `claude-code` `gemini-cli` `codex-cli` `opencode` `github-copilot` `developer-tools` --- **TokenForge β Keep the context. Cut the noise.**