Skip to main content
Flow agents (type: "flow") carry a flow_config JSONB on the agent row. This page is the canonical reference for that shape.
New flow agents can no longer be created — POST /agents answers 410 AGENT_LEGACY_CREATION_GONE for a body without workflow. This page describes the graph of a flow agent you already have, which still runs and is still edited with PATCH /agents/{id}. A new agent gets its conversation graph from PUT /agents/{id}/workflow instead.
The same schema is validated server-side by the public API, by the dashboard’s React Flow builder, and by the bot pipeline at call-start time.

Top-level shape

Validation gates (enforced before save)

  • Exactly one node with type: "start".
  • Every next_step_id (transitions, custom branches, start) resolves to an existing node id.
  • Node ids are unique within the graph.
  • Every node passes its own per-type schema (see below).
  • Every conversation transition has a non-empty description (transition_description_missing) — the natural-language trigger the voice agent uses to pick this path.
A failed gate returns 400 with a human-readable error message pointing at the offending field.

Node types

Every node has:

start

Entry point. Owns the “who speaks first” decision for flow agents — these settings override the agent-level agent.agent_speaks_first and agent.greeting_message fields when the agent is a flow agent.
Use auto_advance: false when the greeting should feel neutral and the bot shouldn’t enter its first scripted step until the user has spoken. Useful for agents that listen for an open-ended intent (caller’s reason for calling) before routing — the greeting stays generic, then the first conversation node’s instructions take effect once the caller actually replies.

conversation

Talks to the user, then picks a transition.
The instructions text is layered on top of the agent’s global system_prompt as a system message at step entry. Every transition must have a non-empty description — at runtime the voice agent reads the description as the trigger for taking that path. Treat the description as a prompt addressed to the model: describe the user-side signal (what the caller said or implied), not an agent intent. A bare label is not sufficient; the API rejects empty descriptions with transition_description_missing.

tool_call

Deterministic tool execution. References a tool by tool_id (must already exist in the company’s tools table). Tool args are owned by the tool itself via payload_config.static_parameters (literals) and payload_config.extraction_parameters (filled by the runtime from the conversation). A tool_call node carries no args_template field — the same tool used by N flow nodes sends the same shape unless that node supplies a config_override. Stale args_template payloads on a tool_call node are silently dropped at parse time.
config_override shallow-merges over the referenced tool’s config (array replacement, not deep merge). Open-shape: each tool type defines its own valid keys. For a transfer tool it can set transfer_method, pbx_feature_code and pbx_feature_code_hangup_after_secs (see the transfer node); the merged result is checked when you save, with the same error codes. The dashboard flow editor shows the shared base configuration, the fields overridden by this node, and the final effective configuration together in the node editor. Because the merge is shallow, overriding payload_config replaces that complete object; include every standard-metadata, static-parameter, and extraction-parameter setting the node needs. Switching a node to another tool clears the previous tool’s override after confirmation. pre_fire_announcement plays a short platform-controlled hold tone while the webhook is in flight. Recommended for tools that may take more than ~500 ms. When the agent moves to a workflow, the step keeps it as its hold_line, in the agent’s language. timeout_secs (1–600) is an optional per-node hard cap. When set, the dispatcher cancels the action at that limit and routes to error_next_step_id with tool_timeout_after_<N>s. When omitted on a webhook tool, the controller allows the tool’s effective config.timeout_seconds plus one second of dispatch overhead; other tool nodes default to 30 seconds. Set it only when the flow needs a stricter or longer node-level limit. On a live call the agent waits out the whole limit, including any steps the result chains straight into; nothing cuts the wait at 10 seconds. Args come from the linked tool, not the node. At call start, Yappr resolves the referenced tool plus that node’s config_override and gives the voice model a flat argument-submission schema: one named string field for each effective extraction_parameters entry. There is no model-facing node_id field and no nested { "args": { ... } } wrapper. The runtime assembles standard call metadata and static parameters; the model-facing submitter exposes only extraction fields. Payload merge order is standard metadata, then static parameters, then extracted values, so an extracted value wins a deliberate name collision. Keep names unique across all three groups unless that override is intentional. extraction_parameters[].required controls which fields the model must collect. It defaults to true when omitted. Missing optional fields do not block dispatch; if a required field still can’t be surfaced after 3 attempts, the node routes to error_next_step_id.
Tool schemas are fixed for the duration of a live call. Changes to the referenced tool or a node’s config_override are picked up when the next call starts.
A flow may define at most 127 unique typed extraction contracts. Nodes with the same effective tool, config_override, and extraction schema share one contract. Saves over the limit fail with too_many_extraction_contracts instead of letting the next call fail during model-session startup. Tool-call nodes can be token sources for downstream nodes: any extraction_parameters[].name becomes addressable as {{<node_id>.<name>}} in a later node’s ai_extract.description strings. How tool-call routing works at runtime — entirely deterministic, no LLM involved:
  1. error_next_step_id fires only on hard failures: network timeout, exception, HTTP redirect or other non-2xx status, the connected app disconnected, tool deleted/inactive, missing required config. The dispatcher’s error field is set; nothing else is checked.
  2. Otherwise the dispatcher walks custom[] top-to-bottom. First branch whose path extracts a value == its equals wins. Evaluation stops there — success is not also taken.
  3. If no custom matched, success_next_step_id fires.
Exactly one out-edge is traversed per tool fire. The canvas drawing all three lines is just the diagram of possible routes — at runtime only one is taken. The full result dict is injected into the next node’s LLM context as a <tool_result> block, so a single success → conversation node usually handles soft-fail bodies ({"available": false}) gracefully via prompt instructions. Use custom[] only when the next node should be structurally different for that shape (different instructions, different downstream tools, different transitions).

JSONPath subset for custom[].jsonpath

The runtime supports a deliberately tiny subset of JSONPath. Root ($) is the tool’s parsed response body:
  • Webhook tools — JSON.parse(body) of the HTTP response.
  • Connected-app tools — the typed dict the app returned.
Not supported: recursive descent ($..foo), wildcards ($.*), filter expressions ($[?(@.x>1)]). If your webhook nests the field, point at the exact path. A missing key, wrong type at any step, or out-of-bounds index → the branch silently doesn’t match (falls through to the next custom, then to success).

Stringification rules for equals

The extracted value is stringified JSON-style before string-comparison to equals. Match the table: Branches with the wrong stringification (e.g. equals: "True" against a boolean true) silently never match.

integration_call — retired

This node carried a Google Calendar or Gmail credential on the node itself. It is retired: saving a flow that contains one is rejected as FLOW_INVALID. An agent whose stored flow still has one keeps running it until the end of its 30-day notice period, and Yappr moves the step to the connected app once you connect it. Until then the agent’s flow_config can’t be replaced through the API; its other settings update as usual. Connect the account as a connected app and call it from a tool_call node instead.

transfer

Hands the call off to another phone number or, on SIP trunk and extension calls, back to your own phone system. Terminal — no transitions out.
A SIP address works only on calls that arrived over a SIP trunk or an extension endpoint; on any other call the transfer is refused and the agent keeps helping the caller. On a trunk call it asks the caller’s own phone system to place the new call (SIP REFER), with no extra call on Yappr’s side. On an extension call Yappr places the new call through the extension to the part before the @, and stays on the call. A phone number on a trunk or extension call is refused. The format is sip:user@host[:port], at most 256 characters, with a user part and no password or ? headers. Anything not starting with sip: or sips: must be a dialable phone number.
On a trunk, your phone system must accept the transfer request (SIP REFER), be able to reach the address, and have the new call answered within about nine seconds; test it first. If the transfer fails, the call ends: the agent can’t take the caller back. On an extension call no REFER is sent: Yappr places a new call through your extension, which has about 25 seconds to be answered, and if that call fails or isn’t answered the call ends, as in a transfer to a phone number: the agent doesn’t take the caller back, so don’t build a fallback that relies on it. On the call, transfer_target shows the SIP address with any password and any ? headers removed; the extension before the @ stays.

Hand an extension call to your phone system with its transfer code

