Not all harnesses are equal.
The model proposes. The harness decides what actually happens.
An agent is a model plus a harness: the loop, context, tools, state and rules around it. For a coding session with someone watching, a light harness is enough. For agents that run for months next to live systems, the harness carries most of the risk. This page shows what that means in practice, and how Meerkat carries it.
Where does the word harness come from?
The term has settled across vendors. LangChain puts it as Agent = Model + Harness
and defines the harness as every piece of code, configuration and execution logic that is not the model. Microsoft describes it as the runtime scaffolding that turns a language model into an agent that can do work. OpenAI and Anthropic both publish guidance on harness engineering for long-running agents.
Four kinds of harness for four kinds of job.
The word harness covers very different software. A few lines around a chat API, a coding agent and an operational agent platform all qualify. They differ in what they assume: who is watching, how long the work lasts, and what happens when something fails halfway.
The longer an agent lives, the more the harness decides.
A request lasts seconds and a coding session an afternoon, with a person watching. A standing agent for a repository, a person or an initiative lives for months. It sits through deploys, restarts, model upgrades and permission changes, and every one of those events lands on the harness, not the model.
Operational agents, the long-lived kind, are what Meerkat was built for.
| What the work needs | Loop library | Coding agent | Agent framework | Operational agent platform |
|---|
central to the design partial or add-on left to the application. Typical for each category, judged from public documentation.
Long-running agents fail in the gaps between events.
A tool finishes as cancellation arrives. A worker restarts after accepting a job. A permission changes while delegated work is in flight.Meerkat documentation, Why Meerkat
Meerkat's design starts from races like these. Pick one and watch the same events play out in a naive loop and in Meerkat.
Try to break a model-checked state machine.
Meerkat defines critical lifecycles once, in a Rust DSL, and generates both the runtime kernel and a TLA+ model from that definition. TLC checks the invariants in every reachable state of the configured model. Below is DetachedJobMachine, which owns background jobs. Act as the host or as two competing workers and watch the guards decide.
One definition, two artefacts.
The same machine definition produces the TLA+ model that TLC explores and the Rust kernel that the runtime runs. Parity gates in CI keep the two aligned. When the checker finds a bad state, the fix lands in the definition, and both outputs change together.
The repository holds 71 TLA+ files. They cover 21 machines and 9 compositions, which check how machines hand work to each other.
This page runs a JavaScript transcription of the transitions in detached_job.rs, simplified for display.
Many agents, run and managed as one unit.
A mob is a group of agents that Meerkat runs as one unit, and its members are built to last. A standing agent for each repository, person and initiative runs for months with its own session, memory and schedule. It takes work from people and other systems, talks to its peers over signed wires and spawns short-lived helpers when work arrives. Core provides the mob runtime. Meta adds lasting identities, the console and hosting.
Standing agents at the top, helpers on demand.
A mob holds the agents that live for months. Shorter work uses lighter patterns on the same members, sessions and comms, so a standing agent can delegate, fork or convene a council without leaving the mob.
Source: Meerkat docs, guides/mobs and guides/comms.
| Pattern | Use it for | How long it lives |
|---|---|---|
delegate | A quick answer that the calling turn needs right away | Returns its result to that turn |
fork_off | Background work that starts from the caller's own transcript | Owned by the caller and retired with it, deepest first |
council | A short discussion among forked specialists | A temporary mob, cleaned up after the outcome |
| Flow | Steps in a fixed order, with fan out, fan in and repeat until done | One run of the flow |
| Mob | Standing agents with identities, wiring, memory and history | Months, across restarts, deploys and upgrades |
Months, not minutes.
An identity member keeps its session, memory and schedules across deploys, restarts and model upgrades. A mob need not keep every member running: one that is not needed stays dormant and starts on its first message. A run cut short by a crash or a deploy continues from its last committed tool round. Peers address a stable identity, never a process.
One agent for each thing that matters.
A repository, a person, an initiative, a service. Each gets an agent that knows its history and owns its corner of the work graph, so knowledge stays attached to the thing, not to a chat window.
Helpers come and go.
Standing members spawn plain helpers or whole sub-mobs for a piece of work, under authority the host has narrowed, and retire them when it is done.
Agents coordinate by message and never block on each other.
Members exchange signed messages over peer wires. Nobody holds a turn open waiting for an answer: a sender ends its turn and takes the reply as a later one. Every send says whether it joins the current run or waits for the next, and every uncertain outcome has a name.
Trust follows the wiring.
Peers sign every envelope with Ed25519 keys and accept messages only from trusted peers. Wiring two members creates that trust. Untrusted senders are dropped with a typed reason. The channel runs in process, over Unix sockets or over TCP.
External systems can write in.
Webhooks, scripts and stdin push plain events into a running agent's inbox, and an idle agent wakes up to handle them. Meta adds trusted routing, idempotency keys and rate limits for those deliveries.
A society of agents.
Long-lived members coordinate through announcements across processes and machines, and people join the same conversation from the console. It runs on mobs, so it shares their identities, wiring and recovery.
Members can run on other machines.
One controller keeps the roster, wiring and grants. A member host runs a placed member's session with its own credentials and memory. When a host goes quiet, the controller reports a typed outcome instead of guessing, and settings that cannot travel are refused at placement rather than dropped.
A realm decides which processes share state.
Every session, schedule, job and mob lives in a realm. Processes that name the same realm on the same storage share that state, whether they are a CLI, a service or a notebook. Config inherits down a chain of realms. State never does.
Eight ways in, one runtime underneath.
The CLI, the Rust crate, the Python and TypeScript SDKs, REST, JSON-RPC, MCP and the browser all reach the same engine. Sessions, schedules and mobs live in a realm that several processes can share. Pick the surface that matches where your code lives.
Snippets follow the documentation at docs.rkat.ai, which has longer recipes for schedules, durable jobs, mobs, member hosts and realms. Install Meerkat.
Built to be checked, built to run.
Every claim on this page traces to the source, the specifications or the documentation. Open the repository and check any of it.
Evidence you can check
- Open source. MIT or Apache-2.0, written in Rust, provider agnostic, with self-hosted models supported.
- Generated, checked lifecycles. One definition produces Rust and TLA+. TLC checks the named invariants in every reachable state of the model: 80 for the session machine, 109 for mobs.
- One runtime, eight surfaces. CLI, Rust, Python, TypeScript, REST, JSON-RPC, MCP and browser share the same engine and realm model.
- Explicit failure semantics. Documented contracts for recovery, cancellation, leases, misfires and worker loss.
- In daily use. Two systems run on Core and Meta, from a household to an engineering organisation.
Built for production work
- Scale. Operational peaks around 1,000 agents, and synthetic runs with 10,000.
- Durable by default. Runs commit at every tool round and continue after a crash or a deploy. Realms live on SQLite or in your own database, with durable mob logs, fenced jobs, and schedules with misfire and overlap policies.
- Typed failure everywhere. Classified errors, exit codes and typed refusals on every surface, so scripts and dashboards can act on them.
- Authority at the point of use. Grants narrow along delegation chains and are checked again just before each tool call. A tool can stay closed until a person grants it, for one run or one agent identity.
- Any model. Anthropic, OpenAI, Gemini, Azure OpenAI, GitHub Copilot and self-hosted OpenAI-compatible models, with capability checks before each request. Sign in with an API key, a cloud identity, or a ChatGPT or Copilot account.
- Small footprint. A minimal native build of about 20 MB, with targets down to ESP32 and WebAssembly.
Read further.
Quotes are short and attributed. Meerkat facts come from the repository and its documentation.
- The Anatomy of an Agent Harness, LangChain
- Agent harness, Microsoft Agent Framework documentation
- Effective harnesses for long-running agents, Anthropic
- Harness engineering, OpenAI
- Codex as a platform, OpenAI
- docs.rkat.ai, Meerkat documentation
- github.com/lukacf/meerkat, source, specs and machine catalogue