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

# How agents work

> Playbooks support flexible conversations, workflows define explicit processes, and knowledge and tools supply information and actions.

## What makes up an agent?

An agent combines instructions with capabilities that handle customer requests. Playbooks support flexible conversations, workflows define explicit processes, and knowledge and tools supply information and actions. You decide how these pieces fit together.

## When to use this model

Use this model when designing an agent or diagnosing unexpected behavior. First identify which part should own the job: routing, a goal-specific conversation, a defined process, a knowledge lookup, or an external action.

## How the pieces work together

The agent brings guidance and capabilities together. Its global prompt establishes identity and guardrails; its instructions guide what to do next. Playbooks and workflows handle different kinds of work, supported by knowledge and tools.

<WrittenBlock kind="diagram" data='{"caption":"One agent, complementary capabilities","dir":"v","items":[{"group":{"label":"Agent","items":[{"cols":[{"node":{"title":"Global prompt","sub":"Identity and guardrails"}},{"node":{"title":"Instructions","sub":"What to do next"}}]}]}},{"arr":{"label":"Can use"}},{"group":{"label":"Capabilities","items":[{"cols":[{"node":{"title":"Playbooks","sub":"Pursue a goal"}},{"node":{"title":"Workflows","sub":"Follow a process"}},{"node":{"title":"Knowledge","sub":"Find information"}},{"node":{"title":"Tools","sub":"Take action"}}]}]}}],"note":"The agent’s guidance shapes how it uses its capabilities. Playbooks and workflows can work together, using knowledge and tools as needed."}' />

### What each part contributes

| Part | Responsibility |
| --- | --- |
| [Global prompt](/docs/documentation/build/global-prompt) | Shared identity, tone, and guardrails for agentic responses. |
| [Agent instructions](/docs/documentation/build/instructions) | Guidance for routing requests and selecting capabilities. |
| [Playbooks](/docs/documentation/build/playbooks) | Goal-specific conversations that adapt to what the customer says and what tools return. |
| [Workflows](/docs/documentation/build/workflows) | Defined steps and branches, including calls to playbooks where flexible reasoning is useful. |
| [Knowledge](/docs/documentation/build/querying-the-knowledge-base) | Retrieved information from your imported content. |
| [Tools](/docs/documentation/build/tools/overview) | Actions and lookups through integrations, APIs, functions, and system capabilities. |
| [Variables](/docs/documentation/build/data/variables) | Named values that configured steps and tools can store and reuse. |

### Playbooks or workflows?

| Need | Choose | Support example |
| --- | --- | --- |
| Adapt questions and actions to the customer’s situation | Playbook | Clarify an order-status request and explain the lookup result. |
| Follow a defined process with explicit branches | Workflow | Collect an order ID, check return eligibility, then follow the eligible or ineligible branch. |
| Keep a controlled process with a flexible part | Both | Use a playbook to clarify a return reason inside a returns workflow. |

A playbook can call tools, and a workflow can include AI reasoning. The distinction is how the process is controlled, not whether it uses AI.

## Example: handle a return request

A customer wants to return an item. You want a consistent eligibility process, but customers describe their reasons in different ways. Combine a workflow with a playbook:

<WrittenBlock kind="diagram" data='{"caption":"A returns workflow with a flexible conversation inside","dir":"v","items":[{"node":{"title":"Customer","sub":"“I want to return this.”"}},{"arr":{"label":"Request"}},{"node":{"title":"Agent","sub":"Select the returns workflow"}},{"arr":{"label":"Start"}},{"group":{"label":"Returns workflow","items":[{"flow":{"dir":"v","items":[{"node":{"title":"Playbook","sub":"Clarify the return reason"}},{"arr":{"label":"Reason collected"}},{"node":{"title":"Eligibility check","sub":"Continue the defined process"}}]}}]}}],"note":"The workflow controls the process; the playbook handles the conversation within it. Once the reason is collected, the workflow continues."}' />

The **agent** recognizes the request and selects your Returns workflow. Inside that **workflow**, a **playbook** asks follow-up questions until the return reason is clear. The workflow then uses that information in its eligibility check and follows the appropriate path.

This is an example you can configure, rather than a built-in returns process. The playbook step’s exit connection joins the flexible conversation to the next workflow step. [Configure that connection](/docs/documentation/build/steps/playbook#how-control-returns-to-the-workflow).

## Instructions and state have different scopes

The global prompt and agent instructions are different layers. When a playbook is active, agent-level routing instructions are no longer in context; put the guidance it needs in its own instructions. [Compare instruction scopes](/docs/documentation/build/instructions#which-instructions-apply).

A variable is stored data, not the same thing as the model’s current context. Configure where values are captured, where they are referenced, and whether they persist across sessions. Do not assume changing from one capability to another makes all prior instructions available. [Understand variables and context](/docs/documentation/build/data/variables#stored-values-and-model-context).

## Next steps

- [Write routing instructions](/docs/documentation/build/instructions).
- [Create a playbook](/docs/documentation/build/playbooks#creating-playbooks).
- [Build a workflow](/docs/documentation/build/workflows#creating-workflows).
- [Call a playbook from a workflow](/docs/documentation/build/steps/playbook).
- [Configure knowledge retrieval](/docs/documentation/build/querying-the-knowledge-base).
