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.2.tar.gz (12.4 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.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: orbitrage-0.4.2.tar.gz
  • Upload date:
  • Size: 12.4 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.2.tar.gz
Algorithm Hash digest
SHA256 8fb42ea3d67f48af1fc6096fce5b4c32a4cd959639e2c5690769b38fd0c6c098
MD5 a172a38ee2b9e476d679b3e97752de69
BLAKE2b-256 6de661f1af56fa9bd7480a66a643027c58644b7ffb08c8efa7f34508e3b7b321

See more details on using hashes here.

File details

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

File metadata

  • Download URL: orbitrage-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 11.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f5f767bb974921154ccab2ee792eff205c3339213cc663e102517a74577b54d3
MD5 d926198c90d237fa0678f33ac4288887
BLAKE2b-256 a0a27f43cb049ec64fff6b46c9a6d6e65aced492fb49c1c171bb1d62477bc79f

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