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_usecontent) - 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.
Metadata
Release files for uptimes-agents 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| uptimes_agents-0.1.3.tar.gz | 13.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uptimes_agents-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.3 kB
Release files / uptimes_agents-0.1.3.tar.gz
| Download URL | uptimes_agents-0.1.3.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89636e98c077b3f6653343da278d9aaa3824d3fe7150c2d846d185b297909e9f
|
|
BLAKE2b-256 checksum How to use checksums |
7f18662140ec04e5a6991f9a9e7a7f5183389ba22572f079b3b1de8035a5f7b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / uptimes_agents-0.1.3-py3-none-any.whl
| Download URL | uptimes_agents-0.1.3-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48d5e6fe19f8f1e9df3da095e1fe039c0042d4cf14c222baeb98853a061705f7
|
|
BLAKE2b-256 checksum How to use checksums |
d6ae0c63478cd4d8e2bdbee7d92d6eec224217b02da902572fbee4da883174f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|