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. Set BOTANU_API_KEY in your environment
  3. Wrap your agent — one botanu.event(...) block around the entry point provides event_id, customer_id, and workflow
  4. (Optional) Annotate with diagnosticsbotanu.emit_outcome(...) stamps value_type, reason, error_type, etc. onto the run. Event outcome itself is resolved server-side from eval verdict / HITL / SoR
  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 inside the event scope — no extra code.

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.

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.