# ai-observer: Monitor AI Coding Assistant Usage Locally

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/tobilg-ai-observer
Generated for open source discovery and AI-assisted research.

AI Observer is a self-hosted OpenTelemetry backend and dashboard for tracking usage across local AI coding assistants. It brings token and cost data, traces, logs, and metrics together in DuckDB, with both OTLP ingestion and file-based import or watching for supported tools.

GitHub: https://github.com/tobilg/ai-observer
OSRepos URL: https://osrepos.com/repo/tobilg-ai-observer

## Summary

AI Observer is a self-hosted OpenTelemetry backend and dashboard for tracking usage across local AI coding assistants. It brings token and cost data, traces, logs, and metrics together in DuckDB, with both OTLP ingestion and file-based import or watching for supported tools.

## Topics

- go
- observability
- self-hosted
- ai
- developer-tools
- dashboard
- database
- monitoring

## Repository Information

Last analyzed by OSRepos: Sun Oct 04 2026 12:02:48 GMT+0100 (Western European Summer Time)
Detail views: 0
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Overview

[AI Observer](https://github.com/tobilg/ai-observer) collects telemetry from AI coding assistants into a local dashboard, helping developers see usage, estimated costs, latency, errors, and session activity in one place. It runs as a single Go binary with DuckDB storage and does not require an external observability service.

It fits developers who want local visibility into several assistants, including through standard OpenTelemetry ingestion or by importing and watching session files. File-based modes support Claude Code, Codex CLI, and Gemini CLI; GitHub Copilot and OpenCode use OTLP ingestion.

## Key Features

- Ingests OpenTelemetry traces, metrics, and logs over HTTP.
- Provides dashboards with real-time updates and configurable saved widgets.
- Tracks token usage and costs across supported tools and model aliases.
- Imports historical Claude Code, Codex CLI, and Gemini CLI session files.
- Watches supported local session files to ingest new activity incrementally.
- Stores data locally in DuckDB and exports telemetry to Parquet.
- Includes REST query endpoints and a WebSocket for dashboard updates.

## Use Cases

- Developers comparing token usage and estimated costs across AI coding assistants.
- Individual users who want to inspect assistant errors, latency, and session activity without sending telemetry to a third-party service.
- Teams or maintainers setting up a shared local dashboard for OpenTelemetry data from supported coding tools.
- Users who want to analyze prior Claude Code, Codex CLI, or Gemini CLI sessions without configuring live OTLP export.

## Project Facts

- Language: Go
- License: MIT
- Stars: 279
- Forks: 26
- Topics: ai, claude-code, codex-cli, duckdb, gemini-cli, observability, opentelemetry
- Archived: No

## Getting Started

Run with Docker and open the dashboard at `http://localhost:8080`:

```bash
docker run -d -p 8080:8080 -p 4318:4318 -v ai-observer-data:/app/data --name ai-observer tobilg/ai-observer:latest
```

See the [README](https://github.com/tobilg/ai-observer#readme) for tool configuration, alternatives for installation, and import or watch instructions.

## Alternatives

- [agent-observability](https://osrepos.com/repo/kb1sln-labs-agent-observability): It monitors Claude Code and Codex through Prometheus, Loki, Tempo, and Grafana, rather than combining ingestion and storage in DuckDB.

## Considerations

- The project is designed for local self-hosting, so you are responsible for running it and retaining its database.
- File import and watch are limited to Claude Code, Codex CLI, and Gemini CLI. Copilot and OpenCode require OTLP ingestion.
- Watch mode and OTLP server mode are mutually exclusive to avoid duplicate data.
- Telemetry content capture can include prompts, code, and tool results. Enable it only in trusted environments.
- Historical file parsing does not provide every live operational metric; some activity metrics are reconstructed and have documented limits.