This guide walks through the complete knowledge base workflow—from creation to agent integration.
Every KB starts with a name and optional description. Use the create method:
The response contains the KB ID you’ll use for all subsequent operations:
get() retrieves the full details of a specific KB:
Returns the full KB object:
list() returns every KB in your organization:
The connection happens at agent creation time. Pass kb_id to the new_agent helper:
The agent now has access to all content in that knowledge base during conversations.
get_agent_by_id() returns the agent with its globalKnowledgeBaseId field:
The response includes the linked KB ID:
A knowledge base cannot be deleted while it’s connected to an agent. Delete or archive the agent first.
Use delete_agent() to archive the agent, then delete() to remove the KB:
Currently, each agent supports one knowledge base via globalKnowledgeBaseId. For multiple knowledge sources, combine them into a single KB before linking.
PDF files are fully supported. Text upload is available but may require backend deployment. Check with your administrator.
Upload new documents to the same KB. The agent will automatically use the updated content in future conversations.
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.