> ## Documentation Index
> Fetch the complete documentation index at: https://docs.callers.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Script

> This guide provides an overview of how to create a versatile and effective agent script within the Callers platform.Tailor the conversation flow to meet the unique needs of your agent, whether it's for inbound or outbound calls.

### Understanding the Script Creation Process

Creating an agent script involves setting up a series of decision points and responses that guide the conversation with your clients.

<Frame caption="An example script: qualification up front, then a nested script for meeting scheduling">
  <img src="https://mintcdn.com/voxiaai/ELyrb3NxuHh0ILKS/images/documentation/build-your-agent/script-example.png?fit=max&auto=format&n=ELyrb3NxuHh0ILKS&q=85&s=593228bc8eaf4bd9113b7875467d3f1a" alt="Script canvas showing a branching conversation flow" style={{borderRadius: '10px'}} width="3792" height="1802" data-path="images/documentation/build-your-agent/script-example.png" />
</Frame>

### Steps to Create Your Script

**Initiate with the Intro Script**

* **Inbound Calls**: As a suggestion, you might begin your script with an introductory script node where you confirm the client's identity by asking for their name and inquiring about their well-being. However, feel free to adjust this approach based on your specific needs.
* **Outbound Calls**: As a suggestion, start by confirming the client’s identity and then proceed with the planned interaction. This is just a guideline, and you can tailor it as required.

<Frame caption="A node opens into its steps, with buttons to add a step, a meeting, an action, a transfer, or an end call">
  <img src="https://mintcdn.com/voxiaai/DUXJUr2YtBjwx26G/images/documentation/build-your-agent/intro-script.png?fit=max&auto=format&n=DUXJUr2YtBjwx26G&q=85&s=96fe9d632b8c4b23136267fc26e73a5f" alt="Expanded script node showing its steps" style={{borderRadius: '10px'}} width="2633" height="1217" data-path="images/documentation/build-your-agent/intro-script.png" />
</Frame>

#### **Branching the Conversation**

* After the initial engagement, introduce a question to guide the conversation. Based on the client's response, you can expand the script:

  * Click the `+` button next to the current node.
  * Choose how to continue - `Add Subflow`, `Add Nested Script`, or `Go to Block`.
  * In the new node, label it with a title that represents the client’s latest response which guides the agent to this node. Alternatively, you can simply give a title to this node based on its content.

<Frame caption="The + button offers three ways to continue the conversation">
  <img src="https://mintcdn.com/voxiaai/DUXJUr2YtBjwx26G/images/documentation/build-your-agent/branching-dropdown.png?fit=max&auto=format&n=DUXJUr2YtBjwx26G&q=85&s=bbf2973d3ddf967a572c20a560d8f6dc" alt="The + menu with Add Subflow, Add Nested Script, and Go to Block" style={{borderRadius: '10px'}} width="2462" height="1064" data-path="images/documentation/build-your-agent/branching-dropdown.png" />
</Frame>

<Tip>
  **Note**: If no decision split is required, you can continue the script in the same node.
</Tip>

### Nested Scripts

A **nested script** is a self-contained branch that lives on its own canvas. Use one when a part of the conversation is big enough to deserve its own flow - scheduling a meeting, handling an objection, running through a qualification checklist - and you don't want it crowding the main script.

Nested scripts are easy to spot: they are **blue**, and the label above the node names the script it opens.

Click the node to open it. The breadcrumb in the top-left shows where you are and takes you back to the parent script.

<Frame caption="An opened nested script - the breadcrumb leads back to the main script">
  <img src="https://mintcdn.com/voxiaai/DUXJUr2YtBjwx26G/images/documentation/build-your-agent/nested-script.png?fit=max&auto=format&n=DUXJUr2YtBjwx26G&q=85&s=d76618891530d140e95de99f8455f370" alt="A nested script open on its own canvas with a breadcrumb back to Script" style={{borderRadius: '10px'}} width="3814" height="1817" data-path="images/documentation/build-your-agent/nested-script.png" />
