StatePlane

OpenAI Context Demo

This is the first end-to-end workflow that goes beyond pure compile receipts.

It shows:

  1. provider-neutral compilation through context_core
  2. deterministic OpenAI request rendering through provider_openai
  3. optional live execution through the OpenAI Responses API

Dry-Run Mode

uv run --all-packages --all-groups --python 3.13 python examples/openai_context_demo/demo.py

Dry-run mode prints:

  1. request summary
  2. selected context
  3. excluded context
  4. rendered OpenAI request
  5. token allocation
  6. compile hashes

This is the fastest way to verify what StatePlane is actually doing.

JSON Mode

uv run --all-packages --all-groups --python 3.13 python examples/openai_context_demo/demo.py --format json

JSON mode emits a typed OpenAIContextDemoResult that bundles:

Live Mode

OPENAI_API_KEY=... uv run --all-packages --all-groups --python 3.13 python examples/openai_context_demo/demo.py --live

Live mode is opt-in on purpose:

What It Does Not Do

This example is still intentionally narrow. It does not:

It is the first concrete proof that StatePlane can control and explain a real provider request.