Flow Agent

Edit a flow draft from chat in the v2 flow editor.


Open the flow agent

  1. Open a flow at /flows/{id} in the v2 editor.
  2. Stay in flow view, not the app run view.
  3. In the bottom-left toolbar, next to undo and redo, click agent.

A flow agent panel opens on the right. It runs the platform agent infsh/flow-agent. The button shows only when you can edit the flow.

The chat takes text only; it does not accept files or images.


What it can do

Ask it to build or change the draft graph: add app and utility nodes, connect steps, wire inputs, set the flow input schema, map outputs, rename nodes, tidy the layout, or undo recent edits.

  • "Add an upscale app after generate_image and wire the image output."
  • "Define flow inputs: text (string, required) and voice (file)."
  • "Organize the canvas and map the final image to the output node."

Agent edits and manual edits go to the same draft, and collaborators see them through the editor's sync.


How edits reach the graph

The agent runs on the platform. Graph changes run in your browser as client tools, on the same path the editor uses before it calls POST /flows/{id}/actions.

Client toolPurpose
get_flow_stateSnapshot of the draft: each node's id, type, position, app ids, input and output field names, edges, wired values (formValues) and outputMappings
search_appsSearch the app catalog; returns app_id, app_version_id and ref for node.add
apply_flow_actionsApply a batch of graph actions
organize_nodesAuto-arrange the canvas

apply_flow_actions

Takes an actions array of the graph action types (node.add, edge.add, node.set_input, flow.set_output_mapping and the rest).

RuleDetail
BatchThe editor applies the batch at once, then syncs it to the server
undo / redoMust be the only action in the batch: [{ "type": "undo" }]. They use the same per-user action log as the toolbar buttons (Undo and redo)
node.addInclude app_id and app_version_id from search_apps in payload.data. The panel loads the app version so node forms and schemas work
Connectionsnode.set_input with a connection gets connection.type from the source node's output schema when it is omitted
Output mappingsflow.set_output_mapping gets mapping.schema and mapping.type from the source output field when they are omitted
ErrorsA batch that fails validation or that the server rejects returns { error: "…" }: empty actions, an unknown action type, an app version not found, an output the source node doesn't have, or the editor's sync error. The tool call is marked failed and the model reads the text

Without the web app, edit the graph with POST /flows/{id}/actions or belt flow edit (Apply graph actions).


Next

→ Creating a Flow
→ Connecting Nodes
→ Client tools

we use cookies

we use cookies to ensure you get the best experience on our website. for more information on how we use cookies, please see our cookie policy.

by clicking "accept", you agree to our use of cookies.
learn more.