Skip to main content
AGENT WORKFLOW LANGUAGE

Prompts make wishes.
Code makes them real.

Define 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

verify.flowA code delivery workflow
01
Implement the changeagent(implementer)
stage
02a
Run the testsexpect TestReport
02b
Review the risksexpect ReviewReport
03
Evaluate acceptanceTests pass. No blockers remain.
verify
Acceptance ruleRUNTIME
pass when tests.passed
 and review.blockers.empty

Conditions not met? The workflow stops here.

Workflow illustration · from verify.flow
01
Before executionCheck syntax, types & dependencies
02
After each callValidate the agent’s output structure
03
During executionLimit concurrency, access & time
01 / MAKE THE RULES EXPLICIT

“Follow these steps”
only gets you so far.

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 decisions
01

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 Result
02

Progress has a condition.

Write acceptance criteria as a pass when expression. Use require to stop failed results from moving forward.

require result.passed
03

Execution has boundaries.

Declare concurrency, call budgets, timeouts, and requested permissions. The host policy still determines which capabilities are available.

limits · tools · timeout
02 / READ THE CODE

The rules live outside the prompt.

Three excerpts. Three places where the runtime enforces your intent.

simple.flow / Code excerpt
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 guide

Surrounding types and some task parameters are omitted for clarity. See the docs for complete examples.

START SMALL

Run one step.
Then build the workflow.

Start 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 quickstart
Run from the repository root
pnpm install
pnpm build
node packages/cli/dist/main.js check examples/simple.flow

Requires Node.js 20 or 22 and pnpm ≥ 9. The CLI demo uses FakeAgentRuntime; no real model is called.

For workflows with stages, dependencies, and acceptance criteria. For a single question, a direct model API call is enough.