# How the agent works

answerable's agent investigates every ticket: it reads the conversation, looks things up in your knowledge and connectors, and sorts the ticket into one of your ticket types. Then three questions decide what happens, each with answerable's own checks first and yours after. You set them up under **Agent**, as an admin, and the **Flow** chart shows them in order, with how many tickets each caught.

## How a ticket moves

1. **A message arrives.** Mail to your support address starts a ticket, or joins the conversation it replies to. Mail a system sent, mail from spam senders, and busy senders stop here, before the agent reads anything.
2. **The agent reads it.** It reads the conversation, follows your instructions, looks things up, sorts the ticket into a type, and answers your rules.
3. **Should this be closed?** Clear spam, automatic mail and duplicates close first. Then your rules that close a ticket or mark it as spam, then messages that need no reply. When answerable's own spam check closes a ticket your spam rule also matched, the ticket names your rule too. Spam the agent isn't sure of goes on to a person.
4. **Should a person take this?** answerable's own reasons come first: a customer who asks for a person, or something a person must decide. Then your rules, and ticket types set to **Hand to a person**. The agent's reply stays as a draft for whoever takes it.
5. **Should the reply wait for approval?** A reply that would go out on its own passes answerable's safeguards, then yours, and the first that holds it decides. A ticket type's level says which replies may go out on their own at all.
6. **Sent on its own.** A reply nothing stopped goes out from your support address.

## Ticket types

The agent sorts every ticket into one of your types, by each type's name and description: say what belongs in it, and what doesn't. A type can also:

- set how much the agent may do with its tickets, or follow the agent's level;
- say who takes its tickets when they need a person, unless a rule names someone else;
- say how to answer its tickets, on top of your instructions: what to include, link to, or avoid.

A workspace has up to 15 types. **Other or unclear** is always there, and always last. A renamed type keeps its tickets and its counts.

## How much the agent may do

The agent's level applies to every type that doesn't set its own:

- **Hand to a person:** a person takes these and writes the reply. The agent still investigates and leaves what it found.
- **Propose replies:** the agent drafts replies, and every message to the customer waits for approval.
- **Ask follow-ups:** it also asks the customer follow-up questions on its own. Answers wait for approval.
- **Answer and resolve:** it also sends answers on its own and resolves the ticket, once they pass the safeguards.

## Your rules

A rule is a condition in your own words, such as "The customer wants to cancel", that the agent answers on every ticket it reads, whatever the ticket's type. A rule can be limited to some ticket types. Each rule says two things:

- **Where it goes:** the ticket closes without a reply, goes to Spam, goes to a person (or one teammate), or carries on as it would have. Rules that close or mark spam are on **Intake**, the others on **Handoffs**.
- **What else happens:** some teammates hear about it by email, once per ticket, when the ticket ends up where the rule sends it. A rule that carries on is there for this, and tells them unless the ticket closes.

A rule never closes a message that tries to steer the agent or asks for a person: those go to a person. The agent only says a closing rule matches when nothing else in the customer's latest message needs an answer, and if they write again, it reads the new message afresh. A spam rule never marks someone who has written in before: a person checks them instead.

## Your safeguards

A safeguard is a condition about a reply, such as "The reply quotes a price". Before a reply goes out on its own, a second AI reads it next to what the customer wrote, and answers yours alongside answerable's own: when one is true, the reply waits for approval. answerable's own hold an answer that neither cites a source nor comes with actions that may run on their own, a reply to a sender whose email isn't verified, one that repeats an earlier reply, and one that shares details or makes promises the customer didn't ask for.

Each gate holds up to 10 rules or safeguards, of up to 200 characters each.

## Versions

Every save is a version, with who saved it and what changed. **History** shows them, and brings back an earlier one. A change applies from the agent's next investigation.

## With an agent

An agent connected to answerable's [MCP server](https://staging.preview.answerable.co/docs/developers/mcp.md) can read these settings with `get_agent` and change them with `update_agent`, with the **Configure the agent** permission (`agent:configure`), as an admin. It can set them up from your own tickets: read a sample with `list_tickets` and `get_tickets`, propose types or rules with the tickets they'd catch, and save the ones you agree to.

- `update_agent` takes the version the agent read. If someone saved since, nothing changes.
- `types` and `rules` replace the whole list, in order: each keeps its `id`, which keeps a type's tickets with it, and new ones go without one.
- The answer says what changed, in the words the history uses.
