These examples show how Context Compiler state changes application behavior at runtime.
Each example focuses on an enforcement point where saved premise and policy affect what a host allows, routes, retrieves, builds, or executes.
The core library lives in
context-compiler.
Directive recognition can be added with
context-compiler-directive-drafter,
but that layer is optional. This package is the examples and integration
patterns layer.
context-compiler defines the authority contract.
context-compiler-directive-drafter can optionally help acquire and draft
authority, but it is not the authority layer.
This examples package shows where authority is enforced.
Prompt reinjection influences model behavior. Context Compiler influences runtime behavior.
- Checkpoint continuation: persisted confirmation and resume flows change host behavior across turns or requests
- Execution authorization: protected host actions execute only when authoritative state allows them
- Gateway middleware: the host allows, blocks, or routes requests before downstream work runs
- Prompt construction: the host builds different request or prompt payloads from authoritative state
- Retrieval filtering: the host changes which documents are eligible or relevant before returning results
- Schema selection: the host picks different workflow or response schemas from authoritative state
- Tool gating: the host changes which tools are visible or executable at runtime
Python also includes reference integrations for runtime-specific behavior after the generic examples.
Open a reference integration when you want to see the same kind of runtime behavior on a specific host or framework surface.
Start with the generic example first, then use the Python reference integrations to inspect a runtime-specific path:
- python/reference_integrations/litellm_proxy/README.md
- python/reference_integrations/openwebui_pipe/README.md
To explore or run an example, use a repository checkout:
- Clone
context-compiler-example-integrations. - Choose a generic example or a reference integration.
- Open that example's README.
- Follow the example-specific setup, runtime, and validation instructions.