Skip to main content
An agent can have several knowledge bases, and one knowledge base can serve many agents. In the dashboard: Agents (listed under Assistants in the sidebar) → open an agent → Knowledge Base in the editor sidebar.

Before you start

A knowledge base

Created in the same workspace, with status Ready.

An agent

The agent that will answer from it.

Attach or detach a knowledge base

Attaching knowledge bases and mentioning one in the prompt

1

Pick knowledge bases

In the agent editor, click Knowledge Base, then Select Knowledge Base, and tick one or more. Each tick attaches it at once: “Knowledge base attached successfully”. The button then shows the count.
Knowledge Base panel reading Please select the knowledge base(s), a button showing Knowledge bases selected 2, and EMI payment FAQ and Loan policy 2026 listed below with trash icons

Two knowledge bases attached

2

Detach

Click the trash icon on an attached knowledge base, or untick it in the list: “Knowledge base detached successfully”.
Attached knowledge bases are listed below the button and appear under Knowledge Bases when you type @ in the prompt.
Add Knowledge Base at the bottom of the list opens the Knowledge base page to create a new one (Create a knowledge base). If the button reads No knowledge bases found, the workspace has none yet; create one there first. You can also attach knowledge bases while you create the agent. Attachments belong to the version you are editing. On an agent with several versions, attach the knowledge base to each version that needs it.

Multi-prompt agents

A multi-prompt agent has knowledge bases at two levels: Changes go into the draft, so publish the agent for callers to get them. Once a node has a knowledge base or an on-call tool, it also shows Query Phrases: “Phrases the assistant will say before querying a knowledge base or running an on-call tool on this node.” Add short fillers such as “Let me check that for you.” so the caller does not hear silence during the lookup.

Mention it in the prompt

Type @ in the prompt and pick the knowledge base from the Knowledge Bases group. Only attached knowledge bases are listed. A mention isn’t required: the agent can search every attached knowledge base either way. The mention uses the knowledge base’s name and tells the agent which knowledge base covers which questions. For a knowledge base named loan_faqs:
Mention menu with Custom Variables, then a Knowledge Bases group listing EMI payment FAQ and Loan policy 2026, then Logic

Attached knowledge bases in the @ menu

See Write the prompt for how mentions work. If you detach a knowledge base that the prompt still mentions, the mention turns red; remove it or attach the knowledge base again.

How the agent uses it in a call

During the conversation, the agent searches an attached knowledge base when it decides a question needs it, not on every turn, and answers from what it finds. For CSV columns marked Exact match (column configuration), the lookup matches the exact value, such as an order ID the caller reads out.

Do this with the API

Call Edit Assistant (PATCH /agent/v1) with operation set to attach_kb or remove_kb and the kb_id, once per knowledge base. Send your API key in X-API-KEY.
cURL
Get the kb_id from Get All Knowledge Bases, and the agent_id from the editor (Find an agent’s ID). To create knowledge bases by API, see Create Knowledge Base.

Test it

1

Test the knowledge base alone

Ask your questions in the knowledge base’s test chat first (Test it in chat). If the answer is wrong there, fix the data before you test the agent.
2

Test the agent

Place a test call or chat (Test an agent) and ask the same questions, phrased the way a customer would.
3

Read the transcript

Open the call in Logs and read the Transcript tab to see exactly what the agent answered.
The agent’s answers match the knowledge base’s test chat.

Next steps

Add tools

Connect the agent to your APIs before, during and after a call.