Build A Harness
OPEN SOURCE · APACHE 2.0 · SELF-HOSTED

Build the harness
around your agent.

An open-source visual canvas and runtime for the layer that makes agents reliable — world model, control state, verification, recovery. Draw it once, compile the same FlowSpec to LangGraph, CrewAI, Mastra, or Microsoft Agent Framework.

A harness is the governance and reliability control plane around an autonomous agent — the agent proposes, the harness decides what happens next. Use three nodes or all eleven layers. The reference application, Aielia, runs the full implementation on every turn.

Build your own harness →

Diagram: a simple agent loop (input → LLM call → tool call → output) compared with a full Build A Harness — an 11-layer architecture across 27 nodes that adds caller state, a world model, reasoning, a 5-tier control layer, planning, execution, 9-layer verification, recovery, memory, optional learning, and an output reviewer pass.

Simple Agent Loop
Input / Caller
LLM Call
Tool Call↺ loop
Output
prompt in → answer out
no world model · no control state · no verification
vs
Full Harness — Implemented
Caller Stateconstraints · clarification · propagation
World Modelbeliefs · contradictions · generation_id
Reasoningevidence · hypotheses (4 sources) · VOI
Control5-tier resolver · deadlock detectkey
Planningtask graph (6-state) · parallel concurrency
ExecutionVOI · review gate
Verification9 layers
Recovery6 strategies
Memorycompression · journal
Learningexperience store · warm start (optional)
Output & Reviewer Passcontract · 3-lens review
27 nodes · 11 layers · world model + 5-tier control · 9-layer verification
WHY A HARNESS, NOT JUST A WORKFLOW

A harness does what a workflow can't.

A workflow routes prompts from node to node. A harness governs what the AI believes, what it's allowed to do, how it catches its own mistakes, and what it learns for next time. Use three nodes or eleven — the same FlowSpec runs either.

Reasoning, not just prompting

Add a world_model node and your agent tracks typed beliefs, detects contradictions, and evaluates hypotheses from four generation sources before acting — instead of just asking the LLM and hoping.

Control that holds

Drop in a control_state node and your agent gains a five-tier resolver that governs every action — NORMAL → CAUTIOUS → BLOCKED. Diagnostic health vectors drive it; deadlock detection stops it escalating forever.

Verification with teeth

A verify_gate runs nine checks before every action. Pair it with reviewer_pass for adversarial review and contract validation before every return. Trust, but verify — and actually enforce it.

Recovery and learning

Add recovery for six named strategies, typed failure detection, and local vs global replanning. Attach exp_store and your agent reuses successful decompositions across future runs.

27 node types · 14 execution + 13 harness · 4 framework adapters · Langfuse observability

BUILD YOUR OWN

Underneath the assistant is a visual builder.

The same 11 layers Aielia runs are node types on a canvas. Draw the graph and it is written to FlowSpec — an open JSON file you own — and the same file compiles to LangGraph, CrewAI, Mastra, or Microsoft Agent Framework. Use three nodes or all eleven; every subset is valid.

27 node types

14 execution nodes and 13 harness nodes — world model, 5-tier control state, 9-layer verify gate, six recovery strategies, adversarial reviewer pass. Mix and match any subset.

4 framework adapters

One FlowSpec compiles to LangGraph, CrewAI, Mastra, or Microsoft Agent Framework. A compile-time capability check flags anything a target runtime can't fully support instead of degrading it silently.

Traced and deployable

Every run traced automatically in Langfuse with harness-specific spans. One API call publishes a harness as a REST endpoint, an MCP tool, and an A2A agent at once.

Runs on your machine

./scripts/setup-env.sh && docker compose up — no cloud account. Bring an LLM key or run a free local model with Ollama.

27 nodes · 11 layers · FlowSpec v1.0.0 · open, portable JSON · Apache 2.0

OBSERVATORIES · LIVE DATA

See what the ecosystem actually looks like.

Two live indexes of open-source projects, with GitHub stats refreshed daily by GitHub Actions — built to help you choose what to build on, and to see where a harness fits.

AI Agent Frameworks

A ranked, searchable index of open-source agent frameworks — orchestration, multi-agent, RAG, no-code, code generation and more — with stars, forks, language, license, and topics. Sort and filter by any of them.

Browse agent frameworks →

AI Agent Memory Frameworks

A curated index of open-source memory frameworks for agents, classified by layer (Framework, Infra, Research), memory class, architecture pattern, license, and maturity.

Browse memory frameworks →

MEASURED, NOT ASSERTED

Every feature has to earn its cost.

We run a controlled benchmark on the harness's reasoning features — one feature toggled per arm, a stress corpus, several seeds, an LLM judge — and publish the result whether it is positive or negative. A feature that doesn't pay for itself stays merged but flagged off, and the turn-by-turn transcripts behind every run are public.

REFERENCE APPLICATION · AIELIA

The harness, in everyday use.

Aielia is a general-purpose agent built on Build A Harness. Hand it multi-step work — research across a list, files to go through, a message to draft and send — and the harness decides, in code, what it may do next, what it may believe, and what a job may cost. Anything that can't be undone is staged for your approval. It is the architecture, kept honest by daily use.

a batch job, under control (illustrative)
> Find the pricing page for each vendor and
  summarise the plans:
  - Acme
  - Globex
  - Initech
  - Umbrella
  - Hooli

  budget    calibrated on the first two items, per item
  Acme      found
  Globex    found
  Initech   not_found — 3 dead ends in a row, moved on
  Umbrella  found
  Hooli     truncated_while_productive — budget reached
  reply     built from those outcomes; nothing omitted

> Email that summary to the team.
  staged — send_email waits for your approval.
  The exact action is recorded; nothing else can
  be swapped in after you say yes.

What the harness holds in place

Per-tool-call control state

Every read-only tool call is checked against a live 5-tier resolver before it runs — deterministic ALLOW / DENY / REQUIRE_APPROVAL, not an advisory hint.

Fail-safe risk classification

A classifier error resolves to "requires approval" — it never defaults to low-risk. Judged in any language, not just English.

Staged effects

write_file, run_shell_command, and send_email stage the exact action for approval — no second model call can improvise a different one.

Untrusted-content boundary

Web results and shell output are wrapped as data the model is told never to obey, and survive a crash mid-turn via checkpoint resume.

npx @buildaharness/aielia · CLI, browser, or desktop · one core, one harness · Apache 2.0

PUBLIC ALPHA

Build A Harness is in public alpha.
Build with it.

The canvas, framework adapters, observability layer, and the full harness node library are working and ready to use. Your real harnesses, bug reports, and contributions shape what gets fixed and what gets prioritised next.

Public alpha — current and planned work is in the open

The canvas-and-adapters layer is stable but alpha — APIs may shift, Docker Compose behaviour may vary, and edge cases in less-common node combinations aren't fully covered yet. The full harness reasoning and control architecture is implemented and tested. Run it, break it, and tell us what you need. Every report shapes what gets prioritised.

track A · run & report

Run it against real flows

One docker compose up starts all twelve services. Point it at a real flow — your actual use case, not a toy example. When something breaks, crashes silently, or produces wrong output, open a bug report with your FlowSpec JSON, the runtime you used, and the full error. The more specific, the faster it gets fixed.

Report a bug →
track B · shape the roadmap

Tell us what you need

Missing a node type? A harness feature that would change how you build? A runtime behaviour that doesn't map cleanly? Open a feature request. Describe what you're building and where Build A Harness falls short — concrete use cases carry far more weight than abstract asks. Phase priority is influenced by community demand.

Request a feature →
track C · build with it

Build a node pack or contribute a phase

FlowSpec v1.0.0 is stable for third-party node packs (@buildaharness/nodes/…). The full harness implementation is public and open for community contribution. The spec, adapter interface, and canvas package are all stable enough to build on today.

Read the spec →
FAQ

Questions, answered.

What is Build A Harness?

Build A Harness is an open-source (Apache 2.0) visual canvas for designing, testing, and deploying production AI agent harnesses. Draw the full architecture using 27 node types — 14 execution nodes plus 13 harness nodes that implement the complete 11-layer control architecture: world model, 5-tier control state, 9-layer verification, 6 recovery strategies, and cross-run learning. A single FlowSpec export compiles the same design to LangGraph, CrewAI, Mastra, or Microsoft Agent Framework — no rewriting the design, and a compile-time capability check fails fast if a target runtime can't fully support what the spec needs rather than silently degrading it. Every run is traced automatically via Langfuse, HITL controls let humans pause and resume any flow, and one API call publishes the harness simultaneously as a REST endpoint, an MCP tool, and an A2A agent. Everything runs locally via Docker — no cloud account required.

Is there an assistant built on it?

Yes — Aielia, an open-source AI agent that takes on multi-step work while the full 11-layer harness controls what it may do, believe, and spend — and stages anything irreversible (sending email, writing a file, running a command) for your approval. It has its own site at myaielia.com; the source lives in packages/aielia of this repository.

What's the difference between a harness and a workflow?

A workflow routes prompts from node to node. A harness governs what the agent believes, what it's allowed to do, how it catches its own mistakes, and what it learns for next time. The 5-tier control state knows when to slow down or stop; nine verification layers check outputs before they land; recovery strategies handle failures systematically instead of crashing.

Can I build my own harness?

Yes. Build your own covers the visual canvas, the 27 node types, FlowSpec, the four framework adapters, Langfuse tracing, and REST/MCP/A2A deployment. FlowSpec v1.0.0 is stable and open for third-party node packs (@buildaharness/nodes/…).

Is it open source?

Yes — Apache 2.0. The canvas, adapters, FlowSpec, and the full harness implementation are all open.

Does it require a cloud account?

No. Everything runs locally via Docker — ./scripts/setup-env.sh && docker compose up. You only need an LLM API key, or skip it and run a free local model with Ollama.

{ "@type": "Question", "name": "Is there an assistant built on it?", "acceptedAnswer": { "@type": "Answer", "text": "Yes — Aielia, an open-source AI agent that takes on multi-step work while the full 11-layer harness controls what it may do, believe, and spend — and stages anything irreversible (sending email, writing a file, running a command) for your approval. It has its own site at myaielia.com; the source lives in packages/aielia of this repository." } },