Open source · MIT licensed · Alpha

Run agent harnesses as managed services.

Garrison is a self-hosted, multi-tenant control plane for Claude Code, Codex, Mux, Gemini CLI, and any command-line agent you describe with a harness profile. Your applications call agents over REST, MCP, or A2A. Workers you operate pull the work, run the harness, and stream the results back.

Garrison is alpha software. The API, MCP tools, schema, and SDKs can change between releases.

Garrison logo: a blue castle with three towers and a flag

What it is

One place to operate the agents you already use

Coding and research agents like Claude Code and Codex are built to run in a terminal. Garrison turns them into services. You define an agent once, bind it to a harness, prompts, tools, and secrets, and then any application, script, or other agent can invoke it.

Every request goes through the same tenants, credentials, and role-based permissions. Every run is recorded: which deployment ran it, which prompt template versions it was compiled with, what the harness printed, what it cost, and who approved what along the way.

Harnesses
Claude Code, Codex, Mux, Gemini CLI, a provider API harness, and any CLI that prints JSON lines
Interfaces
REST with server-sent events, an MCP server, and an A2A gateway with one agent card per agent
Runs on
Docker Compose on one host, or Kubernetes (minikube, K3S, or a production cluster)
Built with
.NET 10, SQLite or PostgreSQL, and a React operator console

What it does

The operating model around agent execution

Garrison does not replace your agent. It handles configuration, access, dispatch, review, and history so the agent can be shared safely.

Harness profiles are data

A profile describes the executable, argument templates, environment, files to write, how the prompt is delivered, the MCP config format, and which parser reads the output. Clone a built-in profile and edit it without a release.

Every prompt is a template

System prompts, task wrappers, delegation instructions, and tool descriptions are versioned templates with a live preview. Each run records the exact versions it used.

Deployments bind it together

A deployment ties an agent to a harness, prompts, MCP servers, secrets, a workspace, placement rules, and limits. Weights split traffic, so a Claude Code variant and a Mux variant can run side by side.

Agents that call agents

With delegation turned on, an agent gets a short-lived run token and can invoke the agents its policy allows, within depth limits and never with more permission than the person who started the chain.

Approvals when it matters

Tool calls that need permission go to Garrison. Allow, deny, and ask rules settle most of them. The rest wait in an approvals inbox until someone decides, and a timeout denies by default.

Pipelines with review gates

Chain agents into stages. Each stage gets the previous result and artifacts, and a stage can stop for a person to approve it, send it back with feedback, or reject it.

Triggers and notifications

Start agents or pipelines on a cron schedule or from an HMAC-signed webhook. Garrison posts signed notifications to your endpoints when runs finish, fail, or wait for approval.

Multi-tenant from the first request

Tenants, users, credentials, roles, scoped role assignments, encrypted secrets, audit records, and request history. Cross-tenant reads return 404.

Operations you can explain

See why a run can or cannot be placed, track queue and execution time, and follow runs through Prometheus metrics, OpenTelemetry traces, logs, and Grafana dashboards.

Coming in 0.2.0

Version 0.2.0 is in development. It adds the building blocks for Garrison Agent Studio, the direction Garrison is heading: one platform to build, deploy, operate, manage, and observe agentic applications. These pieces are implemented on the release branch; the studio itself is not released yet.

  • Revisions, environments, and promotion. Agent definitions are versioned. A deployment runs one published revision, and promotion moves a tested revision from dev to staging to prod.
  • Agent assets. Versioned skills, reference files, and document templates, placed into each run's workspace where the harness expects them.
  • Conversation file spaces. A shared folder per conversation. Every turn and every delegated agent reads and writes it, and the person using the app can download the result.
  • Capability catalog. Agents, MCP tools, and host programs listed in one shape, with schemas and cost and latency hints, so an orchestrating agent can choose what to call.
  • Parallel fan-out and gather. An agent starts several children in one call and gathers their results with an all, any, or quorum join, under budget and timeout limits.

How it works

A control plane that compiles, workers that pull

The control plane decides what runs and how. Workers only make outbound connections, never touch the database, and run exactly what they are handed.

