Introduction

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 getHow it helps
Cost per successful outcomeKnow exactly what it costs to resolve a ticket, summarize a document, or complete any AI workflow
Cost per failed outcomeIdentify wasted spend — money spent on runs that never produced value
Workflow-level dashboardsCompare cost, latency, and success rate across all your AI workflows
Span-level drilldownInspect every LLM call, tool call, and data lookup within a single run
Retry cost attributionSee the total cost of retries that led to a successful outcome
Customer economicsUnderstand 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)
  1. Install the SDKpip install botanu or npm install @botanu/sdk
  2. Call enable() — one line at app startup, before other imports
  3. Decorate workflows — wrap business logic with @botanu_workflow (provides event_id and customer_id)
  4. Emit outcomes — call emit_outcome("success") or emit_outcome("failed") at decision points
  5. 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., ticket TKT-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.

  • 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

LanguagePackageStatus
PythonbotanuGeneral availability
TypeScript / Node.js@botanu/sdkGeneral availability
JavaComing soon
GoComing 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.