A Rust library for thinking-trace-driven context management in LLM applications. OpenCAW treats context as a managed workspace: documents are indexed as lightweight stubs, and full content is recalled inline as the model reasons about it — multiplying effective context by 1–2 orders of magnitude at flat compute cost.
This is not another RAG wrapper. The differentiator is thinking-trace-as-retrieval-signal: the model's own reasoning drives what gets loaded, evicted, and consolidated, rather than a retrieval step that runs before inference.
Watch a coding agent work on an unfamiliar codebase: it burns call after call grepping and reading files just to reconstruct facts that were on disk the whole time — a function's signature, a trait's bounds, the fields of a struct, where something is called from. Each fact is fetched piecemeal, used once, and then falls out of context, so the next related question pays the same tax again. The information was available; it just wasn't resident when the model needed it.
That repeated "tool-call to find on-disk content" loop is the problem OpenCAW exists to remove. Instead of the model going out to fetch content, the content comes to the model: the corpus is indexed as lightweight stubs, and the model's own reasoning trace — "I need the ModelAdapter Send bound", "what fields does PrebuiltIndex have" — is the signal that pulls the right full content into the workspace and evicts what's no longer relevant. The aim is a context window that stays full of what the current reasoning step actually needs, over a corpus far larger than the window, at roughly flat compute cost.
See docs/origin.md for the founding design and docs/scope.md for what is in and out of scope for v0.1.
cargo build --workspace
cargo run -p caw-cli # Ollama + recall loop, interactive
cargo test --workspace # includes end-to-end integration test (no API keys needed)
See docs/getting-started.md for adapter setup, environment variables, and a minimal code example.
Full index with status for every doc: docs/README.md.
| Glossary | Canonical definitions for every term used in the project |
| Architecture | Crates, data flow, design principles |
| Getting Started | Build, run, environment variables, code example |
| Adapters | Anthropic, Groq, Ollama, OpenAI-compat, LlamaCpp, Mock |
| Embedding Providers | FastEmbed, API, Candle, ONNX |
| Storage | SQLite, Qdrant, HNSW, hybrid retrieval |
| Benchmarking | NIAH, opencaw, sysdoc workloads; sweep harness; intent bench |
| Origin | Frozen origin document: founding design, stub-and-recall architecture, eviction policy, curation |
| Scope | v0.1 deliverables, what's in and out, scope change protocol |
| Bugs | Open bug log |
| Codebase Review | Frozen snapshot (2026-05-09): implementation status, structural gaps, debt inventory |
Development tracking is in TODO.md.
483 commits
Rust
95.7%
Shell
2.7%
Python
1.6%
A Rust library for thinking-trace-driven context management in LLM applications. OpenCAW treats context as a managed workspace: documents are indexed as lightweight stubs, and full content is recalled inline as the model reasons about it — multiplying effective context by 1–2 orders of magnitude at flat compute cost.
This is not another RAG wrapper. The differentiator is thinking-trace-as-retrieval-signal: the model's own reasoning drives what gets loaded, evicted, and consolidated, rather than a retrieval step that runs before inference.
Watch a coding agent work on an unfamiliar codebase: it burns call after call grepping and reading files just to reconstruct facts that were on disk the whole time — a function's signature, a trait's bounds, the fields of a struct, where something is called from. Each fact is fetched piecemeal, used once, and then falls out of context, so the next related question pays the same tax again. The information was available; it just wasn't resident when the model needed it.
That repeated "tool-call to find on-disk content" loop is the problem OpenCAW exists to remove. Instead of the model going out to fetch content, the content comes to the model: the corpus is indexed as lightweight stubs, and the model's own reasoning trace — "I need the ModelAdapter Send bound", "what fields does PrebuiltIndex have" — is the signal that pulls the right full content into the workspace and evicts what's no longer relevant. The aim is a context window that stays full of what the current reasoning step actually needs, over a corpus far larger than the window, at roughly flat compute cost.
See docs/origin.md for the founding design and docs/scope.md for what is in and out of scope for v0.1.
cargo build --workspace
cargo run -p caw-cli # Ollama + recall loop, interactive
cargo test --workspace # includes end-to-end integration test (no API keys needed)
See docs/getting-started.md for adapter setup, environment variables, and a minimal code example.
Full index with status for every doc: docs/README.md.
| Glossary | Canonical definitions for every term used in the project |
| Architecture | Crates, data flow, design principles |
| Getting Started | Build, run, environment variables, code example |
| Adapters | Anthropic, Groq, Ollama, OpenAI-compat, LlamaCpp, Mock |
| Embedding Providers | FastEmbed, API, Candle, ONNX |
| Storage | SQLite, Qdrant, HNSW, hybrid retrieval |
| Benchmarking | NIAH, opencaw, sysdoc workloads; sweep harness; intent bench |
| Origin | Frozen origin document: founding design, stub-and-recall architecture, eviction policy, curation |
| Scope | v0.1 deliverables, what's in and out, scope change protocol |
| Bugs | Open bug log |
| Codebase Review | Frozen snapshot (2026-05-09): implementation status, structural gaps, debt inventory |
Development tracking is in TODO.md.
483 commits
Rust
95.7%
Shell
2.7%
Python
1.6%