Self-hosted control plane for agent fleets · MCP-native
Draw the graph.
Trust the output.
Primer is the self-hosted control plane for fleets of small, context-optimized agents — graphs, workspaces, triggers, and channels, wired together and run on your own hardware. The bet: a clean, purpose-built context lets a small model rival a much bigger one — a thesis, not a benchmark, so try it and tell us where it breaks.
$ pipx install primer-ai
$ primer api
$ docker run --rm -p 8000:8000 ghcr.io/primerhq/primer:0.3.0
Then open the console at http://localhost:8000/console/
The bet
Context, not scale.
A model spreads a fixed attention budget across every token at once. Bloat the context and you dilute the few tokens that actually matter — the “lost in the middle” effect. Primer keeps each agent’s context small and purpose-built, a wager that even small models stay accurate when you stop drowning them.
Graph engineering
Most agent work isn't a loop. It's a graph.
A loop is the simplest shape a graph can take: two nodes and a condition, like the producer and judge below. Real work also branches on the result, fans out across a dozen items and rejoins, and stops for a human at exactly one step. Primer runs the whole topology, with every ready node executing concurrently and each one keeping its own clean context.
- HeartbeatTriggers on cron, delay, or webhook.
- IsolationGit-backed workspaces: local, container, or Kubernetes.
- Durable memoryWorkspaces plus knowledge collections.
- Maker + checkerProducer drafts, judge critiques, the cycle repeats until it passes.
- ConnectorsMCP server & client; Slack, Telegram, Discord.
- Human gateApprovals; park-and-resume when judgment is needed.
Install in minutes
Two ways to run it.
Runs on your own hardware — install the Python package with pipx, or pull the container image. No account, no hosted control plane.
$ pipx install primer-ai
$ primer api
$ docker run --rm -p 8000:8000 ghcr.io/primerhq/primer:0.3.0
Either way, open the console at http://localhost:8000/console/
Batteries included
Everything an agent graph needs, in the box.
LLM providers, agents, graphs, knowledge collections, workspaces, channels, triggers, harnesses, and an MCP server — all self-hosted.
Studio
A real operator console — not just logs. Launch, watch, and debug every run: a live graph canvas, the full session transcript, and a streaming event rail, all in one view.
Learn more →Cookbook
Recipes to start from.
Worked examples that wire the building blocks into a running graph.
- Scheduled stock monitorA cron heartbeat that watches and reports.View recipe →
- Incident responderWebhook-triggered triage with a human gate.View recipe →
- Support deskChannel-driven agent with durable memory.View recipe →
- Release conductorMaker + checker shepherding a release.View recipe →
- Code interpreterIsolated workspace runs code safely.View recipe →
- Graphs from scratchCompose a producer–judge graph by hand.View recipe →
Sandboxed by default
Every agent runs in its own sandbox.
Each agent gets an isolated, git-backed workspace, so parallel branches never step on each other. Run those sandboxes wherever you operate — a local process, a Docker container, or a Kubernetes pod. Your data stays on your hardware; the source lives on GitHub.
- Local process
- Docker container
- Kubernetes pod
Draw the graph today.
$ pipx install primer-ai
$ primer api
$ docker run --rm -p 8000:8000 ghcr.io/primerhq/primer:0.3.0