Zenith

Zenith

Zenith is a Database for Agent traces.

Built for span trees and JSON-heavy traces. Sub-millisecond p95s at a billion rows. Versioned prompts stored alongside the calls that ran them. Single binary, Apache 2.0.

Features

  • -Sub-millisecond p95s: every query returns in under 1ms at a million rows
  • -Stays flat at scale: 1B-row p95 beats Postgres at 10M
  • -OTLP ingestion: any OpenTelemetry exporter works, no proprietary SDK
  • -Span trees as a primitive: ANCESTORS_OF, DESCENDANTS_OF, tree aggregates
  • -Schema-on-read JSON: ingest any shape, type at query time
  • -Versioned prompts: templates linked to the spans that ran them
  • -Sharded by design: 8-shard B8 lands in 6.8ms at a billion rows
  • -Single binary: no JVM, no Zookeeper, no Kafka. Apache 2.0.
Zenith
Postgres
ClickHouse
measured · p95 μs
571
7.9k
178k
4.3k
48.4k
7.2k
4.8k
287k
27.2k
723
14.3k
94.8k
6.8k
14M
724k
B1 trace_load
B2 attr_filter
B3 fts_memory
B6 jsonpath
B8 group_by_model
B8 chart shows 8-shard. Without sharding:single-node 38,742μs4-shard 11,673μs

c7i.4xlarge · NVMe gp3 · single node unless noted. Postgres 16 (jsonb + pg_trgm), ClickHouse 24.10. Workload: OpenTelemetry agent spans with JSON attributes.

FAQ

What is Zenith?

Zenith is an open-source database for agent traces. It stores spans, their JSON attributes, and the prompt and tool versions that produced them, and it answers span-tree queries in sub-millisecond p95 at scales where Postgres and ClickHouse have already given up.

How is it different from LangSmith or Langfuse?

Zenith is a database, not a hosted observability product. It speaks OTLP, stores spans in an open columnar format, exposes SQL over them, ships under Apache 2.0, and is built around a single design goal: latency stays flat as the trace store grows.

Why is it so fast?

Columnar storage tuned for span trees. Inverted indexes for JSON paths and full-text attributes. Tree-aware joins that don't materialize intermediates. Shard-local query planning. The numbers above are measured on a single c7i.4xlarge against synthetic OpenTelemetry agent spans.

What does a trace look like?

A trace is a tree of spans. The root is usually a user request or workflow; children are sub-agents, model calls, retrievals, and tool invocations. Every span carries arbitrary attributes (prompts, tokens, costs, latencies, tool args, outputs) plus a pointer to the prompt-template version that produced it.

How do I send traces to it?

OTLP, over HTTP or gRPC. Point any OpenTelemetry exporter at the Zenith endpoint and you're done. There is no Zenith SDK — that is the design.

Self-hosted or managed?

Both. Run the single binary with zenith serve, deploy with Docker or Helm, or use the managed cloud (private beta).

What is the query language?

SQL, with extensions for span trees: DESCENDANTS_OF, ANCESTORS_OF, and span-aware aggregates. JSON attributes are addressable with path expressions and can be indexed on demand.

Is it free?

The Zenith server is Apache 2.0 — free for any use, including commercial. Managed cloud has paid tiers above a generous free quota. Source is on GitHub.

Polarity, Inc.