Request a demo
← All articles How it works

What happens when you press Run

How the Insight AI Assist runtime executes an agent: the task order, the events it streams to the execution log, what it records in Agent history, and how failures and retries show up.

The moment of truth for any automation is the first real run. In Insight AI Assist, a run is not a black box that returns an answer a minute later: it is a stream of events you can watch, step by step, and a record you can open afterwards. Here is what happens between pressing Run and reading the result.

In short

The runtime builds a graph from the saved design, works out the task order, and runs each task in turn. It streams an event for every start, completion, failure or pause to the execution log, and stores the run with its status, logs and result in Agent history. A human step pauses the run; it resumes from the same point when answered.

1. From design to task order

The runtime reads the agent's saved design and per-node settings, builds a graph engine from them, and works out the order in which tasks can run: a task starts once the tasks it depends on have finished, and routing nodes decide which branch runs next. The first event, workflow_info, reports the number of tasks and their order, so the log shows the plan before the work.

2. Events, as they happen

Each task sends a task_started event with its type and progress, and a task_completed event with its output, or a task_failed event with the error. The run ends with workflow_completed or workflow_failed, or stops at workflow_paused when a human step needs an answer. Events are streamed to the browser as they occur, over a server-sent-events connection, and the designer's execution log prints them with timestamps and colours the nodes on the canvas.

The designer for the Late order digest agent after a completed run, with nodes coloured by status and the execution log listing started, completed, paused and resumed tasks with timestamps.
A completed run of the made-up late-order digest: the canvas shows each node's status, and the log lists every event with its time.

Reading one run's events

Here is the made-up late-order digest from the diagram, as its events would read in order:

EventCarriesWhat it tells you
workflow_startedThe run's IDThe run exists and is in history from this moment
workflow_infoNumber of tasks and their orderThe plan: if a step you expected is missing, the design is not what you think
task_started · load_ordersTask type and progressWhich step is running now
task_completed · load_ordersThe step's outputWhat later steps will see; open it when a result looks wrong
task_completed · late_ordersThe filtered listWhether the filter kept what you expected
workflow_paused · confirm_callsThe prompt and the values neededA person has to answer before anything else happens
workflow_completedThe final resultDone; the result, with the answer, is stored

Read a new agent's first few runs event by event in this way. Most design mistakes show up in a task_completed output long before they show up in the final result.

3. What history records

Every run is stored. Agent history counts the runs on the page that succeeded, failed, or are running or paused, and lists each run with its agent, status, start time, duration, current task and who started it. Expand a run to see its log and its result: the final output, including any value a person supplied at a human step.

The Agent history screen with counts of succeeded, failed and paused runs and an expanded run showing its log and JSON result, including the human-supplied call list.
Agent history: one run expanded to show its log and result. The person's answer at the human step is part of the result.

4. When something fails

What you seeWhat it usually meansWhat to do
A task_failed event and a red nodeThe node's settings, its input or an external call failedOpen the node, check the Input / Output tab, fix and re-run
A node's output reports an error but the run continuedThe node caught the error and returned it as outputAdd routing on the node's status, so a bad result cannot flow on silently
Runs that fail now and then on the same stepA flaky external serviceWrap the step with a RETRY node rather than re-running by hand
A run paused for a long timeA human step is waiting for an answerAnswer it from the run, or set a sensible timeout on the step
Test a node before running the agent. The Test tab in a node's settings runs that node alone with the data available from upstream, which is usually the quickest way to find a wrong placeholder or prompt.

Models and tools in a run

AI nodes call the model provider your deployment configures, and tool steps call the runtime's tools; both appear in the log as ordinary tasks, with their outputs. A run with no AI steps, like the digest above, needs no model at all, which makes it a good first agent to test the plumbing with.

Starting runs other ways

Pressing Run in the designer, or the run button on the Agents list, starts a run by hand. Another system can start one through the API's execute endpoint, which streams the same events. Trigger nodes in the palette (schedule, webhook, form, email and others) check their condition, such as a scheduled time or a webhook's shared secret, as the run's first step. However a run starts, it is recorded in Agent history in the same form.

Calling it from another system

Two endpoints cover most integrations. POST /api/execute/{agent}/stream starts a run and returns the event stream described above; it accepts JSON (workflow_inputs) or form data. To resume a paused run, call it again with the run's execution_guid and a missing_data object whose keys match the human step's input keys. POST /api/execute/ is the non-streaming form: it takes the agent's ID, the inputs, optional uploaded files and, to resume, the thread ID and missing data, and returns when the run completes or pauses. Both calls run as the signed-in user, so the run in history shows who started it.

Questions engineers ask

Does a run use the latest design or the generated files?

The saved design. Unsaved changes on the canvas are not run, and the YAML files are for review; regenerate them when you want them to match.

What does a run's status mean in history?

Running while tasks are executing, paused while a human step waits, and success or failed at the end. The current task column shows where a running or paused run has got to.

Is a run's data kept?

Yes: the log and the result, including step outputs that end up in the result and any human answers, are stored with the run. Bear that in mind for agents that handle personal data, and agree with your data owners how long history should be kept.

Next: how human steps pause and resume a run.

See it on one of your processes

Bring one process you'd like an agent to run

We'll design it with you on the canvas, run it on sample data, and show the run log and history, as a hosted trial or in your own cloud.

Request a demo