Skip to main content

Uptimes Agents — OpenTelemetry-based observability for AI agents. Three-line init, ships to local uptimes-monitor or direct to api.uptimes.ai.

Project description

uptimes-agents (Python)

OpenTelemetry-based observability SDK for AI agents — three-line install, ships to the local uptimes-monitor daemon or direct to api.uptimes.ai.

Install

pip install uptimes-agents
# Add provider extras for auto-instrumentation:
pip install 'uptimes-agents[anthropic]'    # or [openai], or [all]

Quick start

import uptimes_agents
import anthropic

uptimes_agents.init(service_name="rca-agent")

client = anthropic.Anthropic()
client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=256,
    messages=[{"role": "user", "content": "hi"}],
)
# → one chat span lands in your Uptimes dashboard within ~5s.

Custom spans

For non-LLM work — init() activates auto-instrumentation for known provider SDKs; for everything else, wrap your code in a span:

with uptimes_agents.span("execute_plan", hypothesis="db_slow"):
    ...
    uptimes_agents.current_span().set_attribute("steps_taken", 4)

Configuration

Arg / env var Default Notes
service_name (kwarg) required Becomes agent_name in Uptimes
endpoint / UPTIMES_OTLP_ENDPOINT http://localhost:4318 OTLP/HTTP target
api_key / UPTIMES_API_KEY none Required only on direct-to-cloud
resource_attributes {} Extra OTel resource attrs
auto_instrument_providers True Set False to manage your own instrumentations

Standard OTel env vars (OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) are honored — drop-in for existing OTel-instrumented apps.

Routing modes

Default is via the local monitor: spans go to http://localhost:4318 on the host. uptimes-monitor enriches them with host context, batches, and forwards over a single TLS connection to api.uptimes.ai. No API key needed in your app — the monitor's token stamps org_id.

For containerised environments without a host daemon, point straight at the cloud:

uptimes_agents.init(
    service_name="my-agent",
    endpoint="https://api.uptimes.ai/v1/traces/otlp",
    api_key="<your-org-token>",
)

What gets captured

Auto-instrumentation produces OTel-GenAI spans for every Anthropic / OpenAI LLM call:

  • Provider, model, token usage, cost
  • Latency, time-to-first-chunk, stop reason
  • Tool calls (when the provider returns tool_use content)
  • Input / output content (governable via OTel content-capture toggles)

Custom span(...) blocks produce regular OTel spans you can group by name in the dashboard.

Versioning

V0.1 — Anthropic + OpenAI auto-instrumentation. Bedrock / Vertex / Gemini land in V0.2.

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

uptimes_agents-0.1.1.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

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

uptimes_agents-0.1.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file uptimes_agents-0.1.1.tar.gz.

File metadata

  • Download URL: uptimes_agents-0.1.1.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for uptimes_agents-0.1.1.tar.gz
Algorithm Hash digest
SHA256 97a65a9a05da2188fbe9fb15da4b7de457c3d4feba7be6f37baeb4e56bd9145d
MD5 d1d558a05fb1bf3d4aed8f22493651fc
BLAKE2b-256 c936099882fcc6f03370f3d0f7befad4b3dedb7d462082a4829002bace1436b9

See more details on using hashes here.

File details

Details for the file uptimes_agents-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: uptimes_agents-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for uptimes_agents-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 74f1e34c5da2bc1d5c3e2ddb03c8cebde410a9e8d0fcf95b1091824f052af804
MD5 4b5fe1eaaf676659e6f12299b9a4ac0e
BLAKE2b-256 c4784a46bfcde6be0699f07922a612e92040ed0d87bda6034b41a3c1f87ef16f

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