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.dev68.tar.gz (47.3 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.dev68-py3-none-any.whl (56.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: botanu-0.1.dev68.tar.gz
  • Upload date:
  • Size: 47.3 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.dev68.tar.gz
Algorithm Hash digest
SHA256 3cbbb213b892c1562fb5333caf755f93137ca7a872b46662e978af717f4f57b5
MD5 642b8dd39dacff7053e80e4f762e2479
BLAKE2b-256 142350f5d7f14be14bd1608959d2a496260b3b18a3e646d59a68e0f6e6c8755a

See more details on using hashes here.

Provenance

The following attestation bundles were made for botanu-0.1.dev68.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.dev68-py3-none-any.whl.

File metadata

  • Download URL: botanu-0.1.dev68-py3-none-any.whl
  • Upload date:
  • Size: 56.6 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.dev68-py3-none-any.whl
Algorithm Hash digest
SHA256 2f75859999dc3ee0f2a2bdd5dbb54b81090261d5034a6d5b3c44f0670365a1e3
MD5 6fca839e7353b3aa67f1d58b485a4e34
BLAKE2b-256 95bbe615b0b1746a48afc904cfb571094f89c68a28a4f55438cc696fe4d48c5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for botanu-0.1.dev68-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