Garrison architecture Clients such as the dashboard, SDKs, MCP clients, and A2A agents call the Garrison control plane over REST, MCP, or A2A. The control plane stores state in SQLite or PostgreSQL. Worker nodes connect outbound to the control plane to lease runs, then launch harnesses such as Claude Code, Codex, Mux, Gemini CLI, or any CLI, and send events and results back. Clients Dashboard SDKs and curl MCP clients A2A agents Triggers, webhooks REST + SSE :8700 MCP :8701 A2A :8700 Control plane N replicas Authenticate and authorize Pick a deployment Queue and claim the run Compile the ExecutionSpec Approvals, pipelines, audit SQLite or PostgreSQL state, leases, events Workers M replicas, pull only Prepare workspace Launch the harness Parse its output lease (long poll) ExecutionSpec events, result Harnesses claude codex mux gemini any CLI
Workers connect out to the control plane. Nothing connects in to a worker, and no worker holds database credentials.
  1. A caller invokes an agent

    Over REST, MCP, or A2A. Garrison checks the caller's permission to execute that agent, picks one of its deployments by weight, validates any parameter overrides, and stores the run as queued.

  2. A worker leases it

    Workers long-poll for work. A claim is an atomic compare-and-set that bumps a fencing epoch, so two workers can never both own a run.

  3. The control plane compiles the run

    It resolves the full command line, environment, files, stdin, parser, timeouts, and MCP servers into an ExecutionSpec, and mints a run token if the agent uses Garrison tools. The worker never renders a template.

  4. The worker runs the harness

    It prepares the workspace, checks MCP servers before launch, starts the harness, and sends parsed events back in batches. Callers watch them live over SSE or WebSocket.

  5. Garrison finalizes

    The result is stored, the run token is revoked, and the run shows up in transcripts and analytics. If a worker dies, its lease expires, the leader requeues or fails the run, and a stale worker that returns is fenced out by its old epoch.

Use cases

What people run on it

Coding agents behind an API

Give your product or internal tools a Claude Code or Codex agent they can call with one request, with workspaces, secrets, and limits set by the operator instead of the caller.

Teams of specialist agents

Publish a reviewer, a researcher, and a writer as separate agents, and let an orchestrator delegate to them. The run tree shows who called whom and what each one returned.

Workflows with human review

Draft, review, and revise in pipeline stages, with a person approving or sending work back between stages, and risky tool calls held for approval.

Scheduled and event-driven agents

Run a nightly report on a cron schedule, or start an agent from a signed webhook when a ticket opens, and get a signed notification when it finishes.

A shared platform for several teams

Operate one set of workers for many tenants. Each tenant keeps its own agents, secrets, permissions, and run history, and scheduling weights keep one tenant from crowding out the rest.

Comparing harnesses and models

Put two deployments of the same agent on different harnesses or models, split traffic by weight, and compare time to first token, cost, and outcomes on the Analytics page.

Benefits

Why run agents this way

Change the agent, not the caller

Harness profiles, prompts, and deployments are configuration. Swap a model, a tool, or the whole harness and the integration calling the agent stays the same.

One security model on three protocols

REST, MCP, and A2A share tenants, credentials, roles, and audit. You do not maintain separate access rules per protocol.

Workers stay simple and contained

Workers pull work over outbound connections and never see the database. Run them on a laptop, a VM, or as a StatefulSet, and use per-run Kubernetes pods for untrusted work.

Scale each side on its own

Control-plane replicas and workers scale independently. PostgreSQL holds shared state for multi-replica installs, and any replica can serve any client.

Evidence for every run

Exact template versions, events, transcripts with secret redaction, cost, approvals, and the effect journal are all recorded, so you can answer what happened and why.

Yours to run

MIT licensed and self-hosted. Your harness credentials are stored as encrypted tenant secrets, never as worker environment variables.

Garrison dashboard home page in the light theme, showing run counts, worker status, and recent runs
The operator console, light theme.
Garrison dashboard deployments list in the dark theme, showing deployments with their harness profiles and weights
Deployments, dark theme. Screenshots use synthetic test data.

Getting started

Pick the runtime you already have

Docker Compose is the quickest way to see Garrison work. Kubernetes adds per-run pod isolation and cluster deployment. Every option seeds tenant default with administrator admin@garrison and generates a random password; there is no default password.

You need Docker with Compose v2, about 10 GB of free disk, and 8 GB of memory allocated to Docker to start. The stack runs a control plane, two workers, PostgreSQL, the dashboard, and Prometheus, Grafana, Tempo, Loki, and Alloy.

$ git clone https://github.com/jchristn/Garrison && cd Garrison/docker
$ ./update.sh               # generates keys into .env, builds the images, starts the stack; Windows: update.bat

Open http://127.0.0.1:8080 and sign in with the administrator password update.sh printed. It is also GARRISON_ADMIN_PASSWORD in docker/.env, where optional harness credentials (Claude, Codex, Mux) and ports go too.

Default ports, all bound to 127.0.0.1
ServiceAddress
Dashboardhttp://127.0.0.1:8080
REST and A2Ahttp://127.0.0.1:8700
MCPhttp://127.0.0.1:8701/mcp
PostgreSQL127.0.0.1:5433
Grafanahttp://127.0.0.1:3000

Docker Compose guide

Then build your first agents

The quick start picks up from any running stack. It stores your harness credentials as secrets, applies a sample set of agents on Claude Code, Codex, and the fake harness (one allowed to delegate to the others), and calls each of them over REST, MCP, and A2A. No provider account? The echo agent and the fake-harness smoke test work without one.

Questions, ideas, bug reports

Talk with us on Discord, or open an issue on GitHub.