Working examples for the nullrun Python SDK.
Each example is a self-contained, runnable file. The intent is to show the smallest possible change to add enforcement to a common agent framework.
pip install nullrun
export NULLRUN_API_KEY=nr_live_...Get an API key from the NullRun dashboard.
| File | Framework | What it shows |
|---|---|---|
raw_openai_basic.py |
raw OpenAI | @protect on a single LLM call |
openai_agents_basic.py |
OpenAI Agents SDK | @protect on a multi-step agent run |
langgraph_basic.py |
LangGraph | NullRunCallback inside a graph |
cost_cap_demo.py |
any | Demonstrates a hard budget cap that halts the agent |
export NULLRUN_API_KEY=nr_live_...
python examples/raw_openai_basic.pyAll examples are read-only — they do not modify the gateway state. They
will create events in your dashboard under the examples tag.
PRs welcome. Keep each example under 80 lines. No external state beyond the NullRun API key.