Skip to main content
A node is one step of a workflow. Three node types exist. When you call the API, the SDK, or the MCP tools, send the value in the third column. In a workflow’s settings.yaml, write the value in the fourth. Nodes are joined by transitions.

Start node

Every graph has exactly one start node. The builder seeds it when you create a workflow. A start node makes no decision. It holds one outgoing transition, and that transition must point at a node that is not an output node. An execution always begins here.

Agent node

An agent node is where the work happens. You write instructions in plain language. The model carries them out in a real browser or on a real desktop.

Navigate

Move to and through pages

Fill forms

Enter and submit structured data

Use files

Read, upload, or download files

Extract data

Pull values off a page

Instructions

The instruction block is the core of an agent node. Four parts make it reliable:

Write good instructions

Patterns that hold up across runs

Variables in instructions

Write {{.name}} in a node’s instructions to drop a value in at run time.
A variable name must start with a letter or an underscore. After that it may hold letters, digits, and underscores only.
  • Valid: {{.user_name}}, {{.email}}, {{.api_key}}
  • Invalid: {{.user-name}}, {{.my@var}}, {{.1st_item}}
Reach into nested JSON with a dot path:
The values come from the inputs your code sends on the execute call.

Model

Each node picks its own model. Match the model to the difficulty of that step.

Capabilities

Every agent node declares three switches: browser_use, computer_use, and ask_user_question. They decide which tools the node gets. The environment can override two of them.

What a node can do

The three switches and how the environment gates them

Script

By default an agent node works turn by turn: the model reads the page, picks a tool, and acts. Set the node’s Script field to run a stored Playwright script first instead. Set script_filepath to a relative .js path and the node becomes a scripted node. Clear the field and it goes back to working turn by turn. Scripts live in the workflow’s shared/ tree. The runtime resolves the path inside the node’s own shared/ directory:
  • The runtime derives <node-slug> from the node’s display name. It lowercases the name and strips punctuation. You never write the slug, so renaming a node never breaks the path.
  • You author script_filepath itself. It is stored with a ./ prefix, as in ./scripts/find_patient.js.
  • Name the file after the action, in lower_snake_case. The directory already says which node it belongs to. Avoid scripts/main.js and scripts/index.js.
A node named “Find Patient” with script_filepath: ./scripts/find_patient.js resolves to /home/agent/shared/find_patient/scripts/find_patient.js.

Workflow filesystem

Where a script file lives, and what each directory is for

Behavior, inputs, and routing

How a scripted node behaves lives in one place, so it stays in step: reading args and credential tokens, what a return value or a returned asteroid.handoff(...) does, the order the runtime picks the next node, and pinning inputs with x-source.

Script a step

Attach a script, route from it, and pass and pin its inputs

Script runtime

The runtime contract: timeouts, the sandbox, the filesystem, and credentials
script_failure_action decides what happens when a script throws. fallback_to_ai (the default) hands the failure to the model, which recovers from the instructions. cancel_execution stops the run at once with reason script_failed, which also fires when the script file is missing.
Ask Astro which steps are worth scripting. It writes and tests the scripts for you.

How an agent node ends

An agent node ends when one of its outgoing transitions fires. It never ends on its own.
Give every agent node a failure path.Connect at least one transition from every agent node to an output node that handles failure.Without it, a missing element or an unexpected page has nowhere to go. The execution then cannot report what went wrong.

Agent node reference

In a workflow’s settings.yaml, an agent node is type: agent. Every agent node declares type, capabilities, and model.
A scripted node that falls back to the workflow:
A scripted node that cancels the execution when the script fails:
The node’s instructions live in an instructions.md file in the same directory.

Output node

An output node ends the execution. It closes the environment, sets the outcome label, and returns the structured result to your code. Every graph needs at least one output node. Most graphs have several: one per way the execution can finish.

Outcome labels

An outcome label answers one question: how did this execution finish? It is the value your code branches on. An output node lists the labels it can produce.
Labels are lowercase, and each node holds between 1 and 20 of them. The full rules are on the page below.

Result schema

An output node can also return structured data. You define the shape as a JSON Schema, and the workflow fills it in. Your code reads it at executionResult.result. The schema lives in an output-schema.json file next to the node’s settings.yaml.

Inputs and outputs

Label rules, schema rules, and the exact response your code receives

Workflows are graphs

How nodes fit together into a whole workflow

Transitions

The edges that join nodes

Build in the platform

Add and configure nodes in the visual builder

Environments

Where a node’s work actually runs