Skip to main content

OpenTelemetry-native run-level cost attribution for AI workflows

Project description

botanu SDK for Python

License

botanu is platform that helps AI companies understand the real cost of their AI features per customer, enabling outcome-based pricing and smarter scaling. This SDK is built on OpenTelemetry for event-level cost attribution for AI workflow. For more email- deborah@botanu.ai

Getting Started

An event is one business transaction — resolving a support ticket, processing an order, generating a report. Each event may involve multiple runs (LLM calls, retries, sub-workflows) across multiple services. By correlating every run to a stable event_id, botanu gives you per-event cost attribution and outcome tracking without sampling artifacts.

pip install botanu

One install. Includes OTel SDK, OTLP exporter, and auto-instrumentation for 50+ libraries.

from botanu import enable, botanu_workflow, emit_outcome

enable()  # reads config from environment variables

@botanu_workflow("my-workflow", event_id="evt-001", customer_id="cust-42")
async def do_work():
    result = await do_something()
    emit_outcome("success")
    return result

Entry points use @botanu_workflow. Every other service only needs enable(). All configuration is via environment variables — zero hardcoded values in code.

See the Quick Start guide for a full walkthrough.

Documentation

Topic Description
Installation Install and configure the SDK
Quick Start Get up and running in 5 minutes
Configuration Environment variables and options
Core Concepts Events, runs, context propagation, architecture
LLM Tracking Track model calls and token usage
Data Tracking Database, storage, and messaging
Outcomes Record business outcomes for ROI
Auto-Instrumentation Supported libraries and frameworks
Kubernetes Zero-code instrumentation at scale
API Reference Decorators, tracking API, configuration
Best Practices Recommended patterns

Requirements

  • Python 3.9+
  • OpenTelemetry Collector (recommended for production)

Contributing

We welcome contributions from the community. Please read our Contributing Guide before submitting a pull request.

This project requires DCO sign-off on all commits:

git commit -s -m "Your commit message"

Looking for a place to start? Check the good first issues.

Community

Governance

See GOVERNANCE.md for details on roles, decision-making, and the contributor ladder.

Current maintainers are listed in MAINTAINERS.md.

Security

To report a security vulnerability, please use GitHub Security Advisories or see SECURITY.md for full details. Do not file a public issue.

Code of Conduct

This project follows the LF Projects Code of Conduct. See CODE_OF_CONDUCT.md.

License

Apache License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

botanu-0.1.dev63.tar.gz (36.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

botanu-0.1.dev63-py3-none-any.whl (42.5 kB view details)

Uploaded Python 3

File details

Details for the file botanu-0.1.dev63.tar.gz.

File metadata

  • Download URL: botanu-0.1.dev63.tar.gz
  • Upload date:
  • Size: 36.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for botanu-0.1.dev63.tar.gz
Algorithm Hash digest
SHA256 559a663b21894b0f6f69cb17cde3961ae34ec84ca4ec6cf4b67f327285002e7f
MD5 6810aeec569ea8f5ed1bf84c7cef85c4
BLAKE2b-256 2b95b355d6ab9a811bf0f2670d35a278b6b81e19801c116eb75515b6ccdf9b19

See more details on using hashes here.

Provenance

The following attestation bundles were made for botanu-0.1.dev63.tar.gz:

Publisher: release.yml on botanu-ai/botanu-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file botanu-0.1.dev63-py3-none-any.whl.

File metadata

  • Download URL: botanu-0.1.dev63-py3-none-any.whl
  • Upload date:
  • Size: 42.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for botanu-0.1.dev63-py3-none-any.whl
Algorithm Hash digest
SHA256 46c2289d1f5941b8cfdd6b324653797b877e9d6a344368d92f2d7341162071b9
MD5 1290f8d63604c184b780fac113030f45
BLAKE2b-256 998cf8db7710d82e6aa18f4392a1c666d31e9927d007b9879f30379da6eb61ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for botanu-0.1.dev63-py3-none-any.whl:

Publisher: release.yml on botanu-ai/botanu-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page