CTX

•
146
•

Optimizes context management for AI coding agents, significantly reducing token waste by efficiently handling repository knowledge, rules, and task-specific information.

CTX serves as a local context runtime engine designed to enhance the efficiency of AI coding agents, particularly within OpenCode workflows. It addresses the common problem of excessive token consumption by intelligently indexing repositories, storing reusable guidance as graph memory, and exposing local MCP tools. CTX keeps various forms of context—including repository knowledge, rules, shell output, diffs, and file rereads—compact and relevant, preventing them from bloating the model's context. It integrates directly into OpenCode as a context layer, offering features like compact task packs, read-cache compression, command pruning, and a live dashboard to provide real-time insights into token savings and context optimization.

Características Principales

01Graph Memory: Replaces large instruction files with queryable, task-relevant directives.
0299 GitHub stars
03OpenCode-Native Integration: Offers dedicated slash commands and profiles for seamless workflow integration.
04Context Packing: Builds compact, task-specific context packs using graph memory, diffs, and other signals.
05Read Cache: Compresses token cost for file rereads using 'digest' and 'outline' modes.
06Live Right-Sidebar Dashboard: Provides real-time metrics on token savings, cache hit rates, and pack efficiency within OpenCode.

Casos de Uso

01Reducing token waste and costs for AI coding agents and LLM-powered development workflows.
02Efficiently managing and retrieving project-specific rules, guidance, and lessons for agents.
03Optimizing prompts sent to large language models by compressing and prioritizing relevant context.