Skip to main content

Knowledge for email agents

Email agents search and open the same knowledge documents as voice and chat agents. Open your email agent's Knowledge tab to add collections, labels or individual documents, then use the Dialogue builder to choose what each state searches or puts in its prompt.

Add documents to the agent​

On the Knowledge tab, click Add documents in the Documents card. Choose a collection, then add the whole collection, one of its labels, or individual documents. A collection includes current and future documents. A label includes documents with that label in the selected collection; a label in another collection grants nothing. Individual documents stay selected until you remove them.

Choose Searchable to let the agent find and open a document when needed, Summary in prompt to add its title and summary when a state starts, or Full text in prompt to give the agent the whole document without it having to look it up. Full text goes in from the start of every email with Always, or when a chosen state starts. Open a state in the Dialogue builder to add a summary or full text there and choose which documents it can search. Advanced contains agent-wide Excluded documents and Search limits per state. Adding the first document enables knowledge retrieval; removing the last placement disables it.

Use General knowledge for short facts that belong in every email, such as support hours. Put longer policies and shared reference material in documents.

Choose knowledge for a state​

Open a state in the email Dialogue builder. Its Knowledge in [state name] panel controls the state placements and search. Email agents always apply the state's Searchable while in this state choice. Follow the shared state knowledge rules for search, prompt placements and access to previously returned documents.

Search, read and answer​

Enabling knowledge adds search_knowledge and get_knowledge_document. The agent uses search metadata to select a document, then opens its body before answering. It can open a document already listed in context without another search.

Search ranks lexical matches in titles, summaries, upload paths and indexed content. A synonym or translation may need different keywords. For example, if a question about getting money back finds nothing useful, try words used in the policy such as refund timing. See search behavior for result and indexing limits. Reading is stricter: get_knowledge_document returns only the first 40,000 characters of a document, so a passage later than that may still be indexed, and found by search, but cannot be read. Split long sources into smaller documents.

Tell the agent which topics require a lookup, to answer only from the retrieved content, and what to do when that content does not support an answer. A reply can stay in the customer's language even when the source document uses another language.

Test before sending​

Use Try a question on the Knowledge tab. Choose Configuration to compare unsaved edits, the saved draft or the published configuration, enter a Question, then click Run to test the agent-wide scope. The email channel is selected automatically. Test state settings from each state's own knowledge panel. Results show ranked matches, prompt placements and the reasons for access; they test retrieval, not the wording or correctness of the final reply.

Then process a test email and inspect Processing History. A search entry records the returned titles, summaries and labels. A document-fetch entry records its ID, title and content length; the document body is not stored in that tool result on the email record. People who can open the email can see that metadata even if they cannot open the knowledge library.

The wrap-up pass can use knowledge too. It runs outside the dialogue's final state, without that state's listing or search restriction, and uses the agent-wide scope. Exclusions still apply.

Before a Reply or Forward action uses Send, check an answerable question, an ambiguous question and one the collection cannot answer. Compose and Draft keep a human review step; Send delivers the message without that check. Knowledge has no separate auto-send setting.

Repair unavailable knowledge​

If a document is deleted or moved out of a collection included on the agent's Knowledge tab, it can become unavailable without a new agent publication. Check the Knowledge tab and affected states for unavailable rows, remove or replace those placements, then test again. Add the whole collection only if the agent should receive all its current and future documents.

Removing the last document placement disables retrieval. Add a collection, label or document on the Knowledge tab to enable it again. Check any state placements after library changes so they don't refer to unavailable documents.

Next steps​