Outputs have a contract.
Declare the fields and types your next step needs with expect. Results must pass structural validation before they can be used as that type.
expect ResultDefine steps, outputs, and acceptance criteria in a .flow file. Agents do the work. The runtime validates results, limits resources, and stops when conditions aren’t met.
Standalone language · Embeddable runtime · Model independent
agent(implementer)expect TestReportexpect ReviewReportpass when tests.passed
and review.blockers.emptyConditions not met? The workflow stops here.
A single model call rarely needs a new language. But once tasks have dependencies, run in parallel, and need acceptance checks, the workflow deserves an explicit definition.
Explore the design decisionsDeclare the fields and types your next step needs with expect. Results must pass structural validation before they can be used as that type.
expect ResultWrite acceptance criteria as a pass when expression. Use require to stop failed results from moving forward.
require result.passedDeclare concurrency, call budgets, timeouts, and requested permissions. The host policy still determines which capabilities are available.
limits · tools · timeoutThree excerpts. Three places where the runtime enforces your intent.
stage answer -> Result {
return agent(writer) {
task "Answer the request"
input {
request: input
}
tools none
expect Result
}
}
expect Result generates a JSON Schema for runtime validation. One repair attempt is allowed by default; invalid output then raises an error.
Read the language guideSurrounding types and some task parameters are omitted for clarity. See the docs for complete examples.
Separate implementation from verification. Run checks in parallel and let the acceptance rule decide what proceeds.
verify.flowDispatch each item, limit how many run at once, and collect structured results for the next step.
parallel.flowConstrain a plan with types, item counts, and uniqueness checks so the next stage gets explicit work items.
delivery.flowStart with simple.flow. Check the syntax, inspect the compiled output, and run it in the sandbox. Connect a real model through your own AgentRuntime adapter.
Follow the quickstartpnpm install
pnpm build
node packages/cli/dist/main.js check examples/simple.flowRequires Node.js 20 or 22 and pnpm ≥ 9. The CLI demo uses FakeAgentRuntime; no real model is called.