Skip to main content

Observra — agent telemetry & observability. Observes, captures, and normalizes agent signals in real time.

observra

Framework-agnostic agent behavior analytics.

Project level: Flagship CI Latest release License: Apache-2.0 Python 3.10+

Capture every meaningful agent action (token usage, tool calls, cost, errors) with structured context based on the Common Information Model (CIM).

Zero custom instrumentation per-agent. Answer "what happened, how much did it cost, and was it normal?" for any agent on any framework.

Install

pip install observra

With framework extras:

pip install observra[adk]           # Google ADK
pip install observra[claude]        # Claude Agent SDK
pip install observra[openai-agents] # OpenAI Agents SDK
pip install observra[langchain]     # LangChain / LangGraph
pip install observra[pydantic-ai]   # Pydantic AI

With backend extras:

pip install observra[otel]          # OTel span + log export

Install everything:

pip install observra[all]

Quick Start

Attach observra to your agent framework — no manual logging calls. For Google ADK:

import observra
from google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService

observra.initialize(backend="jsonl", path="telemetry.jsonl")  # pip install observra[adk]
plugin = observra.create_plugin("adk")

runner = Runner(
    agent=root_agent,  # your existing ADK agent, unchanged
    app_name="my-agent",
    session_service=InMemorySessionService(),
    plugins=[plugin],  # the only change — telemetry is now automatic
)

Every LLM call, tool use, and cost lands in telemetry.jsonl, one event per line (representative model_response; real records also carry event_id, trace_id, and host context):

{"timestamp": 1718115781.882, "event_type": "model_response", "framework": "adk", "agent_name": "research-agent", "model_name": "gemini-2.0-flash", "session_id": "s-a1f6c2e3", "library_version": "1.0.3", "data": {"input_tokens": 1240, "output_tokens": 387, "cost_usd": 0.0019, "action": "call_llm", "result": "success"}}

Other frameworks follow the same two-step pattern — see the getting-started guides for Claude, OpenAI, LangChain, and Pydantic AI.

Supported Frameworks

Framework Install Status Captured Events
Google ADK [adk] Stable LLM calls, tool calls, delegation depth, cost
Claude SDK [claude] Stable Tool calls, model responses, session cost
OpenAI Agents SDK [openai-agents] Stable Spans, tool calls, agent handoffs, cost
LangChain / LangGraph [langchain] Stable Chain runs, tool calls, LLM calls, cost
Pydantic AI [pydantic-ai] Stable Agent runs, tool calls, model calls

Backends

Backend Install Description
JSONL (included) Local JSON Lines file (default)
Webhook (included) Generic HTTP webhook POST delivery
Multi (included) Fan-out to multiple backends simultaneously
OTel Spans [otel] Export events as OTel spans via OTLP HTTP
OTel Logs [otel] Export events as OTel log records via OTLP HTTP

OTel Export (Dynatrace, Grafana, etc.)

from observra.backends.otel import OTelExportBackend
from observra.backends.otel_log import OTelLogBackend
from observra.backends.multi import MultiBackend

# Spans only
span_backend = OTelExportBackend(
    endpoint="https://your-collector/v1/traces",
    headers={"Authorization": "Api-Token ..."},
    service_name="my-agent-svc",
)

# Logs only
log_backend = OTelLogBackend(
    endpoint="https://your-collector/v1/logs",
    headers={"Authorization": "Api-Token ..."},
    service_name="my-agent-svc",
)

# Both spans and logs
backend = MultiBackend([span_backend, log_backend])

Key Features

  • Cost tracking — per-session cost with model-specific pricing catalog and threshold alerts
  • PII redaction — automatic secret/PII masking with configurable patterns
  • Non-blocking — drop-oldest queue guarantees zero latency impact on the host agent
  • CIM-normalized — structured events compatible with SIEM/analytics pipelines
  • Safe regex — ReDoS-proof pattern matching via RE2 (optional: [safe-regex])
  • Encryption at rest — AES field-level encryption for sensitive telemetry (optional: [encryption])
  • Prompt injection detection — built-in heuristics for injection attempt classification
  • Observability — get_metrics() / get_stats() for pipeline health introspection
  • Deduplication — automatic event dedup across backends
  • Session context — trace/span/session ID propagation with scoped contexts

All Extras

Extra Dependencies
[adk] google-adk>=1.0.0
[claude] claude-agent-sdk>=0.1.37, tiktoken>=0.7.0
[openai-agents] openai-agents>=0.9.0
[langchain] langchain-core>=1.0.0, langgraph>=0.2.0
[pydantic-ai] pydantic-ai<2.0.0, opentelemetry-sdk>=1.0.0
[otel] opentelemetry-sdk>=1.0.0, opentelemetry-exporter-otlp-proto-http>=1.0.0
[exabeam] requests>=2.32.0
[safe-regex] google-re2>=1.1
[encryption] cryptography>=41.0
[all] All of the above

Documentation

Project sponsor

observra is sponsored by Exabeam. Exabeam contributed the initial code and continues to provide ongoing support and contributions to the project as part of its commitment to security in an increasingly agentic world.

License

Apache 2.0 — see LICENSE

Metadata

Release files for observra 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for observra 1.1.1
File Size Uploaded
observra-1.1.1.tar.gz 149.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for observra 1.1.1
File Interpreter ABI Platform
observra-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 335.4 kB

Release files / observra-1.1.1.tar.gz

Download URL observra-1.1.1.tar.gz
Size 149.8 kB
Tags Source
SHA-256 checksum
How to use checksums
671fcb4b9486385f74dfe12f242f56b29b5a153bc95bdf140164e7b8ee4266d5
BLAKE2b-256 checksum
How to use checksums
27bd34dbf639df0eb3db0d11819c11bccda0ebb5bf2dfe7a93636aed997a4a66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / observra-1.1.1-py3-none-any.whl

Download URL observra-1.1.1-py3-none-any.whl
Size 185.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a9ec381174b90c3ec47ba1554793ff9cd81829d4b881d2dec664f5e81b7b296
BLAKE2b-256 checksum
How to use checksums
93a822d5a1792d0f5f73d55469b421897359828cf9d1b0e73370a9b9397be714
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page