Creating a Knowledge Base
Every KB starts with a name and optional description. Use thecreate method:
Retrieving KB Details
Single Knowledge Base
get() retrieves the full details of a specific KB:
All Knowledge Bases
list() returns every KB in your organization:
Linking a KB to an Agent
The connection happens at agent creation time. Passkb_id to the new_agent helper:
Verifying the Link
get_agent_by_id() returns the agent with its globalKnowledgeBaseId field:
Deleting a Knowledge Base
Usedelete_agent() to archive the agent, then delete() to remove the KB:
SDK Reference
| Method | Description |
|---|---|
kb.create(name, description) | Create a new knowledge base |
kb.list() | List all KBs in your organization |
kb.get(id) | Retrieve a specific KB |
kb.delete(id) | Delete a KB (must be unlinked first) |
Tips
Can I link multiple KBs to one agent?
Can I link multiple KBs to one agent?
Currently, each agent supports one knowledge base via
globalKnowledgeBaseId. For multiple knowledge sources, combine them into a single KB before linking.What file types can I upload?
What file types can I upload?
PDF files are fully supported. Text upload is available but may require backend deployment. Check with your administrator.
How do I update KB content?
How do I update KB content?
Upload new documents to the same KB. The agent will automatically use the updated content in future conversations.
Why can't I delete my KB?
Why can't I delete my KB?
The error “This knowledge base is connected to an agent” means you must delete or archive the linked agent first. KBs with active connections cannot be removed.

