cel-context
Portable context snapshots for AI agents.
cel-context gives agents, tools, and runtimes a shared way to describe
software state. Any source can emit ContextElements, and any consumer can read
the resulting ScreenContext without depending on a specific browser, desktop,
OCR, accessibility, or monitoring stack.
What It Owns
ContextElement— one UI, app, log, or source-derived fact.ScreenContext— one snapshot of app/window state and context elements.ContextSource— source labels such as accessibility, CDP, native API, OCR, vision, merged.ContentRole— prompt-injection-aware classification.ContextReference— resilient targeting data that survives ephemeral IDs.ContextContribution/ContextMerger— generic source contribution merge mechanics.
What It Does Not Own
- live cortex operation
- runtime freshness / anomaly policy
- action dispatch
- policy enforcement
- monitoring dashboards or compliance exports
Those live in the commercial Cellar/Dilipod runtime unless explicitly opened later.
Example
The example constructs a snapshot from caller-provided ContextElements. Live
capture belongs in runtime/source crates that emit the same contract shape.
Minimal Element
use ;
use HashMap;
let element = ContextElement ;
License
Apache-2.0