Skip to content

nullrunio/nullrun-sdk-python

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages