botanu Documentation
botanu is the AI cost intelligence platform. It captures every LLM call, tool invocation, and workflow execution in your AI application — then turns that raw telemetry into actionable cost-per-outcome metrics.
If you’re building AI-powered products, you need to answer: “What does it cost to produce a successful outcome?” botanu gives you that number, broken down by workflow, customer, model, and time period.
Why botanu?
Most observability tools show you traces. botanu shows you business outcomes tied to cost.
| What you get | How it helps |
|---|---|
| Cost per successful outcome | Know exactly what it costs to resolve a ticket, summarize a document, or complete any AI workflow |
| Cost per failed outcome | Identify wasted spend — money spent on runs that never produced value |
| Workflow-level dashboards | Compare cost, latency, and success rate across all your AI workflows |
| Span-level drilldown | Inspect every LLM call, tool call, and data lookup within a single run |
| Retry cost attribution | See the total cost of retries that led to a successful outcome |
| Customer economics | Understand unit economics per customer across your AI features |
How it works
Your App → botanu SDK → ingest.botanu.ai → Dashboard
(2 lines) (auto- (OTLP collector) (app.botanu.ai)
instruments
LLM calls)- Install the SDK —
pip install botanuornpm install @botanu/sdk - Call
enable()— one line at app startup, before other imports - Decorate workflows — wrap business logic with
@botanu_workflow(providesevent_idandcustomer_id) - Emit outcomes — call
emit_outcome("success")oremit_outcome("failed")at decision points - View dashboards — cost, latency, and outcome metrics appear in real-time at app.botanu.ai
LLM calls to OpenAI, Anthropic, Cohere, Google, Mistral, and Groq are auto-instrumented — no code changes needed beyond enable().
The data model
botanu organizes your AI operations into four levels:
Workflow → Event → Run(s) → Spans- Workflow: A category of AI operation (e.g., “Customer Support”, “Doc Summarization”)
- Event: One business unit of work, identified by
event_id(e.g., ticketTKT-1234) - Run: One execution attempt. Retries create multiple runs under the same event
- Span: One operation within a run — an LLM call, database query, or tool invocation
Learn more in Concepts: Workflows & Events.
Quick links
- Quickstart — get traces flowing in 5 minutes
- Python SDK — installation, decorators, outcomes
- TypeScript SDK — installation, wrappers, outcomes
- AI-Assisted Setup — use Claude Code, Cursor, or Copilot to instrument your project automatically
- Concepts — understand workflows, events, runs, and spans
- API Keys — create and manage your API keys
- Cost Model — how botanu computes model, data, and infra costs
Supported languages
| Language | Package | Status |
|---|---|---|
| Python | botanu | General availability |
| TypeScript / Node.js | @botanu/sdk | General availability |
| Java | — | Coming soon |
| Go | — | Coming soon |
Open standard
botanu is built on OpenTelemetry. Your traces use standard OTLP format, W3C TraceContext propagation, and W3C Baggage. There’s no vendor lock-in — if you stop using botanu, your instrumentation still works with any OTel-compatible backend.