Open Source
$0
The open source SDK, inside your own process. No account needed.
- Limits and loop detection per process
- Open source, install from PyPI
- Runs offline
For SaaS companies with AI features
KazenAI checks every model call against that customer’s limit before it runs. Over the limit, the call doesn’t happen, and you get a receipt.
AI sold at a flat price has one weak spot: a few customers, or one stuck agent, can cost more than they pay.
“Today, a quick chat question and a multi-hour autonomous coding session can cost the user the same amount.”
That is why GitHub moved Copilot to token billing. GitHub · Anthropic added weekly Claude Code limits for users running it around the clock. The Decoder
An agent that loops retries the same expensive call all night, and nobody approves each step. OWASP lists it as “unbounded consumption”. OWASP
That gap is the buying reason. If your current stack already closes it for the workflow that matters, you don’t need another product. If it doesn’t, start there, not with a platform migration.
Set for the whole organisation or project. One customer’s spike hits every customer.
Some gateways can now budget per customer, but every call has to route through them, and not all hold under parallel calls.
Report spend after it happened. The next call still goes out.
Cap one call, not what a customer spends across a day or a month.
A limit per customer, checked before every call, on one shared ledger.
Think of it as a prepaid card limit for each customer’s AI: when it’s used up, the AI stops instead of your margin.
Agent FinOps makes one spending decision before each model call and keeps a run receipt that explains it. Your billing system stays the source of truth for invoices and entitlements.
| Decision | Reason | Customer | Workflow | Outcome |
|---|---|---|---|---|
| Refused | Over this customer’s limit | cust_big | support-reply | Did not run |
| Refused | New calls were paused | cust_acme | support-reply | Did not run |
| Allowed | Within limits | cust_globex | kb-search | Ran and settled |
Wraps the OpenAI or Anthropic client you already use in Python. Works alongside LiteLLM or your existing gateway: with a gateway, either your application or the gateway owns spend accounting for each call, never both, so retries are not counted twice.
Calls go straight from your app to your provider. Prompts and completions are not sent to KazenAI by default. Run receipts accept OpenTelemetry traces, so they sit next to the observability you already run.
By default, if a limit can’t be confirmed, the call doesn’t run; you can choose to let it through. Uncertain spend stays pending until it’s reconciled, never recorded as zero.
Shadow mode never blocks. After week one your CEO can see cost per customer, who would have hit a limit, and a receipt for every call.
Instrument a supported path for model calls. Pass customer (business_subject_ref), feature, workflow, and run identifiers so every event and decision shares business context.
Set limits for the customers, plans and workflows you enforce, choose what run receipts may show, and review access, retention, and provider pricing.
Start in shadow, test denials, then enforce and apply the pattern to additional workflows.
Visibility and enforcement are different. Capturing a trace does not stop a call.
Limits and loop detection inside one process, with no account and no network calls. When you want limits shared across every worker and customer, book a margin review.
Also open source: KazenAI core (GitHub) and the event schema.
Prices are in USD and exclude applicable taxes, fees from model providers, and customer infrastructure. Production usage limits, support, onboarding milestones, expansion scope, renewal, and cancellation terms are agreed in writing before signing. Additional workflows are scoped around usage, data retention, integration, and support, not treated as a separate product.
You should, if they already give you limits per customer and per workflow, a spending decision before each call, and the evidence behind the run you need to investigate. KazenAI is for the workflow where that connection is still missing. We review your framework, gateway, billing system, provider API, authentication, and telemetry before confirming support; replacement is not the default.
No. Agent FinOps gives you cost by customer and workflow, and exports it, to inform pricing, allowances and upgrade points; it does not manage entitlements, calculate customer invoices, or charge your users. Your billing system remains the source of truth.
No. There is no universal guarantee. Coverage depends on the instrumented call path, estimates, concurrent requests, and provider billing behavior. Charges already in flight or never observed cannot simply be undone. Stopping new calls is not the same as cancelling or safely resuming an agent.
Supported today: Python, OpenAI Chat Completions and Responses, Anthropic Messages, sync and async, with or without streaming; LangChain, LangGraph, CrewAI and LiteLLM. These paths are verified against the live OpenAI and Anthropic APIs as well as synthetic transports, including workflows with several steps that mix models under one shared limit. We confirm your exact stack before rollout. Not supported: OpenAI Realtime, Bedrock/Vertex wrappers, AutoGen.
Production sets up your first workflow with you. To have the whole integration done for you, see Dhavan’s consulting work.
A description of your workflow, stack, and problem is enough to start, as long as it isn’t confidential. Do not email credentials, prompts, production traces, or customer data. Capture, hosting, access, retention, and deletion requirements are agreed before diagnostic data is shared.
Tell us what your AI feature does, how customers pay for it, and where its cost becomes hard to predict. In 30 minutes Dhavan will look at your cost per customer with you, discuss fit, and walk you through the hosted demo.
You talk to Dhavan Shah, the founder.