Skip to content

About

Versioned evidence memory for agent runtimes, built in Rust and SQLite.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

KairoTensor. Evidence changes. Decisions should respond. An abstract diagram of evidence paths branching through time.

KairoTensor

Evidence-grounded revision for agent memory. A Rust and SQLite research prototype for deciding when an agent's stored work remains eligible after its declared evidence changes.

Read the paper · Inspect the evidence · Explore the contracts · Run the examples

Contract CI

Alejandro Castellanos · Independent Research
AI × Epistemics Research Sprint, November 2026 · Trust Infrastructure

Research question
When evidence changes, can an agent retire conclusions that have lost their declared support, preserve work that remains eligible, and account for the cost of correction?

The moment a decision goes stale

A deployment agent reads a test report, judges the result, and chooses a release plan under a policy. Then the policy changes.

The plan needs revision. The test-report judgment may still be reusable under an explicit contract. If the report itself is replaced, that judgment needs fresh computation. If support disappears, the appropriate outcome can be unsupported; withdrawal does not establish the opposite proposition.

KairoTensor records that distinction at the execution boundary. It captures ordered evidence occurrences, freezes the adapter request, checks publication and subsequent access, and retains usage when attempted work becomes stale or invalid.

Five stages: evidence occurrences, admission in an actor and scope, frozen attempt and request, claim and settlement, and current eligibility. Evidence changes trigger new checks; incurred usage and unresolved holds remain recorded.

Conceptual lifecycle, not a performance plot. Timed recovery has additional reserve, claim and runtime checks; a diagram or stored receipt grants no dispatch authority.

What the system contributes

Layer Implemented behavior Contract
Evidence and eligibility Distinct acquisition occurrences, scoped admissions, current-read checks and explanations without payloads. Current eligibility
Atomic correction Expected-epoch admission batches; changed support verdicts publish once against the final view. Unchanged verdicts retain their attempt and charge. Atomic correction
Explicit reuse Same-branch reuse of an accepted model response with matching versioned contract, ordered candidates/inputs, request bytes and admission history. Scoped model reuse
Execution and accounting Frozen requests, token reservations, durable send claims and deadline checks. Potentially sent work retains its hold until reconciliation permits settlement. Runtime boundary
Replay and policy Authorized decision export, offline recorded validation, and evaluated policy activation with revision checks. Decision replay · Policy promotion

These are application contracts over declared dependencies. Eligibility does not establish truth, authenticate the source, discover omitted inputs, or reveal what a model internally attended to. The embedding runtime authenticates actors and diagnostic access; the caller validates outputs and reports usage. A historical accepted receipt does not grant current access.

What we measured

The paper reports the frozen source 20fab84. Later reliability features are integrated into the current repository and remain separate from those measurements.

Experiment Observation Interpretation and limit
Atomic revision 13.46× median paired edit-time speedup for 32 dense edits across 128 rules, versus per-branch revision; six paired trials. The lighter full scan had the lowest total time in all 30 matched trials. History contracts differ. Protocol and samples
One model correction 193 vs 404 tokens, one new call versus two; both routes produced the same checked plan. Replacing the report forced fresh judgment. One synthetic observation per route after a prompt revision. The earlier prompt produced a rejected error. No estimate of typical savings. Prompts and traces
Frozen recovery 0/6 held-out successes for each of three policies. All responses violated the strict JSON contract; all retry receipts were late. Policies replayed shared trajectories. These are failures of this model/validation/deadline arrangement, not independent policy arms. Recorded evaluation

A later controlled correction pilot reports four synthetic changes: post-change repair used four calls and 751 reported tokens; fresh recomputation used six calls and 1,167 tokens. It uses a different model/runtime, is outside the paper, and does not establish population accuracy or latency savings.

The evidence supports a working mechanism, measured implementation tradeoffs, and bounded examples of reuse. It does not establish generally more accurate or trustworthy agent decisions.

Run it locally

Use the pinned Rust toolchain in rust-toolchain.toml, Cargo, and a C compiler for bundled SQLite. These examples use deterministic fixtures and make no model or provider calls:

cargo run --locked --example withdrawal
cargo run --locked --example selective_revision
cargo run --locked --example incident_store_bridge

In withdrawal, two shelf reports initially support a total of 12. Withdrawing the second report makes the old total unavailable for current reads and resume. A fresh attempt returns 8. Work that finished too late remains in the ledger: five additions across the three attempts.

For the full local contract suite and the independent reference/oracle checks:

cargo test --locked --all-targets
python3 -m unittest discover -s reference -p test_memory.py
python3 reference/belief_oracle.py

The CI workflow also runs the Python scripts and fixture integration stages across pinned stable, upcoming and previous runtime lanes. The badge links to current results; fixture passes are not live model-performance evidence. On this owner's workstation, use the qualified launcher and storage workflow before heavy builds.

Why this is an epistemics problem

An answer can remain in memory after its justification changes. Durable provenance helps identify the supplied evidence; revision rules determine which saved work may still be used. KairoTensor studies their integration with exact model requests, conservative continuation checks and accounting for failed or superseded work.

This builds on established ideas in truth maintenance and assumption-based truth maintenance. The contribution under study is an execution-boundary integration, not a new truth-maintenance formalism. See the paper's related work and limitations.

Research map

If you want to… Start here
Review the sprint submission Paper · Editable manuscript · Reviewer guide
Trace a claim to raw evidence Evidence index · Benchmark CSVs · Evaluation records
Understand or embed the Store Contract guide · Documentation index
Inspect the semantic integration Store-backed incident bridge · Frozen workload
Audit later reliability work Review guide · Dated submission status

Next research steps are controlled comparisons after evidence changes, equally durable baselines, broader task families, and independently measured model execution. Hosted adapters and AutoScientist work do not become paper results merely by existing or finishing.

Authorship and disclosure

Alejandro Castellanos confirms that no KairoTensor-specific ideas, code or experiments predate the 13–15 November 2026 sprint. Third-party dependencies and prior work remain identified in their manifests and citations. AI assistance supported development and writing; the author is responsible for the claims and submission. See the paper's provenance, ethics and LLM usage statements.

About

Versioned evidence memory for agent runtimes, built in Rust and SQLite.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages