# Trifle

> Open-source time-series analytics platform for tracking business metrics in Ruby, Elixir, and Go using your existing database, with dashboards, alerts, CLI, and AI agent integration via MCP.

Trifle is a time-series metrics platform built by bootstrapped founders Jozef Vaclavik and Lubomir Herko, originating as a Rails plugin in 2015 and evolving over a decade into a full analytics ecosystem. It lets developers track business metrics—orders, revenue, feature usage, background job throughput—using the database they already run (Redis, PostgreSQL, MongoDB, or SQLite), without requiring a dedicated time-series database. The platform spans open-source libraries (MIT licensed), a cloud or self-hosted dashboard app (ELv2 licensed), and a CLI with MCP server mode for AI agent integration.

## What It Is

Trifle is a developer-first business metrics platform centered on a simple pattern: upsert with atomic increment into time-bucketed keys. A single `track` call writes a key, timestamp, and nested values; Trifle rolls them up into per-minute, per-hour, and per-day buckets that are instantly queryable at any resolution. The ecosystem has three main components:

- **Trifle Stats** — Core open-source libraries for Ruby, Elixir, and Go. MIT licensed. Works with Redis, PostgreSQL, MongoDB, and SQLite drivers.
- **Trifle App** — Visual dashboards, alerts, scheduled digests, and AI chat. Available as a cloud service or self-hosted (ELv2 license).
- **Trifle CLI** — Terminal access to metrics, plus an MCP server mode that lets AI agents query and push metrics directly.

## Architecture and Design Philosophy

The core insight driving Trifle's architecture came from a 2016–2017 scaling challenge: processing millions of requests generated 90,000+ objects just to render a 3-hour chart. The solution was aggregating values into time-bucketed statistics using MongoDB's upsert with atomic increment—no row locks, no confirmation needed. This pattern proved language-agnostic and became the foundation for all three library ports.

Trifle's design philosophy explicitly avoids requiring a dedicated time-series database. Developers use the database already in their stack, keeping data under their own control. The libraries are MIT licensed and intended to be adopted standalone; the App and CLI are optional layers on top.

## AI Agent Integration and MCP Support

Trifle has built native support for AI agent workflows. The Trifle CLI includes an MCP server mode, allowing AI agents to query and push metrics via the Model Context Protocol. The open-source `trifle-io/skills` repository (MIT licensed, installable via `npx -y @trifle-io/install`) provides agent skill files for Claude Code, OpenAI Codex, Cursor, Windsurf, Cline, Hermes, and Pi coding agents. These skills teach agents best practices for metric payload structure, dimensional tracking, execution tracing, and CLI analytics workflows. Skills follow the open Agent Skills standard and are distributed as `SKILL.md` files with YAML frontmatter.

## Use Cases Covered

Trifle targets business metrics that observability platforms like Datadog or Prometheus were not designed for:

- **Revenue tracking** — Orders, revenue, and conversion rates with hierarchical breakdowns by product, channel, and region
- **Background workers** — Job throughput, success rates, and processing times for Sidekiq, Oban, or any queue system
- **Feature usage** — Adoption by plan and user segment without third-party analytics
- **Custom code insights** — API response times, cache hit rates, and arbitrary business logic metrics
- **Business KPIs** — Daily signups, churn rates, and funnel metrics for non-technical stakeholders
- **AI agent analytics** — Agents build a local SQLite metrics database via CLI, query it via MCP, and upload the file to Trifle App for visualization

## Origin and Current Status

Trifle was founded by Jozef Vaclavik (Ruby developer since 2007) and Lubomir Herko. The project was accepted as an Alpha Startup at WebSummit in 2016. After an early APM phase ended when Google Cloud credits ran out, the team pivoted to the current library-first architecture. The Stats library went open source in 2021, Elixir support was added in 2023, and Go support arrived in 2025–2026 alongside the full App and CLI platform. The project is fully bootstrapped with no venture capital. According to the Trifle website, DropBot—a price comparison platform—uses Trifle to track 80M+ daily product price calculations and 900M+ events daily.

## Features
- Time-series metrics with time-bucketed aggregation
- Ruby, Elixir, and Go library support
- Works with existing databases (Redis, PostgreSQL, MongoDB, SQLite)
- Visual dashboards and alerts via Trifle App
- Scheduled digests and AI chat
- CLI with MCP server mode for AI agent integration
- Hierarchical/nested metric breakdowns
- Agent skills for Claude Code, Codex, Cursor, Windsurf, Cline, Hermes, Pi
- Self-hosted option (ELv2 license)
- Cloud-managed metrics storage via Projects API
- Structured execution tracing (Trifle Traces)
- Revenue, background worker, feature usage, and KPI tracking
- 30-day money-back guarantee
- SSO support
- API access

## Integrations
Ruby on Rails, Elixir/Phoenix, Go, Redis, PostgreSQL, MongoDB, SQLite, Sidekiq, Oban, Claude Code, OpenAI Codex, Cursor, Windsurf, Cline, Hermes, Pi Coding Agent, MCP (Model Context Protocol)

## Platforms
WEB, CLI, API, DEVELOPER_SDK

## Pricing
Freemium — Free tier available with paid upgrades

## Links
- Website: https://trifle.io
- Documentation: https://docs.trifle.io
- Repository: https://github.com/trifle-io/skills
- EveryDev.ai: https://www.everydev.ai/tools/trifle
