knowledge_base array.
In the Studio
1
Open the agent
Open the agent you want to attach the KB to in app.trugen.ai.
2
Go to the Knowledge Base tab
In the agent’s configuration tabs, open Knowledge Base.
3
Select one or more Knowledge Bases
Pick from your list of KBs. You can attach multiple — the agent decides which one to search for each user question.
4
Save
Save the agent. The next session picks up the new KB configuration automatically.
Via API
Include one or more KB references in the agent’sknowledge_base array when creating or updating an agent:
Via a template
Attach Knowledge Bases to a template instead of individual agents when you want every agent built from that template to inherit the same knowledge:Multi-KB strategy
Attaching multiple focused Knowledge Bases to one agent almost always beats attaching a single mixed one. The LLM uses each KB’s Name and Description to pick the right one — well-scoped KBs give it a strong signal. Recommended:When updates take effect
Adding or removing a Knowledge Base on an agent takes effect on the next session — active conversations keep the previous configuration until they end. If you need to force the change on running sessions, end them explicitly withDELETE /v1/conversation/{conversationId} after saving the agent update.
Verifying retrieval
The best way to verify a KB is working is to talk to the agent. Ask a question whose answer you know is inside the KB:- If the agent answers correctly → retrieval is working.
- If the agent hedges or gives generic info → the KB may not have been picked. Check the KB’s Name and Description are specific enough. See Naming and describing well.
- If the agent hallucinates → the answer isn’t in the KB, or retrieval isn’t finding the right chunk. Rephrase the source content, or split the doc.
Next steps
Templates
Attach a KB to a template so every agent built from it inherits the knowledge.
Adding Content
Add more content to a KB after attaching.