Using Knowledge Bases with Agents
Connect knowledge bases to agents so they can search your documents when answering questions.
Once you have created a knowledge base and added content, you can connect it to one or more agents. This gives the agent access to search your documents during conversations.
Connecting a knowledge base to an agent
During agent creation
When creating a new agent, the creation form includes a Knowledge Bases section. Select one or more knowledge bases from the dropdown to connect them.
On an existing agent
- Navigate to the agent's detail page.
- Find the Knowledge Bases section.
- Select the knowledge bases you want to attach.
- Save the changes.
How agents use knowledge bases
When a user sends a message, the agent determines if it needs to search for information. If so, it:
- Converts the user's question into a search query.
- Searches all connected knowledge bases for the most relevant document chunks.
- Includes the matched content as context in its response.
- Cites the source document when providing information from the knowledge base.
The agent does not search knowledge bases for every message — only when it determines that document search would help answer the question.
Connecting multiple knowledge bases
An agent can be connected to multiple knowledge bases at once. When searching, the agent queries all connected knowledge bases and returns the most relevant results across all of them.
This is useful when you want an agent to have access to different types of information. For example, a support agent might be connected to:
- A Product Documentation knowledge base
- A Company Policies knowledge base
- A FAQ knowledge base
Knowledge bases through skills
Skills can also configure knowledge base search as a tool. When a skill includes a knowledge base search tool configuration, the agent can search specific knowledge bases when that skill is activated. This provides more targeted search behavior tied to specific tasks.
Best practices
- Keep content focused — A knowledge base with focused, relevant content produces better search results than one with a broad mix of unrelated documents.
- Update regularly — Re-upload documents when content changes to keep the agent's answers accurate.
- Test search quality — After adding content, ask the agent questions that should be answered by your documents. Verify the responses are accurate and cite the right sources.
- Use descriptive names — Name your knowledge bases clearly so you can easily identify which to connect to each agent.