
Context coherence for changing information
Co2 is an embedded library for dependency-aware context validity and selective recomputation. When an input changes, it helps your application identify what remains valid and what needs attention.
Problem
Concurrent agents may finish work after the information behind it has changed. Co2 captures versioned dependencies, rejects stale publications, and produces a plan for affected artifacts. Independent artifacts can remain reusable when the dependency contract supports it.
What Co2 does
- Tracks versioned resources, immutable artifacts and dependency provenance.
- Validates complete captured invocation snapshots when results are published.
- Propagates invalidation and produces execution-aware dispositions.
- Provides a Python SDK backed by the authoritative Rust Core.
What your application owns
The host supplies complete accessible context and accurate versions, retains the underlying data, and owns scheduling, routing, tool execution and external effects. A plan is a point-in-time classification, not an authorization or a transaction.
Start here
Install context-coherence from PyPI using the installation guide. Run the standalone example there, or use a source checkout for the synthetic lending quickstart. Continue with core concepts and the architecture.
Conservative by design
Invocation-level dependency tracking is the default. Structured declarations rely on trusted host assertions; ordinary runtime observation does not prove that ambient access was absent. Probabilistic recomputation requires explicit policy permission. See known limitations.

