Runs
How agents start runs, wait for them, and recover when something fails.
A run is the agent pressing Run on some or all of a canvas. Images take seconds; videos can take several minutes.
How a run goes
Price
run_start with dryRun returns what the run will cost, without spending
anything. The agent uses it when you ask what something costs, or before a
run over 2,500 credits, and waits for your yes.
Start
run_start starts it with a credit limit. It is refused if it would cost
more, or if you don't have the credits. Tool nodes in the run render on
Fuser's servers, and their results are saved as if you'd pressed Save.
Wait
run_get waits up to 10 seconds and returns what's finished: links to
images and videos, and the text from chat nodes and tools. The agent
calls it again until the run is done.
Check
The agent looks at the results with media_view and reruns anything
that came out wrong.
Running part of a canvas
The agent can run just the nodes it changed instead of the whole canvas. Whatever those nodes need upstream runs with them.
When a node fails
run_get says which node failed and why: a model refused the prompt, an input
was missing, a provider was busy. The agent usually fixes the input and reruns
just that node. Nodes that finished keep their results.
Stopping a run
Say "stop" and the agent calls run_cancel. Nodes already finished keep their
results; nodes still running are stopped.
Retries never pay twice
Every run request carries a key. If the connection drops and the agent asks again with the same key, it gets the run it already started rather than a second one.