Usually the code is set once on the extension endpoint (register.pbx_feature_code), and every transfer node uses it with nothing set here. To give one node a code of its own, used instead of the endpoint’s together with its own hang-up time (nothing is taken from the endpoint), set transfer_method to pbx_feature_code and pbx_feature_code to that code. Yappr sends the code and the extension as key presses (## and sip:400@pbx.example.com send ##400), your phone system moves the caller to the extension and hangs up Yappr’s side, and Yappr is off the call: the person who answers sees the caller’s own number. Without a hang-up time, if your phone system hasn’t ended Yappr’s side within about 12 seconds, Yappr falls back to the usual dial-back, so the caller is never stranded; with one, Yappr’s own hang-up completes the transfer and there is no fallback. Nothing is recorded when the code is sent: transfer_started with method pbx_feature_code is recorded when your phone system ends Yappr’s side, and a fallback records only the dial-back’s transfer_started (fallback_from pbx_feature_code). What each outcome records.
  • pbx_feature_code: 1 to 32 characters of 0-9, *, #, A-D, and the pauses w (half a second) and W (one second), with at least one key. Put {extension} once where the extension goes (*2{extension}#); without it the extension is sent right after the code.
  • transfer_to must name an extension a keypad can dial: up to 32 digits, * or #, as a SIP address (sip:400@pbx.example.com, only the part before the @ is used) or as 400. A phone number or a name like sip:reception@… can’t be handed over this way.
  • pbx_feature_code_hangup_after_secs: set it when your phone system’s code starts an attended transfer that completes when the transferring extension hangs up (the caller is put on hold, Yappr is connected to the extension, and your phone system never ends Yappr’s side). Yappr hangs up this many seconds after the code (counted once its key presses have played), and that hang-up is the hand-off, recorded as above. Until then the agent is off the line: silent, and not listening to the person at the extension. Because the hang-up is the hand-off there is no fallback dial-back, so test it once. 4 is a good start. A whole number from 1 to 10.
  • A save is rejected with transfer_method_invalid (an unknown method), pbx_feature_code_missing, pbx_feature_code_invalid, transfer_extension_not_dialable, pbx_feature_code_hangup_after_secs_invalid (not a whole number from 1 to 10) or pbx_feature_code_hangup_after_secs_without_code (set without transfer_method pbx_feature_code).
  • The same keys work on a transfer tool: on a tool_call node that uses one, put them in the node’s config_override.

end

Speaks the farewell and hangs up. Terminal.
For per-call extraction or webhook delivery, configure extraction_parameters and webhook_url / webhook_events at the agent level. Those mechanisms apply uniformly to both prompt and flow agents — the flow does not have a separate post-end pipeline.

Global nodes

Conversation, transfer, and end nodes can be marked is_global: true to make them reachable from any conversation node without an explicit edge. The eval LLM gets every global node as an extra candidate transition on every turn, with a strong “prefer labeled transitions over global jumps when both could plausibly apply” bias. Use cases:
  • Misclassification recovery — “wait, you’re an owner, not a tenant” routing to the owner-branch entry, declared once instead of wired into every node.
  • Universal escape hatches — transfer to human, or end on do-not-call.
  • Session-level concerns — “callback request from anywhere”.
Validation rules (enforced by the API on POST/PATCH):
  • is_global: true is only valid on conversation, transfer, and end nodes. Setting it on a start or tool_call node returns 400.
  • When is_global: true, global_jump_description must be a non-empty string.
  • The current node never jumps to itself even if it’s global.
Practical guidance:
  • Recommended max ≤3 globals per flow. Each additional global widens the eval LLM’s candidate space and increases false-positive jump risk.
  • Write global_jump_description as a user-side signal, not an agent intent. Good: “User says they want to speak to a human”; bad: “Transfer the user”.
  • Globals don’t replace explicit transitions — they’re a fallback. The eval LLM is instructed to prefer labeled transitions when ambiguous.
When a global jump fires, the runtime publishes flow_node_entered with reason: "global jump: <node name>" (visible in flow_trace.steps[].reason on GET /calls/:id).

What’s NOT a node type

By design, the flow data model omits a few patterns you might expect:
  • No “webhook” node — for outbound webhooks, either (a) configure agent.webhook_url + agent.webhook_events for unconditional per-call delivery (recommended), or (b) call a webhook-type tool from a tool_call node mid-flow if you need per-path delivery.
  • No “structured_output” node — for transcript extraction, configure agent.extraction_parameters. (Per-end-path schemas were considered for v1 but cut to avoid duplicating an agent-level mechanism.)
  • No separate “branch” / “ifelse” node — branching is built into every conversation node via transitions[].

Versioning

Every successful save (POST or PATCH that includes flow_config) writes a flow_versions row. Identical re-saves are deduplicated by SHA-256 hash of the canonical JSON. Use GET /agents/:id/flow/versions to list history.

Immutability

agents.type is immutable post-create. To convert a prompt agent into a flow agent (or vice-versa), create a new agent of the desired type. PATCHing type returns 400.

Type discriminator and flow_config requirements

Mismatches return 400 with a clear correction message.