Skip to main content

NullRun Python SDK — enforcement gateway for AI agents. Circuit-breaker, policy enforcement and observability for OpenAI, Anthropic, LangGraph, LlamaIndex, CrewAI, AutoGen.

Project description

PyPI version Python versions License Downloads

CI Coverage Stars Documentation

nullrun

Enforcement gateway for AI agents.

Stop runaway agents before they burn the budget. NullRun sits between your code and your LLM calls, tracking cost and tool usage so a single agent can't take down your account.

⚠️ Status: alpha. The public API may shift between minor versions. Pin your dependency and read the CHANGELOG on every upgrade.


Install

pip install nullrun

Quick start

Wrap any function that calls an LLM with @protect and you're done — cost and tool calls are tracked automatically.

from nullrun import protect

@protect
def my_agent(prompt: str) -> str:
    return call_my_llm(prompt)

Or drop in zero-code auto-instrumentation for the LLM libraries you already use. Pass your API key once at startup; supported vendors are detected automatically.

import nullrun
import openai

nullrun.init(api_key="nr_...")

client = openai.OpenAI()
client.chat.completions.create(...)   # tracked, no other changes needed

Configuration

Two environment variables cover almost every setup:

Variable Default Purpose
NULLRUN_API_KEY Your NullRun API key. Required.
NULLRUN_API_URL https://api.nullrun.io Backend base URL (override for self-hosted).

Everything else — batching, transport tuning, mTLS, vendor-specific options — lives in the docs:

Examples

A growing set of runnable examples (LangGraph, OpenAI Agents, raw OpenAI, Anthropic, multi-agent) is maintained in a separate repo so you can copy and adapt without cloning the SDK source:

Documentation

Concept guides, integration recipes, and the full Python API reference:

Project & organisation

This SDK is one part of the NullRun platform.

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nullrun-0.13.5.tar.gz (261.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nullrun-0.13.5-py3-none-any.whl (237.5 kB view details)

Uploaded Python 3

File details

Details for the file nullrun-0.13.5.tar.gz.

File metadata

  • Download URL: nullrun-0.13.5.tar.gz
  • Upload date:
  • Size: 261.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nullrun-0.13.5.tar.gz
Algorithm Hash digest
SHA256 9030c397d94d91c8ed8220ac73b594bc650e2f39d8e7d6d178df3ca134fc46a9
MD5 45b808f9f38d0f310b67f028f00b9692
BLAKE2b-256 df6101f8ce5b4a3e48b91413ef2ff3b3d0d7e9ec7969eed7959f54d6a75d80a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for nullrun-0.13.5.tar.gz:

Publisher: publish.yml on nullrunio/nullrun-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nullrun-0.13.5-py3-none-any.whl.

File metadata

  • Download URL: nullrun-0.13.5-py3-none-any.whl
  • Upload date:
  • Size: 237.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nullrun-0.13.5-py3-none-any.whl
Algorithm Hash digest
SHA256 31afd9a407ce9ee23fef7a791eb7c61e4b636e334137432e625595484faf82c0
MD5 9d91503570f7391b42ca71059da4c7dc
BLAKE2b-256 2b719ff9d1c80b8463072e36e5312902d846b42b35e5e9a4dc8775f10ec190de

See more details on using hashes here.

Provenance

The following attestation bundles were made for nullrun-0.13.5-py3-none-any.whl:

Publisher: publish.yml on nullrunio/nullrun-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page