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.5.0.tar.gz (8.0 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.5.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for orbitrage-0.5.0.tar.gz
Algorithm Hash digest
SHA256 7f0db533d9730ab8689be76199ff1c0684f7086a7c0e55949525791b0bde9c1b
MD5 8a01eaaf600116820b94e789810aa3ef
BLAKE2b-256 15fb8bb862e065aa90abcff5145bdc64d9e95983322b4aa9d96d3df003228536

See more details on using hashes here.

File details

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

File metadata

  • Download URL: orbitrage-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b98b48821f897834da6f4be195f82c48512d8892119e4437f75799144e5d674
MD5 2c2b963d956a4bbe75db573d042504db
BLAKE2b-256 a5b496ceab4248101af2c22d4e371b36b8de1659c0c259dab42c932b75509d33

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