Context Architecture
Deciding what information the model sees at each step. Context is a scarce resource: a 1M token window with 800K of noise performs worse than 200K with 150K curated signal. Structured compaction before the window fills.
Reference architecture patterns for production AI agent systems. Not better models. Better engineering discipline: context architecture, execution guardrails, and memory infrastructure that actually works.
Document input flows through the Aho-Corasick engine to a knowledge graph, filtered by role, and dispatched to hook, REST, or WASM runtime targets.
The harness, not the model, determines agent success. LangChain's coding agent jumped from 52.8% to 66.5% on Terminal Bench 2.0 by changing zero model parameters.
Deciding what information the model sees at each step. Context is a scarce resource: a 1M token window with 800K of noise performs worse than 200K with 150K curated signal. Structured compaction before the window fills.
Enforcing what the model can and cannot do. Risk-tiered CI with machine-readable contracts: high-risk paths get policy gates, browser evidence, and security scans. Low-risk paths get fast-tracked.
Ensuring the model learns from its own history. Failed commands captured automatically, corrections applied, patterns graduated to rules. Cross-session search prevents repeating solved problems.
Bigger context windows do not solve the problem. They make it worse without proper architecture.
By 100K tokens, the window is 60% noise: old file reads, superseded search results, abandoned reasoning paths.
System prompt says "use pnpm." CLAUDE.md says "run tests before committing." README says "use npm." By 200K tokens, instructions compete with 150K of history and lose.
Long-running agents accumulate so many intermediate steps that they lose sight of the original objective. The model optimises for local coherence rather than global progress.
Framework sprawl versus disciplined harness engineering.
| Capability | Reference Architecture | Framework + Cloud | Raw LLM API |
|---|---|---|---|
| Context compaction | |||
| Risk-tiered CI gates | |||
| Cross-session learning | |||
| Role-based knowledge graphs | |||
| Multi-agent coordination | |||
| Strategic drift detection | |||
| Data stays local | |||
| Vendor lock-in |
Full support Partial Not available
From the core thesis to production patterns.
Articles on harness engineering, context management, and production agent architecture.
Technical deep-dives on NLP, knowledge graphs, BERT QA benchmarking, and deployment patterns.
Reference architecture documentation: AI product design, core capabilities, enabling infrastructure.
The knowledge graph engine behind the reference architecture. Local-first, sub-millisecond, Rust/WASM.
Open source under CC BY-SA. Contributions welcome. Edit any page directly on GitHub.
Production SaaS with connectors, LLM proxy, and agentic skills for enterprise deployment.