Contexa

Versioned Memory for AI Agents

Git-inspired context management for LLM agents. COMMIT, BRANCH, MERGE, and CONTEXT operations over a persistent versioned memory workspace. Based on the groundbreaking Git Context Controller (GCC) research from arXiv:2508.00031.

# Python example - Give your agent memory
from contexa import GCCWorkspace

ws = GCCWorkspace("/project")
ws.init("Build a REST API")
ws.log_ota("Empty dir", "Scaffold first", "create files")
ws.commit("Scaffolded project")

Four Core Operations

Inspired by Git, designed for AI agents

📝

📝 OTA Logging

Continuous trace of Observation-Thought-Action cycles. Every decision your agent makes is recorded for context retrieval.

💾

💾 COMMIT

Checkpoint milestones with semantic summaries. Compresses older OTA steps into digestible summaries.

🌿

🌿 BRANCH

Create isolated workspaces to explore alternatives without affecting the main reasoning path.

🔀

🔀 MERGE

Integrate successful branch experiments back into main. Synthesize divergent reasoning paths.

🧠

🧠 CONTEXT

Hierarchical memory retrieval. Get exactly the right amount of history with configurable K parameter.

🔒

🔒 File Locking

Safe concurrent access with OS-level file locks. Multiple agents can work safely on the same workspace.

Three-Tier Memory Hierarchy

How GCC structures agent memory

📄 main.md — Global roadmap / planning artifact
↓
📋 commit.md — Milestone summaries (K commits)
↓
📜 log.md — Fine-grained OTA traces (all steps)

🎯 Global Planning

main.md stores the agent's high-level roadmap and goals. Updated on each milestone.

📋 Commit Level

commit.md contains semantic summaries of each milestone. Configurable K for retrieval.

📜 OTA Traces

log.md records every observation, thought, and action. Full reasoning history.

7 Language Implementations

Same .GCC/ format across all languages

🐍
Python
📘
JavaScript
🦀
Rust
🐹
Go
⚡
Zig
🌙
Lua
💧
Elixir

A workspace created in one language can be read and extended by any other. Perfect for polyglot agent systems.

Install Contexa

Choose your language

$ pip install contexa

State-of-the-Art Performance

Results from the original GCC paper (arXiv:2508.00031)

80.2%
SWE-Bench Verified
with Claude 4 Sonnet
83.4%
BrowseComp-Plus
with GPT-5
26
Systems Outperformed
Open and commercial
K=1
Optimal History
Most recent commit works best

Ablation Study Results

RoadMap + COMMIT 69.1%
+ Logs + Context 75.3%
+ Metadata 77.8%
+ Branch & Merge 80.2%