The difference from an agent is not what it can do but who is there. An agent runs while your process runs and asks you before anything irreversible. A workflow runs with nobody watching — so what it may do is decided when it is saved, not while it runs.
| Call | Does |
|---|---|
| create(definition) | Validates and saves it. Returns a Workflow. |
| list() | Every workflow of the account. |
| get(id) | One of them. |
| getRun(runId) | A run, from its identifier alone. |
const workflow = await api.workflows.create({
name: "Weekly digest",
trigger: { type: "cron", cron: "0 8 * * 1" },
steps: [
{ id: "read", type: "storage.query", config: { storage: "…", action: "find", collection: "posts" } },
{ id: "write", type: "model.generate", config: { model: "gemini-3.5-flash",
prompt: "Summarise these in five lines: {{steps.read.output.result}}" } },
],
});
const run = await workflow.run({ input: { since: "2026-10-01" } });
await run.wait();
console.log(run.data.status);workflow = api.workflows.create({
"name": "Weekly digest",
"trigger": {"type": "cron", "cron": "0 8 * * 1"},
"steps": [
{"id": "read", "type": "storage.query", "config": {"storage": "…", "action": "find", "collection": "posts"}},
{"id": "write", "type": "model.generate", "config": {"model": "gemini-3.5-flash",
"prompt": "Summarise these in five lines: {{steps.read.output.result}}"}},
],
})
run = workflow.run(input={"since": "2026-10-01"})
run.wait()
print(run.data["status"])A graph, not a list
edges connects the steps — branches, parallel fan-outs, merges. Without it the order of steps is the chain, which is the simple case and stays supported.
What acts outside the account needs approval in the graph
In a conversation those three are asked every time and no mode opens them. A workflow has nobody to ask — so the approval is required in the graph, and a definition without it is refused when you save it, where you can still read the message.
A run outlives everything
Starting one returns its identifier and the run continues on the platform. Your process can exit; getRun() picks it up later.
The bounds
| Thing | Bound |
|---|---|
| Steps per workflow | 30 |
| Loop iterations | 500 |
| Loop concurrency | 10 |
| A wait | 86 400 seconds — one day |
| Mail recipients | 5 |