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.0.tar.gz (12.0 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.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uptimes_agents-0.1.0.tar.gz
  • Upload date:
  • Size: 12.0 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.0.tar.gz
Algorithm Hash digest
SHA256 def45446c98a2d9a0efd1320a0f9f2d1c2875f1fae6aeb1e8e64f22e8f64fa09
MD5 b44c9dd89916c93f62d31e645df44e95
BLAKE2b-256 04f7def866c257a1fa53931a1593f9333e26323dd0003846eb8ff7c36a6af9cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uptimes_agents-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b55a999a7cc34b622860f96ed49de496155f3ef9db5da0d03418ccb27b71f543
MD5 0dd855b4827c913fec779c17927ab1d8
BLAKE2b-256 895400ea5b1ede7896193487ca311bb86f28231c33cde6ed0f14474121c57a1b

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