</Frame>

<Tip>
  Already built the branch as a regular subflow? Open the node's `•••` menu and choose `Convert to Nested Script`.
</Tip>

### Managing Subflows, Nodes and Steps

* To modify your script effectively, you can move nodes, delete unnecessary subflows, or adjust branching logic.
* Moving or Deleting **Steps**:
  * Position your cursor over the Subflow, click on the `•••` icon to the right of the subflow name.

<Frame caption="The node menu: edit, branch, convert, move, duplicate, or delete">
  <img src="https://mintcdn.com/voxiaai/DUXJUr2YtBjwx26G/images/documentation/build-your-agent/node-options.png?fit=max&auto=format&n=DUXJUr2YtBjwx26G&q=85&s=e8912f93ae79cb171755dad06e5defe1" alt="Node context menu with Edit, Create Subflow, Go to Block, Convert to Nested Script, Move, Duplicate and Delete options" style={{borderRadius: '10px'}} width="2599" height="1252" data-path="images/documentation/build-your-agent/node-options.png" />
</Frame>

* To move a step, press `Move`. The canvas switches into placement mode - pick the `+` button where the block should land, or press `Cancel` to back out.

<Frame caption="Moving a Step will also move the subflows associated">
  <img src="https://mintcdn.com/voxiaai/DUXJUr2YtBjwx26G/images/documentation/build-your-agent/move-nodes.png?fit=max&auto=format&n=DUXJUr2YtBjwx26G&q=85&s=53740237f494efbd0bd6fbc37d17d7fd" alt="Move mode with the prompt to select the new position for the block" style={{borderRadius: '10px'}} width="2756" height="1157" data-path="images/documentation/build-your-agent/move-nodes.png" />
</Frame>

#### **Customize Node Content**

* Customize the dialogue and the questions in each node according to the agent goals. Refer to the [Customize Steps](/documentation/build-your-agent/customizing-steps) page for more details.

<Info>
  **Note**: Each node must contain at least one step.
</Info>

#### **Directing Flow Between Nodes**

* To lead the script from a subflow back to a specific node or to continue the script from a particular point:
  * Click the `+` button next to the node from which you want to continue.
  * Select `Go to Block`.
  * Pick the destination from the **Target Block** dropdown, or click it directly on the canvas. Optionally, give the block a name to describe the client response that leads here.

<Frame caption="Pick the destination from the dropdown or straight from the canvas">
  <img src="https://mintcdn.com/voxiaai/DUXJUr2YtBjwx26G/images/documentation/build-your-agent/go-to-block.png?fit=max&auto=format&n=DUXJUr2YtBjwx26G&q=85&s=584552bdafbfc7c3b617d2b67faa9e2a" alt="Go to Block panel with the Target Block dropdown" style={{borderRadius: '10px'}} width="3685" height="1185" data-path="images/documentation/build-your-agent/go-to-block.png" />
</Frame>

<Info>
  **Note:** You can add as many subflows as needed to accommodate various branches of the conversation.
</Info>

### The Workflow Tab

The script covers what the agent says. Everything around it - what starts the conversation, what counts as a good outcome, and what happens afterwards - lives on the **Workflow** tab at the top of the screen.

<Frame caption="The Workflow tab: triggers, pre-conversation actions, the script, success criteria, summary, and post-conversation actions">
  <img src="https://mintcdn.com/voxiaai/ELyrb3NxuHh0ILKS/images/documentation/build-your-agent/workflow-tab.png?fit=max&auto=format&n=ELyrb3NxuHh0ILKS&q=85&s=512189e7bb7ba5e9c77c8c33293c16d3" alt="Workflow tab showing the full conversation pipeline" style={{borderRadius: '10px'}} width="3780" height="1519" data-path="images/documentation/build-your-agent/workflow-tab.png" />
