# Repository Briefing: jwuthri-cloud/Tracely-ai
> Source: https://repoforai.com/repo/jwuthri-cloud/Tracely-ai (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/jwuthri-cloud/Tracely-ai
- **Official Docs / Website**: https://tracely-ai.com
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A (82/100 · Maintenance 35/35 · Adoption 16/25 · Releases 11/20 · License 20/20)
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Docker, Self-Hosted, MCP, API
- **Momentum**: 848 ★ total (+1 24h / +7 7d) · 79 forks
- **Topics**: `agent-evaluation`, `ai-agents`, `ai-testing`, `ci-cd`, `clickhouse`, `developer-tools`, `llm-evaluation`, `llm-observability`, `llmops`, `mcp`, `observability`, `python`
- **When to Use**: Best for: Teams already collecting agent traces that want to turn recurring production failures into repeatable PR checks and can operate the backing services. Skip if: You only need hosted dashboards, cannot retain model and tool payloads even after redaction, or need live model behavior validated on every run rather than fixture-based regression coverage.

## Overview
```text
### Architecture & Core Mechanics
Tracely is a self-hosted, asynchronous observability and evaluation stack. The `tracelyai-sdk` and other OTLP/HTTP exporters send to FastAPI at `POST /v1/traces`. The API persists the payload to MinIO/S3 before dispatching work through Redis and Celery. Workers map OpenTelemetry data, update the PostgreSQL registry, write events to ClickHouse, and then run evaluation, failure clustering, and alerting.

ClickHouse stores traces and scores in `ReplacingMergeTree` tables and uses server-side `async_insert` instead of a process-local buffer shared across workers. PostgreSQL with pgvector handles the transactional registry through SQLAlchemy 2.0 and Alembic. A Python 3.12+ uv workspace separates `backend/`, `workers/`, and `sdk/`; the Next.js 15 frontend uses React Flow for visual workflows. OTLP is the ingestion contract, with support for `gen_ai.*`, OpenInference, and Tracely-specific agent and conversation attributes.

### Key Capabilities & Differentiators
Structural checks and LLM judges evaluate conversations, runs, or individual spans. Results appear as trace-table columns and update over SSE. Evaluators support agent and environment targeting, deterministic sampling, and outputs including scores, booleans, text, and JSON-schema results. Structural signatures and semantic embeddings group failures for triage, while human calibration distinguishes judges that miss failures from those that flag too many runs. The Python SDK can auto-instrument OpenAI, Anthropic, Google, Mistral, and LangChain integrations.

Promoting a failure packages its inputs and recorded model and tool outputs into fixtures, with a contract that the case fails on old code and passes on the fix. The CI paths are distinct: offline fixture replay, multi-turn scenarios against a registered HTTP endpoint, and gating existing `tracely.env=ci` traces by matching inputs to promoted cases. `tracely gate` can return a nonzero exit, publish a commit status, and update a PR comment; repository merge rules determine whether the verdict actually blocks a merge.

### Trade-offs & Limitations
The decision point versus a commercial alternative such as LangSmith is whether production-derived regression fixtures and control of the deployment are worth owning the stack. Blob-first ingestion keeps the original payload independent of the derived event rows, but debugging a missing trace can involve object storage, the queue, workers, and ClickHouse. Keeping full input and output payloads also turns retention, access control, and redaction into operational requirements: sensitive content in a trace can carry over into its fixture bundle.

Recorded fixtures make it possible to test code paths against the same model and tool outputs without live calls. They cannot tell you whether the live model has drifted, an external tool has changed, or a new execution path will receive the responses it expects. Keep live endpoint scenarios or online evaluation where those risks matter, and budget for model calls if you use LLM judges. The MIT license permits commercial self-hosting under its notice terms; it does not eliminate the work of operating the stack or reviewing data sent to external providers.

### Hardware & Deployment Guide
Docker and Docker Compose run the full API, worker, frontend, PostgreSQL, ClickHouse, Redis, and MinIO stack. Run `docker compose --profile demo up -d --build --wait` for seeded traces, cases, and gate results. The UI defaults to port `3001` and the API to `8000`; `TRACELY_WEB_PORT` and `TRACELY_BACKEND_PORT` override them. Local development adds Python 3.12+ with uv and Node 20+ with pnpm. The Celery worker does not hot-reload.

Deployment paths include Railway, Coolify via `docker-compose.coolify.yml`, and Kubernetes via `deploy/eks/README.md`. For production, replace the demo ingest key, configure `SESSION_SECRET` and `SECRETS_ENCRYPTION_KEY`, and plan backups and retention. Size ClickHouse and object storage for trace volume and retention, and Celery for ingestion bursts and evaluation concurrency. ClickHouse’s internal logs have no built-in TTL in this setup; a nightly sweep limits their growth. No GitHub release is listed, so test upgrades and migrations against a pinned revision before rolling them out.
```

## Key Capabilities
```text
- Ingestion: OTLP/HTTP payloads are persisted to MinIO/S3 before Redis/Celery dispatch; workers map spans into ClickHouse events.
- Trace views: Indexed agent, conversation, turn, and step fields organize spans into conversation waterfalls; evaluator scores stream into the trace table over SSE.
- Triage: Structural signatures and semantic embeddings group related failures; human labels measure where judges miss failures or over-flag.
- Regression contracts: Recorded model and tool outputs turn a failing trace into a fixture-backed case expected to fail before the fix and pass after it.
- CI integration: Run HTTP scenarios, match CI-emitted traces to promoted cases by input, or replay fixtures; the GitHub integration reports status and updates a PR comment.
- Alert routing: A visual flow can route gate failures, newly seen failure modes, and threshold breaches to Slack, email, or configurable webhooks.
```

## Quick Start / Clone
```bash
git clone https://github.com/jwuthri-cloud/Tracely-ai && cd Tracely
docker compose --profile demo up -d --build --wait
open http://localhost:3001
```
