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's Included
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.
Out Of Scope
- Capturing live desktop, browser, OCR, vision, or network streams.
- Deciding freshness, anomaly, prioritization, or policy rules over time.
- Dispatching actions back into an app or browser.
- Hosting dashboards, audit timelines, or compliance exports.
Those responsibilities belong in whichever runtime, adapter, or product embeds the snapshot contract.
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