open source · Apache 2.0 · self-hostable

The observability platform for AI agents.

Real-time tracing, security analysis, cost tracking, and Time Machine replay for AI agents — without changing how you build them.

LangGraph CrewAI AutoGen Custom Python
Star on GitHub ↗
Apache 2.0
Python 3.10+
1 process
0 data loss
§ 01 · Ecosystem

01 · @observe decorator

A single decorator that instruments any Python function — sync or async, nested or flat. It captures inputs, outputs, token counts, latency, and parent-child span relationships automatically. Zero changes to your agent logic required.

02 · Oxly Engine (FastAPI)

A high-performance single-process FastAPI service. It validates incoming spans, applies rate limits, inspects for security anomalies in real-time, computes per-model costs, and durably stores everything in a local SQLite database.

03 · Dashboard (React + TypeScript)

A Vite-powered React 19 SPA that gives you a live trace explorer, time-series cost charts, security alert feed, and the Time Machine — a step-by-step replay of any past agent run with full span data at every node.

§ 02 · Features
Real-time Tracing
zero manual work beyond @observe

Capture every LLM call, tool invocation, and function execution as a structured span. Supports sync, async, and deeply nested execution chains.

Time Machine Replay
step-by-step replay

Step through any past agent execution span-by-span. See what each tool returned and which decision path was taken — without reproducing the failure.

Security Engine
real-time detection

Detect prompt injection, PII leakage, jailbreak patterns, token explosions, and anomalous behavior in real time. Alerts surface in the dashboard within seconds.

Auto PII Sanitization
zero config required

SSNs, credit cards, emails, phone numbers, AWS keys, OpenAI keys — detected and redacted from every span before storage automatically.

Cost Analytics
per-model · timeseries

Per-model token counting and USD cost calculation. Track spend across GPT-4, Claude, Gemini — broken down by hour, day, or week.

Offline Resilience
zero data loss

If the Oxly Engine is unreachable, spans are written to a local SQLite buffer and replayed automatically when connectivity is restored.

§ 03 · Quickstart
python
# Install the Oxly SDK pip install oxly
from oxly import observe, init init( api_key="ak_your_project_key", ) @observe def research_agent(query: str) -> str: context = search_tool(query) return llm.chat(f"Answer based on: {context}") @observe(name="planning.step") async def async_agent(objective: str) -> list[str]: return await llm.achat(f"Break this into steps: {objective}")
▸ span captured research_agent · 1,204 tok · $0.003 ▸ tool call search_tool("AI agents") · 12ms ▸ llm call claude-3-5-sonnet · 842 tok ▸ security ✓ no anomalies detected ▸ cost $0.003 · running total: $0.047 → trace complete · view in dashboard
[note] zero-interference guarantee. @observe will never crash your application. Exceptions inside decorated functions propagate normally.
§ 04 · Why Oxly

Tokens are a resource.
Most observability tools ignore that.

[aside] most tools are designed for web services. AI agents have fundamentally different requirements.

Challenge Web Services AI Agents Oxly
Request durationMillisecondsMinutes to hoursDurable traces with offline fallback
Cost modelFixed infraVariable per-tokenPer-model cost tracking + timeseries
SecurityKnown vectorsPrompt injection, PII leakageReal-time detection engine
DebuggingDeterministic stack tracesNon-deterministic LLM behaviorTime Machine replay
Data sensitivityHeaders and bodiesFull conversation textAuto-PII sanitization
Call structureFlat request/responseDeep nested treesAutomatic parent-child span linking
§ 05 · Architecture
L1
Your Application — @observe decorator
HTTPS · gzip · exponential backoff retry

sdk-python

Python 3.10+, Pydantic v2. Provides the @observe decorator, local SQLite buffer for offline resilience, automatic PII scrubbing, span batching, and gzip compression.

api

FastAPI, SQLite (user store). Exposes REST endpoints for trace queries and a WebSocket channel for live span streaming to the dashboard. JWT tokens with 24h expiry; pbkdf2_sha256 password hashing; brute-force lockout after 5 failures.

dashboard

React 19, TypeScript, Vite. Live trace tree explorer, time-series cost charts, real-time security alert feed, and the Time Machine UI — which lets you scrub backward through any past agent run span-by-span with full input/output data at every step.

PackageStackResponsibilities
sdk-pythonPython 3.10+, Pydantic v2@observe decorator, PII scrubber, batching, offline buffer
apiFastAPI, SQLiteREST API · WebSocket · JWT auth · trace replay
dashboardReact 19, TypeScript, ViteTraces · analytics · Time Machine · security alerts
deploySQLiteSingle-process deployment
§ 06 · Security

Production hardened.
Not an afterthought.

Non-root containers

All Docker images run as a non-root appuser — no root privileges at runtime.

JWT Auth

24h token expiry with pbkdf2_sha256 password hashing. Brute-force lockout after 5 failures per 15 minutes.

API Key Security

SHA-256 hash cache on the hot path · pbkdf2 verification on first use. Keys never stored in plaintext.

Brute Force Protection

5 failed login attempts per 15-minute window triggers automatic account lockout.

Rate Limiting

100 requests per minute per IP enforced in-process.

CORS Allowlist

Explicit origin allowlist. Credentials disabled on the API endpoint. No wildcard origins.

Payload Limits

5MB hard limit enforced on actual request body — not just headers — at the HTTP layer.

CI Scanning

Bandit static analysis runs on every pull request. Security issues block merge automatically.

PII Scrubbing

SSNs, card numbers, emails, phone numbers, AWS & OpenAI keys stripped from every span before storage.

§ 07 · Deploy

Fully self-hostable.
One command.

bash
python
# Initialize Oxly from oxly import init init( api_key="ak_your_key", )

The full stack runs as a single process. Clone the repo, copy the example env file, and start it directly.

Environment variables

JWT_SECRET_KEYJWT signing secret — openssl rand -hex 32
ALLOWED_ORIGINSComma-separated CORS origins for the API
§ 08 · Built in the open

Proof, not press.

Apache 2.0
Open source license
0
Single process
0
Data loss guarantee
0%
Self-hostable
Python 3.10+
Minimum runtime
Ramakrishna1967 / Oxly

"Oxly is an open-source observability platform for AI agents — a single high-performance process for real-time tracing, offline SQLite storage, cost tracking, and security analysis."

Python 65.8% TypeScript 31.0% Apache 2.0
★ Star on GitHub ↗

Stop shipping blind.

The whole stack is public today — read the source, send a patch. Install the SDK in one line and get full visibility into your agents.

why ship blind when you can trace every step.
Copied!