</Frame>

#### **Success Criteria**

**Success Criteria** define the possible outcomes of a conversation, split into **Goal Reached** and **Goal Not Reached**. Click the card on the Workflow tab to open it.

You can have Callers draft the criteria from your script with **Regenerate**, or write your own with **+ Add**. Each outcome carries a short description that tells the agent when it applies. When the list looks right, click **Mark as Reviewed**.

<Frame caption="Success Criteria, split into Goal Reached and Goal Not Reached">
  <img src="https://mintcdn.com/voxiaai/ELyrb3NxuHh0ILKS/images/documentation/build-your-agent/success-criteria.png?fit=max&auto=format&n=ELyrb3NxuHh0ILKS&q=85&s=0bd081ce9949156b03642bf27a37a672" alt="Success Criteria window with goal reached and goal not reached outcomes" style={{borderRadius: '10px'}} width="1530" height="1565" data-path="images/documentation/build-your-agent/success-criteria.png" />
</Frame>

<Tip>
  Edit the script later and the criteria may fall behind it. The window reminds you to review them after your last edits - run **Regenerate** to bring them back in line.
</Tip>

#### **Summary**

**Summary** is the information the agent collects from each conversation. Click the card on the Workflow tab to see the list; every entry pairs a name with the question it answers, and clicking one opens it for editing. Use **+ Add** to collect something extra.

Whatever you define here shows up in the call summary, alongside your [Key Questions](/documentation/using-callers/key-questions).

<Frame caption="Summary - the key information collected from each conversation">
  <img src="https://mintcdn.com/voxiaai/ELyrb3NxuHh0ILKS/images/documentation/build-your-agent/summary.png?fit=max&auto=format&n=ELyrb3NxuHh0ILKS&q=85&s=9a708f8ca31252cc9edb959156befc30" alt="Summary window listing the information collected from the conversation" style={{borderRadius: '10px'}} width="3189" height="1293" data-path="images/documentation/build-your-agent/summary.png" />
</Frame>

### **Validating the Flow**

* Ensure all node links are correctly made to prevent any dead ends or loops in the conversation.
* Preview and test the agent. Conduct test calls to check the flow and make necessary adjustments.

Click **Test** in the top-right corner to open the test panel. It lists your previous test calls, so you can come back to them later.

<Frame caption="The Test panel keeps a history of your test calls">
  <img src="https://mintcdn.com/voxiaai/ELyrb3NxuHh0ILKS/images/documentation/build-your-agent/test-panel.png?fit=max&auto=format&n=ELyrb3NxuHh0ILKS&q=85&s=2c1d1f71641d963a71aee319b7856f24" alt="Test panel with the Initiate a new test button" style={{borderRadius: '10px'}} width="3796" height="1815" data-path="images/documentation/build-your-agent/test-panel.png" />
</Frame>

Click **Initiate a new test** and choose how to run it:

* **Phone Call** - The test call goes out over one of your own phone numbers, so you need one connected through [SIP](/documentation/integrations/sip) or [Twilio](/documentation/integrations/twilio) first. Enter the number that should receive the call.
* **Web Call** - Talk to the agent straight from your browser. Nothing to connect and no phone number involved, which makes it the quicker way to try a script.

Fill in the script variables, then press **Start**. The toggles below let you load the contact's memories, or run the test in a different language or time zone.

<Frame caption="Test over the phone or straight from the browser">
  <img src="https://mintcdn.com/voxiaai/DUXJUr2YtBjwx26G/images/documentation/build-your-agent/initiate-new-test.png?fit=max&auto=format&n=DUXJUr2YtBjwx26G&q=85&s=a1e0dba56b3ed2f94e974bebcd62bd3d" alt="Initiate a new test window with Phone Call and Web Call tabs" style={{borderRadius: '10px'}} width="1036" height="1637" data-path="images/documentation/build-your-agent/initiate-new-test.png" />
</Frame>
