A workflow is a written plan DataMind Oda runs to spread many pieces of a task across helper agents and bring back one result. Ask for one when a piece of work splits into many independent parts that a single script should coordinate, such as an audit over many files, a migration or research from several angles.
workflow: <name>.The script is plain JavaScript, not TypeScript, and it ends with a return of the value to hand back. It coordinates with a small set of hooks, and the helper agents do the work; the script itself gets no filesystem, network, timer or Node.js APIs.
agent(prompt, options?) starts one helper and resolves with its result.parallel(thunks) runs the given functions together and collects their results.pipeline(items, . . . stages) moves each item through its stages independently, with no barrier between items.phase(title) opens a progress phase, and log(message) writes a progress note.args reads the input the call carried.Helper options are a closed set. An agent() call takes a label and a phase for how the call appears, a schema for a structured result within a supported subset, and provider and model overrides. An option outside the set is refused, and the refusal names the supported options.
A run ends once: it completes, is cancelled, or fails. A run that does not complete is an error, and nothing it produced on the way is reported as success.
workflow "<name>" completed (<n> agents)., then Return value: and the script's value. The count is how many helper calls the run started.Error: workflow run was cancelled.Error: workflow run failed: <error>, or unknown error when nothing was captured.name and a description, every phase needs a title, and a field outside name, description, whenToUse and phases is refused by name: meta. <key> is not a recognized field (name/ description/ whenToUse/ phases). All violations are named at once in one invalid meta message.workflow script does not parse and names the problem. An opening stretch that runs too long fails with Script execution timed out, and a meta block written inside the body is refused with a message that points to the call's meta field.non-finite numbers are not JSON data; the message asks for JSON-serializable objects, arrays and scalars.null, and the script decides what to do. A fault around the call itself, where the helper cannot start or its result cannot come back, fails the run.No. Oda reaches for a workflow only when you ask for one, or for large multi-agent orchestration; it never starts one by itself. For one or two pieces of work it delegates with plain helper calls instead.
When a piece of work splits into many independent parts that a single script should coordinate, such as an audit over many files, a migration or research from several angles. For one or two delegations, plain helper calls are the better fit (Subagents); for a loop that starts fresh each round, see Ralph loops.
workflow: <name> card in my chat?It is the call itself, shown while the run works. Its title carries the run's name from its meta block, and the card follows the run's phases and helpers until the result comes back (Follow a workflow run in chat).
Up to 1,000 helper calls, with up to 4,096 items per fan-out call, and concurrency that follows the computer's available CPU parallelism. There is no overall time limit: a run keeps going until it finishes, fails or is stopped.
Usually, yes. A helper that fails on its own, including one that misses a structured result, hands the script null, and the script decides what to do. Only a fault around the call itself, where the helper cannot start or its result cannot come back, fails the whole run.
A run works in the turn that started it, so Oda stays with it until the script finishes. For a long run, Oda can start it in the background: the call is accepted at once with a job id, and the result arrives when the run settles (Background jobs).
On completion, workflow "<name>" completed (<n> agents)., then Return value: and the script's value; the count says how many helper calls the run started. A stopped run reads Error: workflow run was cancelled, and a failed run reads Error: workflow run failed: <error>. A long result text is cut with a notice that says how many characters were omitted.
The chat's file policy decides, the same as for the rest of the chat's work (Permission presets). The script itself sees an empty environment, with no credentials and no proxy settings, and its network access is not restricted by that policy. The sandbox is not a security boundary.