This release is a pre-release and may not be stable for production use.
Lode Observe AI: Agent Observability & Tracing Platform
Deep execution tracer for AI agents with OpenTelemetry export, real-time debugging, cost analytics, and production observability. Export traces to Jaeger, DataDog, or any OTEL-compatible backend.
Table of Contents
- The Problem
- The Solution
- Project Status
- Features by Phase
- Quick Start
- Deployment
- Architecture
- Documentation
- Performance Benchmarks
- Contributing
- License
The Problem
Multi-agent architectures are distributed black boxes. When an agent fails, loops indefinitely, or hallucinates:
- ❌ Developers can't see intermediate reasoning steps
- ❌ No visibility into which tool call introduced bad data
- ❌ No explanation for why the model entered a runaway recursive loop
- ❌ Token costs explode without warning (hundreds of dollars burned)
- ❌ Traditional APM tools (Datadog, New Relic) fail—they're built for deterministic RPCs, not probabilistic token generation
The Solution: Lode Observe AI
Lode Observe AI is the mother lode vein—the deep geological structure from which all surface visibility originates. It maps every branching step of multi-agent execution, capturing:
- Every prompt, token, and decision branch with zero overhead
- Hierarchical execution DAGs showing parent-child span relationships
- Cost attribution by model, provider, and agent step
- Anomaly detection for infinite loops, context exhaustion, and runaway spend
- Replay payloads for offline debugging and test case generation
Core Value Proposition
| Metric | Without Lode Observe AI | With Lode Observe AI |
|---|---|---|
| Step Visibility | ✗ Blind | ✓ Complete DAG with costs |
| Loop Detection | ✗ Manual debugging | ✓ Automatic anomaly alerts |
| Context Window Tracking | ✗ Unknown | ✓ Real-time saturation tracking |
| Cost Attribution | ✗ Black box | ✓ Per-step token & USD breakdown |
| Instrumentation Overhead | ✗ N/A | ✓ <0.5ms (non-blocking) |
| Cloud Dependencies | N/A | ✗ Yes (expensive SaaS) |
Documentation
📚 Complete deployment & troubleshooting guides:
- DEPLOYMENT.md — Docker, Kubernetes, environment configuration, security best practices, monitoring
- TROUBLESHOOTING.md — Common issues, debug mode, database inspection, performance profiling
- PERFORMANCE.md — Benchmarks, tuning options, scaling strategies, profiling guide
- CONTRIBUTING.md — Development setup, code standards, testing, PR workflow
Project Status
🟠 Phase 1 (MVP) — ~90% Complete
- ✅ Core instrumentation (decorators, context managers)
- ✅ DAG assembly & analysis (cost, anomaly detection)
- ✅ OTEL export (Jaeger, DataDog compatible)
- ✅ Storage backend (SQLite with optional persistence)
- ✅ CLI tools (export, inspect, analyze traces)
- ✅ PyPI publication ready
- ✅ Docker GHCR publication ready
Timeline to Production: 1-2 weeks (depends on PyPI/Docker publication priority)
Features by Phase
Phase 1: MVP (Core Tracing) — CURRENT ✅
Completion: ~95% (9/10 milestones merged)
Status: Production-ready for single-instance deployments. Kubernetes + Docker images ready. PyPI publication pending.
Core Features ✅
- ✅ Non-blocking Ring Buffer: <0.1ms insertion latency, 10k+ spans/sec throughput
- ✅ Auto-instrumentation Hooks: OpenAI, LiteLLM (Issue #7 merged)
- ✅ Trace Analysis: DAG assembly, cost aggregation, anomaly detection (cycles, loops, latency)
- ✅ SQLite Storage: WAL mode, concurrent access support (Issue #6 merged)
- ✅ Export Formats: JSON, YAML, Assay test suite (Issue #7 merged)
- ✅ CLI & Server: OTEL export to Jaeger,
lode-observe-ai-observe-ai export,lode-observe-ai-observe-ai inspect, FastAPI server (Issue #1 merged) - ✅ Docker: Multi-stage Dockerfile, GHCR-ready (Issue #8 merged)
- ✅ Kubernetes: Deployment, service, ingress manifests (Issue #8 merged)
- ✅ Test Coverage: 79 tests, 61% coverage (Issue #9 merged)
- 🟡 Documentation: Deployment, troubleshooting, performance guides (Issue #12 — THIS MILESTONE)
What You Get in Phase 1 (MVP) 🎯
| Capability | Included? | Details |
|---|---|---|
| Instrumentation | ✅ Full | OpenAI, LiteLLM hooks + Python decorators |
| Local Tracing | ✅ Full | Non-blocking spans, SQLite backend, <1ms overhead |
| Analysis | ✅ Full | DAG, costs, anomaly detection (cycles, loops, latency) |
| Export | ✅ Full | JSON, YAML, Assay test cases, OTEL/Jaeger |
| Web UI | ✅ OTEL | Export to Jaeger/DataDog for visualization |
| Deployment | ✅ Full | Docker, Kubernetes, local dev |
| Single-instance | ✅ Yes | SQLite storage on one machine |
| Multi-instance | 🟡 Phase 2 | Cloud sync, distributed tracing |
| Cloud Storage | 🟡 Phase 2 | S3, GCS, Databricks backends |
| Sharing & URLs | 🟡 Phase 2 | Lode Observe AI Cloud, shareable trace links |
| Enterprise Auth | 🟡 Phase 3 | SSO, RBAC, multi-tenancy |
What's NOT in Phase 1 ❌
- OTEL export to production backends (Jaeger, DataDog)
- Custom web UI (use Jaeger or client tools for visualization)
- Cloud storage backends (S3, GCS — Phase 2)
- Distributed tracing across services (Phase 2)
- Multi-user authentication (Phase 3)
- High-volume analytics (<1M spans/month in Phase 1)
Phase 2: Cloud Enablement (Future)
Estimated: 15-20 hours | Timeline: 2-3 weeks
- ✨ Cloud Sync: Lode Observe AI Cloud bridge for trace collaboration
- ✨ Shareable URLs: PR review with trace inspection
- 🔧 OTLP Exporter: OpenTelemetry Protocol support
- 🔧 Cycle Interceptor: Automatic runaway prevention middleware
- 💾 Cloud Storage: S3, GCS, Databricks backends
- 🎯 Sampling: Configurable trace sampling rate (reduce overhead)
Phase 3: Enterprise (Future)
Estimated: 20-30 hours | Timeline: 3-4 weeks
- 💼 Multi-tenancy: Dedicated organizations & workspaces
- 🔐 Enterprise Auth: SSO (Okta, Auth0), RBAC, audit logs
- 📊 Analytics: ClickHouse backend for millions of spans/month
- 🛡️ PII Redaction: Automatic sensitive data scrubbing
- 📈 Dashboards: Real-time metrics, cost trends, performance analytics
Quick Start
Installation
# Via pip (when published — Issue #2)
pip install lode-observe-ai==0.1.1.dev0
# Via Docker (when published — Issue #3)
docker run -p 3000:3000 ghcr.io/craftedwithintent/lode-observe-ai:0.1.1.dev0
# From source (now)
git clone https://github.com/CraftedWithIntent/lode-observe-ai.git
cd lode-observe-ai
uv pip install -e ".[dev]"
Basic Usage
1. In-Process Instrumentation (Python)
from lode_observe_ai import build_trace_tree, aggregate_costs, detect_anomalies
# Build trace tree from spans
tree = build_trace_tree(spans, root_span_id="root_id")
# Analyze costs
costs = aggregate_costs(tree)
print(f"Total tokens: {costs.total_tokens}")
print(f"Total cost: ${costs.total_cost_usd:.4f}")
# Detect anomalies
anomalies = detect_anomalies(tree)
if anomalies.estimated_infinite_loop:
print(f"⚠️ Infinite loop detected! {anomalies.max_repeated_tool_calls} repeated calls")
2. Local Web Dashboard
# Start Jaeger (for trace visualization)
docker run -d -p 6831:6831/udp -p 16686:16686 jaegertracing/all-in-one
# Export trace to Jaeger
lode-observe-ai export --trace-id <trace-id> --format otel --otel-endpoint http://localhost:4317
# Open browser: http://localhost:16686
# Visual DAG execution graph, waterfall breakdown, and step inspection
3. Export to Test Suite
# Convert failed production trace into Assay test case
lode-observe-ai export --trace-id abc123def456 --format assay --output suite.yaml
Deployment
Quick Start (Local Development)
# Install
pip install lode-observe-ai==0.1.1.dev0
# Export trace to Jaeger for visualization
lode-observe-ai export --trace-id <trace-id> --format otel --otel-endpoint http://localhost:4317
# Visit http://localhost:16686 (Jaeger UI)
Docker
# Run container
docker run -p 3000:3000 \
-v $(pwd)/traces:/data/traces \
-e LODE_STORAGE_PATH=/data/traces/traces.db \
ghcr.io/craftedwithintent/lode-observe-ai:0.1.1.dev0
# Docker Compose
docker-compose up -d
Kubernetes
# Deploy
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml
# Port forward
kubectl port-forward svc/lode-observe-ai 3000:3000
See DEPLOYMENT.md for:
- Environment configuration
- Security best practices (TLS, auth, redaction)
- Monitoring & health checks
- Troubleshooting common issues
- Kubernetes Helm chart (Phase 2)
Architecture
Design Principles
- Zero Overhead: <0.1ms insertion latency via non-blocking async ring buffer
- Local-First: No cloud dependencies in Phase 1 (optional in Phase 2+)
- Production Ready: SQLite WAL, Kubernetes manifests, Docker multi-stage builds
- Functional Core: Pure immutable domain types, testable analysis logic
- Extensible: Hook-based auto-instrumentation, pluggable storage backends
Functional Core / Imperative Shell
Functional Core (Pure Logic):
- Trace DAG assembly (parent-child span linking)
- Cost & token aggregation (model pricing math)
- Anomaly detection (cycle, loop, latency heuristics)
- Replay payload generation (step extraction for offline recreation)
- All immutable domain types (Span, TraceTree, CostBreakdown, etc.)
Imperative Shell (I/O & Runtime):
- Non-blocking async ring buffer (background span flushing)
- Auto-instrumentation hooks (OpenAI, LiteLLM monkey patching)
- Storage backends (SQLite WAL, OTLP gRPC)
- FastAPI local web server (interactive UI)
Request Flow
Agent Execution
↓
Decorator / Context Manager Captures Step
├─→ Input state, prompt, model name
├─→ Tool invocation & output
└─→ Latency & token metrics
↓
Non-Blocking Ring Buffer
├─→ Append span to in-memory buffer
└─→ Background worker flushes to storage
↓
SQLite / Storage Backend
↓
Trace Reconstructor
├─→ Build hierarchical DAG from flat spans
├─→ Calculate costs & latencies
├─→ Detect anomalies (cycles, loops, saturation)
└─→ Generate replay payloads
↓
Web Dashboard (OTEL export to Jaeger)
├─→ Interactive DAG visualization
├─→ Waterfall timeline breakdown
├─→ Step-by-step inspection
└─→ Cost & anomaly summary
↓
Export to Assay / Other Formats
Configuration
Lode Observe AI is configured via Python context managers and environment variables.
Context Manager API
from lode_observe_ai import start_trace, trace_agent
@trace_agent(name="ResearchAgent", sample_rate=1.0)
def my_research_agent(topic: str) -> str:
# Decorated function automatically traced
with start_trace("research_session") as tracer:
result = searcher.search(topic)
tracer.record_output(result)
return result
Environment Variables
# Storage backend
LODE_STORAGE=sqlite:///./traces.db
# OTEL export configuration
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
OTEL_SERVICE_NAME=my-agent
# Instrumentation
LODE_SAMPLE_RATE=1.0 # Trace every request
LODE_OVERHEAD_BUDGET_MS=0.5 # Max tracing overhead
# Cloud sync (Phase 2)
LODE_CLOUD_API_KEY="..."
LODE_CLOUD_SYNC=true
Performance Benchmarks
Instrumentation Overhead
| Scenario | Without Lode Observe AI | With Lode Observe AI | Overhead |
|---|---|---|---|
| Model inference (100ms) | 100ms | 100.3ms | <0.5ms |
| Tool call (50ms) | 50ms | 50.2ms | <0.5ms |
| 10-step agent flow (500ms) | 500ms | 501.5ms | ~0.3% |
Analysis Speed
| Operation | Time | Notes |
|---|---|---|
| Build DAG (100 spans) | 2ms | Pure functional, O(n) |
| Aggregate costs (100 spans) | 1ms | Single pass aggregation |
| Detect anomalies (100 spans) | 3ms | Cycle detection O(n^2) worst-case |
| Generate trace summary | 5ms | All analytics combined |
Storage
- SQLite WAL: 1KB–10KB per trace (metadata only)
- Query latency: <10ms for trace retrieval
- Disk usage: ~100MB for 1M spans (optimized storage)
Roadmap & Issues
Phase 1 Issues (MVP — Current)
| # | Issue | Type | Priority | Status |
|---|---|---|---|---|
| #1 | Test Coverage Expansion | 📝 Quality | P1 | 📋 Open |
| #2 | Publish to PyPI | 📦 Release | P0 | 📋 Open |
| #3 | Publish Docker GHCR | 📦 Release | P0 | 📋 Open |
| #4 | Documentation Completion | 📖 Docs | P1 | 📋 Open |
| #5 | Web UI Implementation | ✨ Feature | P1 | 📋 Open |
| #6 | SQLite Storage Backend | 🔧 Infrastructure | P1 | 📋 Open |
| #7 | Auto-Instrumentation Hooks | 🔧 Infrastructure | P1 | 📋 Open |
| #11 | Architecture & Contribution Ideas | 📖 Docs | P1 | 📋 Open |
| #12 | Research Agent Example | 📚 Examples | P1 | 📋 Open |
Docs & Examples (MVP+)
| # | Issue | Type | Effort |
|---|---|---|---|
| #11 | Architecture & Contribution Ideas | 📖 Docs | 4-5h |
| #12 | Research Agent Example (with tracing) | 📚 Examples | 6-8h |
Phase 2 Issues (Cloud Enablement)
| # | Issue | Type | Effort |
|---|---|---|---|
| #8 | OTLP Exporter | 🔧 Infrastructure | 3-4h |
| #9 | Cloud Sync & Shareable URLs | ✨ Feature | 6-8h |
| #10 | Cycle Interceptor Middleware | 🔧 Infrastructure | 4-6h |
See GitHub Issues for full details.
Performance & Benchmarks
Instrumentation Overhead
Ring Buffer Insertion:
- Average latency: 0.08ms per span ✅
- 99th percentile: <0.5ms per span ✅
- Throughput: >11,000 spans/sec
- Impact on inference: <1ms for 10-step agent flow
Why it matters: Tracing doesn't slow down your agents. <0.1ms per step is imperceptible.
Storage Performance
- SQLite query latency: <10ms for 1000-span traces
- Disk usage: ~100MB for 1M spans
- WAL mode: Concurrent readers, no blocking
See PERFORMANCE.md for:
- Tuning options & recommendations
- Profiling guide
- Scaling strategies (Phase 2+)
- Optimization for high-throughput systems
Contributing
We welcome contributions! See CONTRIBUTING.md for:
- 🔧 Development setup & environment
- 📋 Code standards (ruff, pyright strict, >60% coverage)
- 🧪 Testing & CI pipeline
- 🔀 PR workflow & review process
- 💡 Feature request & architecture decision process
- 🐛 Bug report template
- 🤝 Community guidelines
Dev Quick Start:
git clone https://github.com/CraftedWithIntent/lode-observe-ai.git
cd lode-observe-ai
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest tests --cov=src/lode_observe_ai
# Linting & type checking
ruff check src tests
pyright src
# Start dashboard
Governance & Community
License & Policies:
- LICENSE — MIT License (open source)
- CODE_OF_CONDUCT.md — Contributor Covenant 2.0
- SECURITY.md — Vulnerability reporting & disclosure policy
- CHANGELOG.md — Release notes & version history
Development:
- CONTRIBUTING.md — Development setup, code standards, PR workflow
- GitHub Issues — Feature requests, bug reports
- GitHub Discussions — Questions, ideas, community
Documentation:
- DEPLOYMENT.md — Docker, Kubernetes, security, monitoring
- TROUBLESHOOTING.md — Common issues, debug guide
- PERFORMANCE.md — Benchmarks, tuning, optimization
Ecosystem Position
CraftedWithIntent Products:
- panner-ai (Week 1): AI testing & evaluation ✅ LIVE
- prospect-ai (Week 2): LLM cost optimization ✅ LIVE
- grizzly-guard-ai (Week 3): AI safety & security 🟡 READY
- insightful-ai (Week 4): ML model insights 🟡 READY
- reconciliation-service (Week 5): Data reconciliation 🟡 READY
- lode-observe-ai (Week 6): Agent observability & debugging 🟠 PHASE 1 MVP
Lode Observe AI Positioning: Observability infrastructure for entire ecosystem. Trace, debug, and optimize any agent system (including panner-ai, prospect-ai, grizzly-guard-ai, insightful-ai).
Support & Questions
Documentation:
- 📖 Full Docs — Deployment, troubleshooting, performance
- 🐛 GitHub Issues — Bug reports, feature requests
- 💬 GitHub Discussions — Questions, ideas, brainstorming
- 📧 Email — Direct support
Community:
- Join other CraftedWithIntent users debugging AI agents
- Share your use cases and feature requests
- Collaborate on open-source contributions
License
MIT License — See LICENSE for details.
CraftedWithIntent™ — The Pick & Shovel for Production AI Systems.
About
Lode is part of the CraftedWithIntent ecosystem of AI infrastructure tools:
- panner-ai — AI testing & evaluation ✅
- prospect-ai — LLM cost optimization ✅
- grizzly-guard-ai — AI safety & security ✅
- insightful-ai — ML model insights ✅
- reconciliation-service — Data reconciliation ✅
- lode-observe-ai — Agent observability & debugging 🟠 (this project)
Completely decoupled: Lode Observe AI works standalone. No shared dependencies with other products.
Release files for lode-observe-ai 0.1.2.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lode_observe_ai-0.1.2.dev0.tar.gz | 131.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lode_observe_ai-0.1.2.dev0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 163.7 kB
Release files / lode_observe_ai-0.1.2.dev0.tar.gz
| Download URL | lode_observe_ai-0.1.2.dev0.tar.gz |
|---|---|
| Size | 131.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffb40c9e206767ccb94fd3764c68c8b9351675eb0a2104d41c5c0a0fe171ce8c
|
|
BLAKE2b-256 checksum How to use checksums |
04a35f98c2f6d278ee581ed86844b53bcdeef9f753a97b914c457af1f8c5a201
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / lode_observe_ai-0.1.2.dev0-py3-none-any.whl
| Download URL | lode_observe_ai-0.1.2.dev0-py3-none-any.whl |
|---|---|
| Size | 32.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
994656b9968615697706aed02259b87b6b8153754a4ddf7fb6054efd18630143
|
|
BLAKE2b-256 checksum How to use checksums |
a7088e0417f1cf9c874454a1eef2d049e52d0837cad13b57b5da545925e09bb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|