AI Observer
Open Source & Self-Hosted

Unified Local Observability for AI Coding Assistants

Track costs, debug traces, and monitor all your AI tools in one privacy-first dashboard. Your data stays on your machine.

Works with your favorite AI tools

Everything You Need

Powerful features to understand and optimize your AI tool usage

Multi-Tool Support

Works with Claude Code, Gemini CLI, OpenAI Codex CLI, GitHub Copilot, and OpenCode. Monitor all your AI coding assistants from one unified dashboard.

Real-Time Dashboard

Live WebSocket updates as telemetry arrives. Customizable drag-and-drop widgets with multiple visualization types.

Cost Tracking

Built-in prices for 180+ models across Claude, OpenAI, Gemini, and GitHub Copilot, kept current from models.dev, plus native OpenCode plugin cost metrics. Understand exactly what you're spending.

Historical Import

Import past sessions from local JSONL/JSON files with automatic cost calculation. Analyze your complete AI tool history.

File Watcher

Watch Claude Code, Codex, and Gemini session files and ingest new data as it is written. No OTLP configuration needed.

Agent Access (MCP)

Opt-in MCP endpoint lets your coding agents search past conversations and read transcripts, logs, traces, and costs, with read-only tools.

Privacy First

All data stays on your machine. Listens on localhost by default, with optional token authentication. Complete control over your telemetry.

Secret Redaction

API keys, tokens, passwords, and private keys are redacted before anything is stored. Optionally pseudonymize personal data too.

DuckDB Analytics

Powered by DuckDB for instant queries on large datasets. Fast aggregations, filtering, and time-series analysis.

Single Binary

One ~54MB executable with embedded frontend. No external dependencies, no configuration—just run and go.

OTLP Native

Standard OpenTelemetry Protocol ingestion via HTTP/JSON and HTTP/Protobuf. Works with any OTLP-compatible tool.

Data Export

Export telemetry to portable Parquet files with optional DuckDB views database. Archive, share, or analyze externally.

How It Works

Get up and running in minutes with three simple steps

Architecture
AI Coding Tools Claude Code Gemini CLI OpenAI Codex GitHub Copilot OpenCode Other OTLP Tools OTLP/HTTP (Protobuf/JSON) AI Observer Server OTLP Receiver (HTTP/Protobuf) Cost Engine (180+ AI models) WebSocket (Real-time) REST API (Query Data) DuckDB (Analytics) Real-Time Dashboard Metrics Widgets Logs Viewer Traces Explorer
01

Start AI Observer

Run AI Observer locally via Docker, Homebrew, or binary. It starts a local server that listens for telemetry data.

02

Configure Your AI Tools

Point your AI coding assistants at AI Observer's OTLP endpoint with a few environment variables, or run ai-observer watch to read Claude Code, Codex, and Gemini session files directly.

03

Monitor & Analyze

Open the dashboard to see real-time metrics, traces, and logs. Track costs, debug issues, and optimize usage.

Quick Start

Get AI Observer running in under a minute

Docker Installation
# Pull and run AI Observer (ports published on localhost only)
docker run -d \
  --name ai-observer \
  -p 127.0.0.1:4318:4318 \
  -p 127.0.0.1:8080:8080 \
  -v ai-observer-data:/app/data \
  tobilg/ai-observer:latest

# Dashboard: http://localhost:8080
# OTLP endpoint: http://localhost:4318

Configure Your AI Tools

Point your AI coding assistant to send telemetry to AI Observer:

Claude Code Setup
# Add to ~/.bashrc or ~/.zshrc
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_METRICS_EXPORTER=otlp
export OTEL_LOGS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
export OTEL_METRIC_EXPORT_INTERVAL=10000
export OTEL_LOGS_EXPORT_INTERVAL=5000
export OTEL_LOG_USER_PROMPTS=1

Using Claude Code, Codex CLI or Gemini CLI? You can skip the exporter setup and run ai-observer watch all --backfill to read their session files directly. Learn more

See It in Action

A beautiful, powerful dashboard for all your AI observability needs

Dashboard Overview

Dashboard Overview

Real-time metrics and KPIs at a glance

Cost Analytics

Cost Analytics

Track spending across all AI models

Trace Explorer

Trace Explorer

Debug and analyze AI tool interactions

Logs Viewer

Logs Viewer

Search and filter telemetry logs

Free & Open Source

No subscriptions, no limits, no strings attached

MIT License
$0 /forever

Self-hosted on your infrastructure

  • Unlimited AI tools
  • Unlimited telemetry data
  • Real-time dashboard
  • Cost tracking for 180+ models
  • Trace & log analysis
  • Self-hosted, privacy-first
  • No usage limits
  • Community support

Join the community

Star on GitHub

Take Control of Your AI Tool Usage

Stop flying blind. Start understanding exactly how your AI coding assistants work, what they cost, and how to optimize them.