Skip to main content

One-line observability + intelligent LLM routing for Python agents.

Project description

orbitrage

One-line observability + intelligent LLM routing for Python agents.

import orbitrage
orbitrage.init("orb_xxx_yyy")          # one line. that's it.

# now any OpenAI / Anthropic / LangChain call you make is auto-traced
# AND can be auto-routed via:
from openai import OpenAI
client = OpenAI(base_url="https://orbitrage.xyz/api/v1", api_key="orb_xxx_yyy")

What it does

  • Zero-latency observability: non-blocking batch span export — your hot path stays at LLM-call speed, not LLM-call + telemetry RTT.
  • Auto-instruments OpenAI, Anthropic, LangChain, LlamaIndex, etc. via OpenLLMetry under the hood.
  • One endpoint: https://orbitrage.xyz/api/telemetry — auth via your Orbitrage API key.
  • Decorators for grouping multi-step workflows:
from orbitrage import workflow, task

@workflow("checkout_flow")
def checkout(user_id):
    plan = planner.invoke(...)
    out  = executor.invoke(...)
    return formatter.invoke(...)

Install

pip install orbitrage

Per-end-user graphs

If your service handles requests for many end-users (your customers' users), pass user_id so the dashboard can partition spans by user inside one workflow:

orbitrage.init("orb_xxx", user_id=current_user.id)

Every span emitted for the rest of the process is tagged with gen_ai.end_user.id. The Orbitrage dashboard uses it to build per-user flow graphs, cost breakdowns, and routing insights.

For long-running servers that switch end-users between requests, call orbitrage.set_user(user_id) at the start of each request.

The workflow your spans show up under is determined by the API key — each key is minted for one workflow from the dashboard. No app_name to pick.

Redacting prompts (opt-out)

Prompt + completion text is captured by default so it renders in the Orbitrage dashboard. To redact content (token counts, costs, and routing decisions still flow):

orbitrage.init("orb_xxx", capture_content=False)

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

orbitrage-0.4.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

orbitrage-0.4.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file orbitrage-0.4.1.tar.gz.

File metadata

  • Download URL: orbitrage-0.4.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for orbitrage-0.4.1.tar.gz
Algorithm Hash digest
SHA256 37f4598c9da2cae2fac70a2428a6c86c37497dd9dfee7f47f2c88add3b9e9327
MD5 fbd65ce771ea2d85bc832ca18f8b2ef3
BLAKE2b-256 cef40d81cc31beac197ddd06ffce7d91cbc95389ffe98ac65f81bcdeb29149a4

See more details on using hashes here.

File details

Details for the file orbitrage-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: orbitrage-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for orbitrage-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9e0eefd198254c54623eda0d89ad92741450ca0c42c8ce047355d501e0a5ddc
MD5 9f9d50109588b0ae731d5be683ffb96e
BLAKE2b-256 21679b10f700bbbac55d19754f6fab3ed723a078b11c13eaf61216f695c4fb7a

See more details on using hashes here.

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