Introduction
TokenJam is the open-source observability tool for autonomous AI agents. Local-first, OTel-native, no signup.
Your agent sends emails, writes files, calls APIs, and spends your money, all while you’re away. Most observability tools were built for LLM developers building chat products. TokenJam was built for agents with real-world consequences: real-time cost tracking, safety alerts, behavioral drift detection, all running locally on your machine. No cloud. No signup. No surprises.
What you get
Real-time cost tracking. Every LLM call is priced as it happens, by agent, model, session, and tool. Budget alerts fire before you hit the limit, not after.
Safety alerts. Configure any tool call as a sensitive action (send_email, delete_file, submit_form) and get notified instantly via ntfy, Discord, Telegram, webhook, or stdout.
Behavioral drift detection. tj builds a statistical baseline from your agent’s real behavior and alerts when something deviates: a prompt tweak, a model update, a dependency bump. No LLM required.
Tool output validation. Declare a JSON Schema for your tools or let tj infer one automatically. Schema violations are caught the moment they occur.
100% local. DuckDB. Local REST API. No cloud backend. No API key for TokenJam itself. Your telemetry never leaves your machine unless you explicitly export it.
Install
pip install tokenjam
Or pick your install path on the Quickstart.