01 · CONTROL
You write the flow
Ordered steps, conditions, bounded loops and checkpoints — not a chain of prompts hoping for the best.
MHL
META-HARNESS
LANGUAGE
META-HARNESS LANGUAGE · v1.4 RELEASE CANDIDATE
MHL is a small executable language for orchestrating agents, prompts, tools, memory and external services. Your program owns the flow; AI contributes judgment where it helps.
01 · CONTROL
Ordered steps, conditions, bounded loops and checkpoints — not a chain of prompts hoping for the best.
02 · EVIDENCE
Cost, retries, cache hits, inputs and outputs per step, in append-only memory you can version.
03 · REACH
A directory of workflows becomes MCP tools or Agent2Agent skills with one command.
01 · WHY IT EXISTS
The same logic written as an imperative script with model calls sprinkled through it, versus written as MHL declarations. Same outcome; only one of them can be reviewed, tested and explained to an auditor.
retry, timeout, cache and fallback live on the agent, not scattered through logic.
Explicit signatures and composition, so lint catches the mistake before the run.
memory says what survives the next step, and where it is written down.
02 · ANATOMY OF A WORKFLOW
A real pull-request reviewer in 42 lines. Walk the steps — the file highlights the part being explained.
8 parts
03 · DETERMINISM AND AUDIT
The runtime executes the flow you wrote and reports every step: policy applied, cache, retries, duration and the value that came out. Loops are bounded; long runs can checkpoint and resume.
04 · INTEGRATIONS
Point the runtime at a directory and every workflow is published with its input and output contract. One workflow, one tool.
Newline-delimited JSON-RPC over a subprocess. The client spawns the process.
mhl serve mcp ./workflows
The same workflows over Streamable HTTP, with sessions and async runs.
mhl serve mcp --http \
--addr 127.0.0.1:8711 ./workflows
Publishes workflows as Agent2Agent tasks, with an Agent Card and task lifecycle.
mhl serve a2a \
--addr 127.0.0.1:8710 ./workflows
Bind deliberately, configure authentication for non-local use, choose a state directory for resumable runs, and review the permissions of every workflow.
Serving guide →05 · START IN 30 SECONDS
Install the runtime, save the example as hello.mh and run it. The echo agent needs no API key and no network.
curl -fsSL https://raw.githubusercontent.com/mh-language/mhl-core-runtime/main/install.sh | sh
irm https://raw.githubusercontent.com/mh-language/mhl-core-runtime/main/install.ps1 | iex
mhl run hello.mh --input name=Ana
mhl lint hello.mh
mhl test hello.mh
Hello, Ana. Your first pipeline is running.
06 · DOCUMENTATION
This page is the map. Formal language behavior lives in the ECMA-style specification and the focused guides below.