DataMind Oda can run a written plan that spreads many small tasks across helper agents: a workflow. The tool behind it takes a JavaScript script, runs it, and returns the script's final value to the chat. Oda uses it only when you explicitly ask for a workflow or for large multi-agent orchestration.
workflow: <name>, named from the call's meta block (Tool calls in the chat).| Field | What it carries |
|---|---|
script | The script body: plain JavaScript, not TypeScript. Top-level await is allowed, and the body ends with return of the value to hand back. |
meta | The run's identity: its name and description, plus optional whenToUse and phases (described below). |
args | Optional input for the script, as plain JSON data; the script reads it as args. |
run_in_background | Optional. Starts the run as a background job and answers with a job id at once, instead of holding the turn until the script finishes. |
The script coordinates; the helpers do the work. The tool hands the script a small set of hooks and nothing else: no filesystem, network, timer or Node.js APIs are provided.
agent(prompt, options?) starts one helper and resolves with its result.parallel(thunks) runs zero-argument functions together and collects their results.pipeline(items, . . . stages) runs each item through its stages independently, with no barrier between items.phase(title) opens a progress phase; log(message) writes a progress note.args reads the call's input.const summaries = await parallel([
() => agent('Summarise report A'),
() => agent('Summarise report B'),
]);
return { summaries };null. A helper that fails for its own reasons resolves null, and a stage that throws drops its item to null; the script decides what to do next.null.agent() accepts a label, a phase, a schema for a structured result (within a supported subset of schemas), and provider and model overrides. Options outside the set are refused, and the message names the supported ones.name and description are required. The name is short and kebab-case and titles the call's card; the description says what the run does.whenToUse (optional) tells the model when this kind of run fits.phases (optional) names the progress stages, each with a title and optionally a detail, provider and model. Phases label progress only; they say nothing about how the run executes.meta field and reaches the run as plain data, never as code; the script body carries code only.run_in_background, the call is accepted at once with a job id, and the run registers as a job of the chat. While it runs, the job streams its phases and one line for each helper start or end.run_in_background field is not offered, and a call that still asks for one is refused with run_in_background is disabled for this tool. A background run also needs the app's jobs surface; without it, the call is refused, saying background jobs are unavailable.A run settles once: it completes, is cancelled, or fails.
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, with the cancellation reason included when one was given.Error: workflow run failed: followed by the failure, or unknown error when nothing was captured.Ask Oda in your own words for a workflow, or for large multi-agent orchestration such as an audit over many files, a migration or multi-angle research. Oda writes the script and calls the tool, and the call appears as a card titled workflow: <name>. For one or two delegations Oda uses plain helper calls instead; see Delegating work to subagents.
Plain JavaScript, not TypeScript. It can wait at the top level and ends with return; it coordinates with the hooks (agent(), parallel(), pipeline(), phase(), log()) while the helpers do the work. The tool provides no filesystem, network, timer or Node.js APIs of its own.
meta block accept?name (short kebab-case) and description are required, and whenToUse and phases are optional. A field outside the set is refused and named. The block is data: it travels in the call's meta field, never in the script.
agent() call take?label (the name shown for the call in progress lines), phase, schema (for a structured result, within a supported subset of schemas), and provider and model overrides. Anything outside the set is refused, and the message names the supported options.
The call is accepted at once with a job id, and the run registers as a job of the chat. The job streams the run's phases and one line for each helper start or end; before the run settles, a read reports its status only, and the return value arrives when it settles. See Background runs and jobs.
Stop the run's job from the chat, or ask Oda to stop it; a foreground run stops with the turn's Stop (Stopping Oda and queued messages). A stopped run ends as cancelled, and nothing it produced is reported as success.
workflow "<name>" completed (<n> agents). followed by Return value: and the script's value. The count is how many helper calls the run started. If the text runs longer than its cap (50,000 characters by default), it is truncated and the notice says how much was omitted.
run_in_background?Background runs can be switched off for the tool. The field is then not offered on calls, and a call that still asks for one is refused with run_in_background is disabled for this tool. A background run also needs the app's jobs surface; without it, the call is refused, saying background jobs are unavailable.
The script's environment is empty: no credentials, no proxy settings and no other machine environment reach it. File changes follow the calling chat's policy: Read Only stops them, Workspace Write keeps them inside the workspace, and Full access applies no file limits (Permission presets). Network access is not restricted by that policy.