Skip to content
TriedDocs
Conversation flow

Best practices

How to structure Tried conversation flows so they stay predictable, fast and easy to maintain.

These guidelines follow from how the Tried flow engine works: what runs before the LLM, what costs an extra LLM call, and where the LLM has room to drift.

Structure#

  • One job per conversation node. A node that asks for a name, a date and a reason has three ways to stall. Split it, or use one node with clear transitions for each outcome.
  • Name every node. Names appear on cards, in Find node, in test output and in flex mode prompts.
  • Put shared rules in the global prompt, step rules in nodes. The global prompt is in every node's system prompt; node instructions only apply while the node is active.
  • Use components for repeated sequences such as address capture or identity checks. See Components.
  • Keep a failure path for every action. Connect Transfer failed, Swap failed, SMS failed and the else edges of function, code and MCP nodes.

Transitions#

  • Prefer equations when you have the data. Equation transitions run before the LLM, cost nothing and always behave the same. Extract or compute a value first, then branch with a logic split.
  • Write prompt conditions as facts about the conversation. "The caller confirmed the date and time" beats "confirmed".
  • Make prompt conditions mutually exclusive. The LLM picks one of the conditions that apply; overlapping conditions make the path depend on wording.
  • Cover every outcome on automatic nodes. Function, code, MCP and extract nodes evaluate their transitions immediately. If none matches and there is no else edge, the flow stays in that node.
  • Use else edges deliberately on conversation nodes. An else edge makes the node decide transitions before replying, which costs one extra LLM call per caller turn.
  • Use skip response for statements (disclosures, "let me check that"), so the flow moves on without waiting for the caller.

Global nodes#

  • Keep global conditions narrow and few. Every global node adds a transition function to every turn.
  • Add Go back when conditions to FAQ-style global nodes so the call returns to where it was.
  • Add a Cool down (user turns) when a global node could re-trigger straight after it finishes.

Functions#

  • Pick the right node. A function node for an action at a fixed point; a subagent node when the LLM should decide when and how often; a code node for logic that needs no LLM.
  • Save results as response variables and branch on them with equations instead of asking the LLM whether the call "succeeded".
  • Cover silence. Turn on Speak during execution with a short static message, or Typing sound, for anything that takes more than a second.
  • Keep responses short. Up to 15,000 characters are handed to the LLM, and every character slows the next reply.

Speed#

  • Each prompt decision outside the reply call (else edges, prompt transitions after automatic nodes, dynamic transfer destinations, function arguments) is an extra LLM round trip. Chains of automatic nodes with prompt transitions add up.
  • Use a faster model on simple nodes through Node settings, Model, and keep the stronger model for the hard steps. LLM time is billed per node at each node's model.
  • Static sentences skip generation for the first line of a node.

Rigid or flex#

Choose When
Rigid Mode Order matters, you branch on variables, you use code, MCP, logic split or agent transfer nodes, or you need per-node models and settings
Flex Mode The flow is mostly conversation nodes, callers jump between topics, and a natural conversation matters more than strict order

Testing#

  • Test every branch in Test LLM with Mocks for your functions, then run equations and global nodes through Test Audio or a test number, since the text playground does not evaluate them.
  • Use Debug on agent turns to see how stable a reply is across 10 regenerations.
  • Run Simulate with personas that do the unexpected: answer two questions at once, refuse, ask for a human, go silent.
  • Keep the test { } variables realistic so equation branches are exercised.

See the Debug guide for what to look at when something goes wrong.