Pick the nodes your agent needs. Draw the graph. Run on any framework.
A workflow routes prompts. A harness governs what your agent believes, what it's allowed to do, and how it recovers. Build one on a canvas, compile to any framework, trace every decision with Langfuse, and deploy as a REST endpoint, MCP tool, or A2A agent.
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.
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.
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.
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.
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.
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
27 node types — 14 execution, 13 harness. Use what your agent needs: a minimal harness might be three nodes, the full stack runs to eleven layers. Both are valid FlowSpec.
Diagram: the same node types compose into different harness graphs — a minimal harness (input → llm_call → verify_gate → recovery → output) and a full 11-layer harness — both valid FlowSpec that compile to LangGraph, CrewAI, Mastra, or Microsoft Agent Framework.
world_model, hypothesis_set, evidence_store, control_state, and a six-state task_graph — the infrastructure for an agent that thinks before it acts.
verify_gate with nine layers, pre-execution review gate, six named recovery strategies via recovery, context compression, exp_store for cross-run reuse, and adversarial reviewer_pass.
Thirteen harness node types on the canvas, Langfuse tracing with harness-specific spans, framework adapters for all four runtimes, and end-to-end tests across every combination.
Build A Harness runs entirely on your machine via Docker. No cloud account, no sign-up — clone the repo, run two commands, and you're drawing harnesses in minutes.
# 1. Generate secrets and configure your environment ./scripts/setup-env.sh # 2. Start all services docker compose up
localhost:3000
The visual harness editor. Design with 27 node types — 14 execution nodes and 13 harness nodes including world model, control state, verify gate, and recovery.
localhost:8000
Compiles FlowSpec to LangGraph, CrewAI, Mastra, or Microsoft Agent Framework and runs your harnesses. Publishes each harness simultaneously as a REST endpoint, MCP tool, and A2A agent.
localhost:3001
Harness-aware observability dashboard. Every run traced automatically across all 4 frameworks — including world model transitions, control state changes, and recovery strategy activations.
Nine services in total. scripts/setup-env.sh handles all the secrets and configuration automatically — you only need to provide your LLM API key (or skip it and use a free local model instead).
Build A Harness routes all AI calls through LiteLLM — a proxy that works with any model provider. You pick the model in your workflow; the rest is handled automatically.
Add your OPENAI_API_KEY and use gpt-4o or gpt-4o-mini in any flow.
Add your ANTHROPIC_API_KEY and use claude-sonnet, claude-haiku, or claude-opus.
Run mistral, qwen3, or qwen2.5-coder locally. No API key, no cost, no data leaving your machine.
Edit one config file to add any OpenAI-compatible model or endpoint — including self-hosted or fine-tuned models.
Want to try it without an API key? Install Ollama, pull a model (ollama pull mistral), and run ./scripts/setup-ollama.sh — it tests all four frameworks end-to-end with no paid account needed.
Build A Harness stores every harness in FlowSpec — an open JSON format you own. Draw on the canvas and the spec is written for you. The same file compiles to LangGraph, CrewAI, Mastra, or MAF. Add harness nodes like verify_gate, world_model, or recovery and they compile too — no rewriting, no lock-in.
{
"workflow": "support-triage",
"nodes": [
{
"type": "llm_call",
"prompt": "Classify severity"
},
{
"type": "condition",
"route": "high_priority"
},
{
"type": "human_review"
}
],
"telemetry": {
"provider": "langfuse"
}
}
A minimal harness is just input → llm_call → output. Add verify_gate and recovery when you want them. Every combination is valid FlowSpec.
Guardrails, retry logic, and HITL approval checkpoints are first-class node types — not wrappers you bolt on afterwards.
Your harness is a JSON file. Check it in, share it, load it on any canvas, or import into your CI pipeline.
Langfuse traces every step across all four frameworks — prompts, tool calls, harness transitions, failures, and costs — without any setup.
Every other visual canvas is tied to one runtime. Build A Harness separates harness design from execution via FlowSpec — so you can experiment, migrate, or compare runtimes without rebuilding your architecture each time.
The production standard for stateful agent orchestration. LangGraph's graph model maps cleanly to FlowSpec — conditional edges compile without rewriting, and harness nodes like world_model, control_state, and verify_gate slot in as standard graph nodes with no translation layer.
The largest community for role-based multi-agent patterns. agent_role nodes map directly to CrewAI Crew, Agent, and Task — your canvas design becomes a crew without translation. parallel_fork for fan-out, memory_read for vector retrieval, and native vector store support included.
The only TypeScript-native orchestrator with first-class harness support. Full HITL pause and resume, full streaming (tokens and graph updates), and native vector memory — all from the same FlowSpec that also runs on LangGraph or CrewAI if you switch later.
The merger of Semantic Kernel and AutoGen in one SDK, covering enterprise .NET, Python, and Java teams in a single adapter. agent_role and agent_debate map natively to AgentGroupChat; HITL runs via the _HitlPause exception pattern; durable state checkpoints via Dapr or Orleans.
The repo ships with five real, working harnesses. Each demonstrates a different composition of node types — open them in the canvas, run them, and modify them for your use case.
Langfuse is the open-source observability platform built into Build A Harness. Every run is traced automatically across all four runtimes — no configuration required. One dashboard covers every prompt, tool call, decision, failure, and recovery action.
Build A Harness extends Langfuse with harness-specific spans that no standard tracing library produces:
llm_call prompt, model, tokens, latency, costtool_invoke name, inputs, outputs, durationerror failure type, node, stack, retry counthitl pause time, who resumed, state diffmemory retrieval query, top-k results, scoresworld_model belief delta, generation_id, contradictionscontrol_state tier transition · NORMAL → CAUTIOUS → BLOCKEDverify_gate which of 9 layers fired, verdict, scorerecovery strategy selected, failure type, replanning scopereviewer_pass 3-lens score, contract verdict, findings
Run the same FlowSpec on LangGraph and Mastra and compare traces side by side. Langfuse runs locally at localhost:3001 — no data leaves your machine.
One API call publishes your harness three ways at once — a REST endpoint, an MCP tool, and an A2A agent — so whatever system needs it can call it the way that makes sense.
Any app can trigger your flow with a standard HTTP POST. No special SDK needed — a curl command or a fetch call is all it takes to run the full harness.
The Model Context Protocol (MCP) lets AI assistants call external tools during inference. Publishing as an MCP server means Claude Desktop, Cursor, and any MCP client can invoke the full harness — including its 11-layer control architecture — directly from a prompt, with no extra code.
The Agent-to-Agent (A2A) protocol is an open standard for AI agent interoperability. Publishing as an A2A agent means other agents — built on Google ADK, OpenAI Agents SDK, Claude Agent SDK, or any A2A runtime — can discover your harness via its Agent Card and delegate tasks to it without a custom adapter.
Drop the visual editor into your own app with the @buildaharness/canvas npm package.
MCP is Anthropic's open standard that lets AI assistants call tools and read context during inference. When Build A Harness publishes a harness as an MCP server, each harness is exposed as a callable tool with a typed input and output schema. Any MCP client — Claude Desktop, Cursor, the Claude Agent SDK — can discover and invoke it with no additional setup.
What this means in practice: a user in Claude Desktop types "summarise this contract and flag unusual clauses" and Claude automatically calls your content-moderation harness — complete with HITL controls, verify_gate, and Langfuse tracing — as if it were a local tool.
A2A is Google's open protocol for AI agent interoperability. An A2A agent publishes an Agent Card — a machine-readable description of its capabilities, inputs, and outputs. Other agents, regardless of their framework, can discover the card and invoke the agent over a standard HTTP interface without needing to know its internal architecture.
What this means in practice: a research agent built on Google ADK can delegate a "parallel risk assessment" subtask to your Build A Harness flow and receive a structured result — with neither agent needing a custom adapter. Compatible with Google ADK, OpenAI Agents SDK, Claude Agent SDK, and any A2A runtime.
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.
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.