Primer

Self-hosted control plane for agent fleets · MCP-native

Build the loop.
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
$ pipx install primer-ai
$ primer api
Docker
$ docker run --rm -p 8000:8000 ghcr.io/primerhq/primer:0.3.0
Try the quickstart →

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.

Bloated context attention dilutes toward the middle
the model loses this
Primer · tight context small, purpose-built — bright edge to edge
0 ~8k context size → acc Primer (tight) Naive (bloated)

Loop engineering

A producer drafts. A judge critiques. It loops until it passes.

Primer gives you the building blocks for designing agent loops — directed cyclic graphs where work is made, checked, and either retried, escalated to a human, or delivered.

retry escalate pass
  • HeartbeatTriggers on cron, delay, or webhook.
  • IsolationGit-backed workspaces: local, container, or Kubernetes.
  • Durable memoryWorkspaces plus knowledge collections.
  • Maker + checkerProducer drafts, judge critiques, loop 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 · Python
$ pipx install primer-ai
$ primer api
Docker
$ 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 loop 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 loop.

Sandboxed by default

Every agent runs in its own sandbox.

Each agent gets an isolated, git-backed workspace, so parallel loops 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
View on GitHub →

Build the loop today.

pipx · Python
$ pipx install primer-ai
$ primer api
Docker
$ docker run --rm -p 8000:8000 ghcr.io/primerhq/primer:0.3.0