TokenSentineltokensentinelTokenSentinel home

For AI agents

Real-Time Cost Guardrails for LLM Apps

Stuck loops and retries drain budgets unnoticed. Detect and halt runaway agents mid-execution before the invoice lands.

Get started freeDocs

works with

Your LLM apps

also

Claude Code · beta

starts

Free · offline

terminal·tool_loop

Mid-run tool loop — confidence % & dollars wastedconfidence % · $ wasted

The problem

Token waste shows up late.

If you run AI agents, uncontrolled spend is a surprise no one wants twice.

  • Agents get stuck—and the meter keeps running

    Runaway agents can silently burn thousands overnight. Too often, your first alert is a message from Finance.

  • Observability is purely reactive

    Dashboards are great for post-mortems but they fail to stop an agent actively burning tokens in real time.

  • Hard to see which agent is the problem

    When many agents share spend, one runaway job is easy to miss until the invoice lands.

What you get

Stop paying for noise. Keep shipping agents.

Detect infinite loops and redundant calls

Identify the specific failure patterns that turn routine tasks into massive billing spikes.

See confidence and approximate cost

Each signal says how sure we are and roughly what it burned.

Built to complement your tracing

TokenSentinel wraps your model client to handle the active interventions your observability dashboards cannot.

Zero data egress

The tool runs entirely in-process so your API keys, prompts, and payload data never leave your infrastructure.

How it works · Docs

Get started

Three steps in your app.

Watch first. React when waste shows up.

01

Install

Add the Python package.

$pip install token-sentinel[anthropic]

Also: openai, gemini, bedrock, all

02

Wrap your client

One line around the SDK you already use.

agent.py
python
from token_sentinel import Sentinel
import anthropic

sentinel = Sentinel(project="my-agent", mode="log")
client = sentinel.wrap(anthropic.Anthropic())

03

Implement active circuit breakers

Use a simple callback to trigger programmatic guardrails the moment costs spike.

agent.py
python
@sentinel.on_waste
def handle(event):
    print(f"Waste: {event.type}")

GitHub · Claude Code plugin · beta

Enterprise & Teams

Running many agents in production?

Let's talk about scaling your agent infrastructure safely. Tell us how agents operate in your stack and where your current observability blind spots are.

Enterprise & Teams15-Min Founder Session

Book a 1-on-1 demo with our engineering team.

Schedule a 15-minute 1-on-1 walkthrough with our founder about your agent stack and where spend is leaking.

Partner Program