Skip to content
Docs
On this page What the agent sees 1/5
Internal — not published

The reply agent works from four kinds of context: instructions written when the session starts, team rules read again at the start of every turn, a window of the session’s own conversation, and whatever its tools fetch from knowledge, memory and the CRM during a turn.

What the agent sees

PartContentWhen it is read
Role and rulesAnswer only about the company’s products; search knowledge before stating a product fact; check memory; no pricing or financial arithmetic; end every turn by submitting a reply with an honest confidence, or by handing off; CRM records are the agent’s own assessment; short plain-text replies in the customer’s languageWhen the session is built
Recent historyThe last 10 messages with this person, each with its time and marked as customer or teamWhen the session is built
ProductsThe products the conversation is about, with their names and descriptions (600 characters each), and an instruction to hand off questions about other productsWhen the session is built
Team rulesThe rules from the AI Agent Behavior page: up to 10, of 280 characters each, under a header saying they never override the instructions aboveAt the start of every turn
ConversationThe last 40 messages of the session, including tool calls and results, with long tool results cutEvery model call

Because team rules are read at the start of every turn, an edit on the Behavior page reaches a running session at its next turn. Older turns fall out of the 40-message window; the instructions tell the agent to use memory for them.

Product scope

When a session starts, the agent decides which products the conversation is about:

  1. Products whose Sends from accounts include the account that received the message narrow the list. With no such links, every product is in scope.
  2. If the person’s latest campaign run is still going, or started in the last 30 days, that campaign’s products narrow it further. Campaign products outside the list from step 1 are ignored.

The scope holds for the whole session. With every product in scope, the prompt has no product section. A knowledge search for a product outside the scope searches the scoped products instead, and listing products shows only the scoped ones. When exactly one product is in scope and it has its own model, the session runs on that model; see Models and evals.

Finding knowledge and memory

Knowledge documents and memories are stored with embeddings: lists of numbers that place a text by meaning, so that texts about the same thing sit close together. A search turns the question into an embedding the same way and returns the nearest stored texts.

How the agent finds knowledge for a reply Step 1 of 5

The session's product scope was decided when it started. Every search stays inside it.

The search keeps scanning past rows its filters drop, so a busy index still returns 5 passages. PDFs are split page by page, so every passage knows its page. Changing the workspace’s embedding model re-embeds its documents and memories; until that finishes, passages and memories from the old model are left out of searches.

Sources

The passages a search returned are kept per session until the turn ends. When the agent submits a reply:

  • the sources are the passages it named that were retrieved in this turn, or, when none of those are usable, the 3 closest passages it retrieved;
  • each document page appears once;
  • the list is cleared for the next turn.

Each source keeps the document, product and page. They are saved on the sent message or the Draft, which is where the source chips in the Inbox come from; a hand-off clears them without saving.

Long-term memory

Each person has a memory store that outlives sessions:

KindWritten by
Fact, planThe agent’s Remember tool, one sentence each
SummaryLead scoring, which keeps one rolling summary per person and replaces it on every run

Remember embeds the sentence with the workspace embedding model. Without one, the memory is still saved and shows on the person page, but recall cannot find it.

Recall memory embeds the agent’s query and returns the person’s 5 closest memories that were embedded by the current model. Lead scoring reads the summary back as its existing note on the next run, so the summary carries what the agent learned from one scoring to the next.

Docs
EN VI