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

# Scripts

> Scripts are the foundation of every Voxworks voice assistant that defines persona, conversation structure and behaviour. Scripts are comprised of a main flow, sub-flows, steps, conditions, and branching paths.

## What is a Script?

A Script brings together all the components that make your voice assistant work:

| Component             | Purpose                                                            |
| --------------------- | ------------------------------------------------------------------ |
| **Flow**              | The conversation logic with steps, conditions, and branching paths |
| **Objectives**        | Goals the assistant should accomplish during the call              |
| **Guidelines**        | Rules for handling specific situations or topics                   |
| **Knowledge Base**    | Reference documents the assistant can draw from                    |
| **Voicemail Message** | What to say when reaching voicemail on outbound calls              |
| **Settings**          | Configuration options like maximum call duration                   |

***

## How Scripts Work

When a call starts, Voxworks loads your Script and uses it to guide the entire conversation. After the call ends, objectives are reviewed against the transcript:

1. **Initialization** — The Script is loaded with its components, main flow, sub-flows and voice settings
2. **Opening Message** — The assistant speaks the first message of the main flow
3. **Conversation Flow** — The assistant follows the flow's steps, responding to user input and navigating conditions
4. **Objective Tracking** — The assistant works toward completing the defined objectives
5. **Call Completion** — The call ends when an end condition is reached or the user hangs up

***

## Script Types

Scripts can be configured for different call types:

* **Inbound** — Handles incoming calls to your phone numbers
* **Outbound** — Powers automated outbound calling campaigns

The main flow from any Script can be reused across other Scripts as a sub-flow.

***

## Creating a Script

To create an effective Script:

1. **Define your objectives** — What should the assistant accomplish?
2. **Build your flow** — Map out the conversation steps and branching logic
3. **Add guidelines** — Handle edge cases and specific topics
4. **Configure settings** — Set call duration limits and other options
5. **Select a voice** — Choose the voice that fits your brand

***

## Next Steps

* [Call Objectives](/scripts/call-objectives) — Define what your assistant should accomplish
* [Guidelines](/scripts/guidelines) — Handle specific situations with conditional rules
* [Knowledge Base](/scripts/knowledge-base) — Give your assistant reference information
* [Settings](/scripts/settings) — Configure call duration and other options
