Help center

Take 10 minutes.
Get hours back every week.

Short walkthroughs that turn the platform into your operations team: automated pipelines, instant follow-ups, AI-handled admin. One video, one less thing to do manually.

Communications

How to Build a Voice Agent Script

How to use the visual flow editor to build conversation flows — nodes, edges, the Global Prompt, custom tools, global nodes, and publishing.

The script editor is where you write your voice agent's brain. Every node is a moment in the conversation — the agent says something, listens, then decides where to go next. You connect those moments with edges, and the edges carry plain-English conditions that tell the agent when to move on. Get it right here and the agent handles calls on its own.

Open the editor by going to https://app.trustpager.com/auto/voice-agents, clicking into your agent, and then clicking Edit Script. The URL becomes /auto/voice-agents/:id/script once you are inside.

How the canvas works

The left side of the screen shows a tree of all your nodes. The right side is the editor panel — click any node or edge in the tree to edit it. Changes are held locally until you save.

The tree expands as you add nodes. Loops are detected automatically and shown with a "Back to" indicator so the canvas stays readable even for complex flows.

Node types

Each node in the flow is one of the following types:

  • Conversation — the agent speaks and listens. Write a prompt describing what the agent should say and how it should respond in that moment. This is the most common node type.
  • End Call — the agent wraps up and hangs up. Write a brief closing prompt, or leave it empty for an immediate hang-up.
  • Branch — the agent takes different paths based on what the caller says, without speaking first. Connect multiple edges with conditions to cover each case.
  • Function — calls a custom HTTP tool mid-conversation (for example, checking availability or creating a booking). Conversation resumes after the tool returns.
  • Transfer Call — warm-transfers the caller to a person or external number.
  • SMS — sends an SMS to the caller while the call is in progress.
  • MCP Tool — calls an MCP-registered tool directly from the flow.

Function, Branch, Transfer Call, SMS, and MCP nodes are read-only in the script editor — their logic is defined in the voice platform. You manage the instruction text for Conversation and End Call nodes only.

Edges and transition conditions

Connect nodes with edges. Each edge has a condition — write it in plain English describing when the agent should move from one node to the next. For example:

  • "Caller confirms they want to book an appointment"
  • "Caller asks to speak to a person"
  • "Caller says they are not interested"

There are also two special edge types:

  • Always — the agent moves to this node unconditionally, as soon as the current node completes.
  • Skip Response — the agent moves immediately without speaking.

Click any edge label in the canvas tree to edit its condition. The condition field accepts free-text prompts or structured equations.

The Global Prompt

The Global Prompt applies to every node in the flow. Click Global Prompt at the top of the canvas tree to open it. Write it as instructions to the agent: who it is, what business it represents, what it should and should not say, and any factual guardrails you need enforced throughout the call.

A good Global Prompt typically covers:

  • The agent's name and the business it represents
  • Tone and language (formal, casual, Australian English, etc.)
  • What the agent should never say or commit to
  • Key business facts the agent must get right every time

If the flow has dynamic variables — for example {{caller_name}} or {{business_name}} — you can set their default values in the Global Prompt panel. The actual values are injected at call time by your integration.

Knowledge base IDs

Attach knowledge bases to give the agent factual grounding during a call. Knowledge base IDs are visible in the Global Prompt panel. Add them in the agent configuration and they become available for the agent to query. The flow builder shows which IDs are attached but does not manage them directly — use the TrustPager API or raise a service request at https://app.trustpager.com/settings/service-requests to add or remove knowledge bases.

Custom tools (Function nodes)

Function nodes call HTTP endpoints mid-conversation. You register custom tools in the agent configuration and they appear as Function nodes in your flow. The script editor lets you set the instruction text for how the agent introduces or explains the function call — the actual endpoint configuration lives in the agent settings. Good uses include checking appointment availability, looking up a contact record, or creating a booking without putting the caller on hold.

Global nodes

A global node can fire from any point in the conversation, regardless of where the agent currently is in the flow. To make a node global, enable its global node setting and write a trigger condition — for example: "Caller asks a factual question about our services". The agent will jump to that node whenever the condition is met, then return to the previous point in the flow.

Global nodes are useful for knowledge base lookups, FAQ handling, or escalation paths that should be reachable from anywhere in the script.

Save Draft and Publish

When you are ready to save, click Save Draft. A confirmation modal shows every change you have made — node instructions, edge conditions, global prompt updates, and settings changes — so you can review before committing. Changes saved as a draft do not go live yet.

Once you are happy with the draft, click Publish on the agent detail page. Publishing syncs the flow to the voice platform and makes it live for incoming and outbound calls. The Save Draft modal reminds you of this distinction, but it is easy to miss on your first build.

Things that trip people up

  • Saving as draft does not go live. You must publish separately after saving.
  • Edge conditions need to be specific. Vague conditions like "caller responds" will match almost anything and cause the agent to jump prematurely. Write conditions that describe a specific caller intent.
  • The Global Prompt applies to all nodes. If you put step-specific instructions in the Global Prompt, they apply everywhere and can confuse the agent at other points in the flow. Keep the Global Prompt for persona and guardrails; put step-specific instructions on the node itself.
  • Function and Branch nodes are read-only in the editor. If you need to change their configuration, raise a service request at https://app.trustpager.com/settings/service-requests.
The last piece

Two ways to
meet FinalPiece.

Talk to Evie right now, or book a real human for a deeper walkthrough. Whichever feels right.

01 · Talk to Evie

Pick up the phone.

Hear her in 10 seconds.

Evie
VOICEMeet Evie
  • RealHer voice passes for human.
  • SmartKnows your prices, hours, and trade.
  • PatientPolite, attentive, never has a bad day.
or
02 · Book a demo

Pencil us in.

60 minutes with a real human · Google Meet · Free.

June 2026
S
M
T
W
T
F
S
Loading…