ai-observer  by tobilg

Unified local observability for AI coding assistants

Created 8 months ago
259 stars

Top 97.8% on SourcePulse

GitHubView on GitHub
Project Summary

Unified local observability for AI coding assistants. AI Observer addresses the challenge of understanding the behavior and costs of local AI development tools by providing a self-hosted, single-binary, OpenTelemetry-compatible backend. It offers developers real-time insights into token usage, API latency, error rates, and session activity across multiple AI assistants, enhancing debugging capabilities while ensuring data privacy by keeping telemetry local.

How It Works

AI Observer functions as an observability backend that ingests telemetry data via the OpenTelemetry Protocol (OTLP) or through a file-watching mechanism for specific tools. It processes this data, derives metrics like token usage and costs using embedded pricing information, and stores it locally in a DuckDB database for fast querying. A React-based frontend provides a real-time, WebSocket-updated dashboard for visualizing this information, with support for custom dashboard layouts.

Quick Start & Requirements

  • Primary install / run command: Docker is recommended: docker run -d -p 8080:8080 -p 4318:4318 -v ai-observer-data:/app/data --name ai-observer tobilg/ai-observer:latest. Other methods include Homebrew (macOS), binary download, or building from source.
  • Non-default prerequisites: For building from source: Go 1.26+, Node.js 22+, pnpm 10+.
  • Links: Releases: GitHub Releases, Homebrew Tap: tobilg/ai-observer.

Highlighted Details

  • Supports multiple AI coding assistants: Claude Code, Gemini CLI, OpenAI Codex CLI, GitHub Copilot, and OpenCode.
  • Features a real-time, WebSocket-powered dashboard with a drag-and-drop widget builder.
  • Offers a file watcher mode for incremental, real-time import of session data from Claude, Codex, and Gemini without OTLP configuration.
  • Includes historical data import from local JSONL/JSON files with cost calculation.
  • Utilizes DuckDB for efficient local storage and analytics, enabling fast queries on large datasets.
  • Provides embedded pricing data for automatic cost tracking across supported models.

Maintenance & Community

The project utilizes GitHub Actions for CI/CD, including automated testing, building binaries, and releasing Docker images and Homebrew formulas. No specific community channels (like Discord or Slack) or notable contributors are listed in the README.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration into closed-source projects.

Limitations & Caveats

GitHub Copilot and OpenCode telemetry are exclusively ingested via OTLP; file watcher or import modes are not supported for these tools. A notable discrepancy exists in token counting between OTLP ingestion (reflecting actual transmission) and local file parsing (matching API billing data), with OTLP reporting significantly higher input and output token counts. codex.sse_event logs are filtered out by default. Gemini CLI requires version v0.34.0 or higher.

Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.