contextctl: auditable context infrastructure for AI agents
researchResearch, with Suhas Jangoan, 2026
A vision paper and open-source prototype arguing that agent context should be governed data infrastructure: open files for truth, Git for time, a hash-named evidence folder, one SQLite sidecar for speed, and a token-budgeted serving protocol. Under review at IEEE BigData 2026.
Problem
An incident-response agent picks up a wrong belief about who owns a pipeline and routes alerts to nobody for three weeks. When someone notices, nobody can answer four questions: when the agent learned it, from where, what it believed before, or how to restore the right state with proof. Commercial memory services keep knowledge in proprietary stores, record no verifiable link from a memory to its source, and let agents write beliefs without review.
Approach
- Four separable layers. Generation: harvest agents that draft knowledge from a GitHub repo, Slack workspace, or Confluence space as OKF markdown, with a local mode where no data leaves the machine.
- Curation: a review gate no draft can skip. Drafts wait on a staging branch and merge only after format checks, evidence-hash verification, and reconciliation (duplicate, revision, new, or conflict); contradictions are surfaced to a human, never auto-resolved.
- Metadata: one rebuildable SQLite sidecar deriving SCD Type 2 belief history, full-text search, and a graph edge table from Git, so point-in-time questions become a single indexed query and the database can be deleted and rebuilt with no drift.
- Serving: progressive disclosure over MCP. An orient() call of a few hundred tokens first, descriptions next, full text only against a declared budget. Six tools in total; the protocol, not the tool count, carries the design.
- Two invariants stated as testable design objectives: every hop of the provenance chain (answer, concept, commit, evidence, source) is verifiable independently, and every machine-written belief in the trusted bundle resolves to source bytes by construction.
Impact
- Vision paper submitted to the 1st IEEE Big Data Workshop on Agentic AI for Big Data (AAI-BD 2026), IEEE BigData 2026. Decision expected October 2026.
- Measured feasibility of the primitives: snapshot commit 155 ms and full sidecar rebuild 0.47 s at 10,000 concepts; point-in-time reads and reverts around 3 to 5 ms; 28 MB total storage.
- Working end-to-end prototype of the no-model lifecycle: harvest, gate (including detection of a tampered evidence blob), merge, SCD2 derivation, as-of read, search, provenance verification, and rollback. All nine checks pass.
- A registered seven-question evaluation plan, including tokens-to-correct-answer against full-context loading and a gate-efficacy testbed with planted prompt injections, for which no public corpus exists.
Why this way
The individual technologies are deliberately old: OKF, Git, content addressing, SCD2, SQLite. The claim is about the joints. Agent context is the newest instance of data engineering's oldest questions, and the trustworthy answer is a data-management answer: lineage, dimensional history, bitemporal semantics, and a governed pipeline. Deleting contextctl leaves a folder of markdown, a Git history, and hashed evidence that any tool can read.