Models & Releases

I built an open-source context framework for Codex CLI (and 8 other AI agents)

Open-source framework solves AI agent amnesia with lazy-loading context and automatic routing to Claude, Gemini, or Codex.

Deep Dive

Developer Ashkaan has released Contextium, an open-source framework designed to solve a core limitation of current AI coding assistants: their lack of persistent memory. Instead of starting each session from scratch, Contextium gives agents like Codex, Claude, and Gemini a structured, compounding memory of a project's architecture, past decisions, and coding conventions. The system uses a dynamic 'context router' that lazy-loads only the relevant knowledge from an AGENTS.md file, preventing context window bloat even in large repositories with hundreds of files. This means agents can enforce behavioral rules, reference integration docs, and maintain project context across multiple work sessions.

The real power, however, lies in its multi-agent delegation architecture. Contextium can automatically route tasks to the most suitable AI model: Codex for fast, cheap bulk code generation; Claude for precise strategy and complex reasoning; and Gemini for web-connected research and task management. This optimizes both cost and capability. The framework is battle-tested, having been used on over 100 projects, and supports 9 different AI agents and 27 integrations including Google Workspace and QuickBooks. It's distributed under the permissive Apache 2.0 license, ensuring no vendor lock-in, and can be installed via a simple bash command.

Key Points
  • Solves 'agent amnesia' with a lazy-loading context router that loads only relevant project files, preventing context bloat.
  • Features automatic multi-agent delegation, routing tasks to Codex (code), Claude (strategy), or Gemini (research) based on the task.
  • Open-source (Apache 2.0) framework works with 9 AI agents and 27 integrations, battle-tested on 100+ real-world projects.

Why It Matters

Makes AI coding assistants significantly more effective by providing persistent project memory and intelligently leveraging the strengths of different AI models.