AI Knowledge Bases API Guide
Learn how to manage AI knowledge bases using the Wacht Rust SDK.Prerequisites
Before using any API methods, you must initialize the SDK:List Knowledge Bases
Get all knowledge bases in your deployment.With Options
Get Knowledge Base
Retrieve a specific knowledge base by ID.Create Knowledge Base
Create a new knowledge base for AI agents.Update Knowledge Base
Modify an existing knowledge base.Delete Knowledge Base
Permanently delete a knowledge base.Manage Documents
List Documents
Get all documents in a knowledge base.Upload Document
Upload a document to a knowledge base.Delete Document
Remove a document from a knowledge base.Supported File Types
Knowledge bases support various document types:- PDF -
.pdffiles - Text -
.txt,.mdfiles - Word -
.docx,.docfiles - HTML -
.html,.htmfiles - Code - Various programming language files
Request Models
CreateAiKnowledgeBaseRequest
name(String) - Knowledge base name (required)description(Option<String>) - Knowledge base description
UpdateAiKnowledgeBaseRequest
name(Option<String>) - Updated namedescription(Option<String>) - Updated description
ListKnowledgeBasesOptions
limit(Option<i32>) - Number of results to returnoffset(Option<i32>) - Number of results to skipsearch(Option<String>) - Search query
Document Model
Knowledge base documents include:Error Handling
All SDK methods return aResult<T, Error>:
Related
- Installation - SDK setup
- Agents Guide - AI agent management
- Tools Guide - Tool management
- Execution Context Guide - Agent execution
- API Reference - Backend API - Full API docs
