Skip to content

Control demo

Run KazenAI budget enforcement without provider keys.

Terminal window
git clone https://github.com/kazenai-ai/kazenai-demo-agent.git
cd kazenai-demo-agent
python3.11 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
python -m pip install -r requirements.txt

Pinned packages:

  • kazenai==1.2.0
  • kazen-event-schema==0.6.6
Terminal window
python -m pytest scenarios -q
python examples/02_monitor_fake_provider.py

02_monitor_fake_provider.py wraps a fake OpenAI client with a tiny budget. Expected result: BudgetExceeded and provider_calls: 0.

Hosted examples refuse unless KAZENAI_DEMO_HOSTED=1 is set, and they never ship credentials or real tenant identifiers in the repository.

Terminal window
# Refuses without the gate:
python examples/03_monitor_multisink_hosted.py
  • Pre-dispatch denial works without paid I/O
  • The public install path is standalone (no sibling monorepo required)

It does not prove production savings or provider-invoice exactness. The demo pins 1.2.0; the full supported surface (including async and streaming) is listed in Supported surfaces.