How a flow works
A flow is a graph: nodes (the steps) joined by edges (the ways out of each step).
The conversation starts at
entry_node_id. At the end of every turn, the current node’s edges are evaluated in this order:
tool_resultandvariableconditions, which need no model, bypriority(highest first).- Every
llm_decisioncondition, in a single model call: the model picks the way out that matches, guided by eachdescription. - The
alwaysedge, which is the explicit “else”. - If nothing applies, the conversation stays where it is.
global_nodes) can be entered from any stage through their global_condition, and when they finish the conversation returns to the stage it came from. Useful for “the customer asks for a human” or “the customer wants to cancel”.
A minimal flow
Qualify the caller, book if they want to, and say goodbye:Flow schema of the API reference.
Read the flow
GET /v1/agents/{id} returns it in config.flow, and GET /v1/agents/{id}/versions/{version} in flow. It is null when the agent has no flow.
Change the flow
Send the whole graph inflow with PATCH /v1/agents/{id}. It replaces the current one: there is no way to send just one node, so read the flow first, change it and send it back.
"flow": nullremoves the flow, and the agent goes back to working on its prompt.- Like any configuration change, it is saved as a new draft version. Publish it with
POST /v1/agents/{id}/publishso calls use it. - Pass
expected_version(thecurrent_versionyou read) so you do not overwrite a change made in the Builder in the meantime.
always edge on a stage, an llm_decision from a step that does not talk, a blank description, a tool the agent does not have), the answer is 400 invalid_flow and nothing is saved, not even the name or status sent in the same request. A node can only name the agent’s tools: built-in ones and the ones in the version’s tool_ids.
From the MCP server and the CLI
- MCP:
get_agentreturns the flow andupdate_agentacceptsflowwith the same rules. Your AI client can read the flow, change it and send it back whole. - CLI:
ryvo agents get <id>shows aflowline with the number of nodes and the entry stage; add--jsonto see the whole graph. To change it, pass the body with--data: