OpenAWF 0.1.0 · draft
Specification
The OpenAWF Specification (Open Agentic WorkFlow) defines a tool-agnostic document for an agentic workflow. A workflow is a finite-state machine of tasks that runs from a start task to a terminal one.
Document
A workflow is one self-contained document in YAML or JSON. It declares its tasks, their orchestration, and every server the tasks depend on. Nothing is left to the environment.
Each spec version ships three files. The prose specification is normative. The JSON Schema validates structure and cannot express every rule; where the two conflict, the prose wins.
| File | Role |
|---|---|
versions/0.1.0.md | The specification in prose. Normative. |
schemas/0.1.0/schema.yaml | JSON Schema 2020-12, hand-authored. Structural only. |
schemas/0.1.0/schema.json | The same schema, generated as JSON. |
Point an editor's YAML language server at the schema with a modeline:
# yaml-language-server: $schema=https://openawf.org/schemas/0.1.0/schema.json
Workflow fields
| Field | Required | Meaning |
|---|---|---|
openawf | yes | The spec version the document is written against. 0.1.0. |
name | yes | The workflow's name. |
summary | One line on what the workflow does. | |
model | The model every task runs on unless a task overrides it. | |
version | The workflow's version, major.minor.patch. Required to seal. | |
sha | The content hash, algorithm-prefixed (sha256-…). null until sealed. | |
source | Where the workflow is fetched from. Omitted when it is authored in place. | |
start | yes | The task the flow begins at. |
orchestration | yes | The task graph. Each key is a task name; its value is the transition out of that task. |
tasks | yes | Task definitions keyed by name. Each entry is an inline task or a $ref. |
mcp | MCP servers the workflow depends on, keyed by name. |
Orchestration
Each orchestration key names a task. Its value is one of three transitions.
| Form | Meaning |
|---|---|
null | The task is terminal. The flow ends after it. |
| an edge | An unconditional transition to one task. |
| a branch | A map from each outcome the task emits to an edge. |
An edge is a task name, or an object that names the task under task and adds execution policy.
| Edge field | Meaning |
|---|---|
task | The task the edge leads to. |
retries | Attempts after the first failure before the task fails hard. null, the default, retries indefinitely. 0 allows one attempt. |
session | fresh, the default, starts a new context. resume keeps the prior session's context. |
orchestration: plan: build # edge build: pass: ship # branch on outcomes fail: task: build # edge with policy retries: 2 session: resume ship: null # terminal
task is reserved inside a branch: it marks an edge object, so no outcome is named task.
Tasks
A task is an atomic, reusable unit of work. It is defined once and can be pinned by version in any number of workflows. body is the only required field.
| Field | Meaning |
|---|---|
body | The tool-agnostic prompt, in Markdown. |
summary | One line on what the task does. |
outcomes | The outcomes the task may emit. A task with outcomes branches on all of them. |
input | A JSON Schema the incoming data must satisfy. |
output | A JSON Schema the task's output must satisfy. |
model | Overrides the workflow's model for this task. |
uses | Names of servers in mcp the task requires. |
version | The task's version. |
sha | The task's content hash. null until sealed. |
source | Where the task is fetched from. A bundled $ref task records its reference here. |
Task files
A task on its own is a Markdown file. The YAML frontmatter holds every field except body and declares openawf. The Markdown after the frontmatter is the body.
--- openawf: 0.1.0 version: 1.2.3 summary: Review a diff against its request. outcomes: [pass, changes] --- # Review Read the diff against the request. Emit `pass` when it is correct and complete. Otherwise emit `changes` and return a list of review notes.
References
A task entry of the form { $ref: … } points at a task defined in another file. Orchestration edges always name tasks by their key in tasks; $ref only says where a task's definition lives.
A workflow with references is a source split over several files. Bundling inlines each referenced task into tasks and records the reference in its source. Sealing bundles first, so a sealed workflow is one file and holds no $ref.
MCP servers
mcp declares the MCP servers a workflow depends on, keyed by name. Each server names its transport (stdio, http or sse) and the tools the workflow uses from it. "*" grants every tool. A task lists the servers it needs in uses, and the runner exposes only those.
Server sources, tool-contract hashes and secrets are under revision. A server declared by package URL or HTTPS endpoint, with a hash of its tool contract, is drafted on the specification's feat/mcp-sources branch.
Validation
A conformant validator runs three passes in order: structure against the JSON Schema, then the graph, then the hash. A rule that stops the workflow from running is an error. A rule about something that can never be used is a warning.
| Check | Rule | Severity |
|---|---|---|
| start resolves | start names a defined task. | error |
| edges resolve | Every edge leads to a defined task. | error |
| nodes match tasks | Every task has an orchestration node, and every node names a task. | error |
| branch required | A task with outcomes takes a branch, not a plain edge or null. | error |
| branch coverage | A branch has an edge for each outcome and no others. | error |
| terminal exists | At least one task is terminal. | error |
| liveness | A terminal task is reachable from every task the start reaches. | error |
| servers declared | Every name in uses is a server in mcp. | error |
| hash | A non-null sha matches the content. | error |
| reachability | Every task is reachable from start. | warning |
Liveness rejects a retry cycle with no exit, which no other check catches.
Sealing
Sealing fixes a document's content and gives it an identity. The sha is computed over a canonical form of the document.
- Bundle the document, inlining every
$ref. - Convert the YAML to JSON.
- Remove the top-level
shaandversion. - Serialize with the JSON Canonicalization Scheme, RFC 8785.
- Hash with SHA-256 and prefix the algorithm:
sha256-<hex>.
Bundling before hashing makes the sha independent of how the source was split across files. A task hashes the same way, with its frontmatter and body as one object.
The version is excluded because it is a label. Two versions with identical content share a sha. A document with sha: null is unsealed and has no provenance.
sha384 and sha512 prefixes are also accepted for verification.
Versioning
Versions are major.minor.patch. A workflow pins each task to an exact version. There are no version ranges and no solver: tasks are leaves, so no dependency graph exists to resolve.
A sealed version never changes. Changing it means writing a new draft and sealing it at a newer version.
Roadmap
These additions are in design for the specification.
| Feature | Change |
|---|---|
| Artifact provenance stamps | A stamp on every commit, comment, ticket and file a task produces, naming the workflow, task, version, sha, source and run. |
| Parallel transitions | A transition to a list of tasks, with a join that waits for every branch. |
| Sub-workflows | A workflow used as one step of another, with the interface of a task. |
| Execution limits | Timeouts, turn and cost caps, and a failure route taken after retries run out. |
| Prompt parameters | A placeholder syntax for input fields in body, by plain substitution. |
| Model settings | Effort, max tokens and temperature at workflow level, overridable per task. |
| Extension space | A reserved place for runner-specific fields, with typos in real fields still rejected. |
| MCP sources | Servers declared by immutable source, a tool-contract hash, and declared secrets. |