# How agents work (/docs/agents/how-agents-work)

> How an agent combines identity, instructions, knowledge, actions and channels, and how drafts, versions and the Active switch decide what customers see.

Type: concept | Status: ga | Last reviewed: 2026-11-21

This page explains the model behind an agent: what it is made of, what each part is responsible for, and how your edits reach customers.

## What an agent is made of [#what-an-agent-is-made-of]

| Part | What it is responsible for | Where you set it |
|---|---|---|
| **Identity** | Name, role, tone, avatar, welcome and fallback messages | [Identity](/docs/agents/identity) |
| **Instructions** | The rules and business logic the agent follows | [Instructions](/docs/agents/write-good-instructions) |
| **Knowledge** | Published content it may answer from | [Attach knowledge](/docs/agents/attach-knowledge) |
| **Integrations** | Lookups and actions in connected systems | [Attach integrations](/docs/agents/attach-integrations) |
| **Workflows** | Guided, fixed-order processes it may start | [Attach workflows](/docs/agents/attach-workflows) |
| **Records** | Tables it may read, create or update | [Attach records](/docs/agents/attach-records) |
| **Escalation** | When it hands a conversation to a person | [Escalation](/docs/agents/escalation-settings) |
| **Channels** | Where it appears and how the website chat looks | [Channels](/docs/agents/choose-channels) |

You create knowledge, integrations, workflows and tables once for the workspace and then **attach** them to each agent that may use them. Two agents can share the same published knowledge item. An agent only uses what is attached to it.

## How an answer is produced [#how-an-answer-is-produced]

1. A customer sends a message in a channel.
2. The agent reads its identity and instructions, then looks at the knowledge attached to it.
3. If the question needs data or an action, it may use an attached integration, a record table or a workflow. It does so only where your settings and the customer's [trust level](/docs/security/trust-and-verification) allow it.
4. It replies. If your escalation rules apply, or the customer asks for a person, it hands the conversation to your team instead.

## Draft, version and live [#draft-version-and-live]

An agent has three states of content, and customers only ever see the third:

- **Unsaved edits** are what is on screen. The header shows **Unsaved changes**, and leaving the page asks **Leave without saving?**.
- **The draft** is what **Save draft** stores. The header shows **Draft saved** while the draft differs from the live version. Test chat replies from the saved draft.
- **The live version** is a numbered snapshot created by **Publish**. The header shows **v2 live**, for example. Before the first publish it shows **Not published**.

**History** lists the published versions. You can make an earlier version live again without losing your draft. See [Versions and rollback](/docs/agents/version-history-and-rollback).

## Active or inactive [#active-or-inactive]

The **Active** switch is separate from publishing. An inactive agent stays configured but stops serving new website chat conversations. See [Pause or switch off](/docs/agents/pause-or-switch-off).

## What changes apply when [#what-changes-apply-when]

| Change | Applies to customers |
|---|---|
| Identity, instructions, attachments (knowledge, integrations, workflows, records) | After you **Publish** |
| Escalation settings | After you **Publish** (the page tells you when you save) |
| Website chat appearance and content | After the agent is published; they are saved with the draft |
| Website chat **Allowed sites** and **Protection** | Straight away; they are not part of publishing |
| Knowledge content | After the knowledge item itself is published; see [Knowledge](/docs/knowledge) |
| The **Active** switch | Straight away |

## Who can do what [#who-can-do-what]

Owners, Admins and Builders can edit and publish agents. Support can test them. See [Permissions](/docs/agents/permissions-for-agents).
