Back

Porcupine

Headless product analytics for agents. PostHog-compatible ingestion, SQL queries, and destination pipelines, with no dashboard to host.

Notes

I love PostHog, but I realized that nobody on my team was opening its interface anymore. We ask our agents to query the data, make graphs, and explain what they find. Self-hosting the rest of the product felt like a lot of machinery for what we actually used.

So I built Porcupine, an open source product analytics service and event store with no admin interface at all. Once installed, you operate it through an agent, the API, or a standalone CLI.

GitHub · Website and documentation · Give this guide to your agent

What happens to an event

An application can keep using a supported PostHog SDK, send Segment events, or use Porcupine's native format. Events go into a durable SQLite queue before being acknowledged, then into ClickHouse for analysis. Older data can move to S3 and remain queryable.

An agent can discover event names and properties, inspect the schema, and write SQL for the question at hand. Porcupine checks project permissions and limits query resources. The agent turns the results into a report or chart using its own tools.

There are also destination pipelines: send matching events to a webhook, individually or in batches, or run a query on a schedule and export the results to S3. Historical PostHog data can be imported with resumable uploads.

The server is written in Go. A basic deployment is one application process, SQLite, and ClickHouse on a single server. Keeping it small is a design constraint, including accepting that this deployment does not survive losing its host without recovery.

A product without an interface

The interesting question for me is what a product looks like when the agent is its main interface. You still need invitations, permissions, revocation, useful errors, and documentation that lets someone get started without asking the author.

Porcupine exposes the same management operations through HTTP, the CLI, and MCP. Humans can authorize their tools with email verification and OAuth; shared services use scoped credentials. The MCP has two tools: one to discover the API and one to call it.

I built this with Codex, and I'm putting it out there to see whether this way of using analytics makes sense to other people too.