There are two main approaches:
Method 1: Using the Dashboard
- Navigate to Build > Files in your Sulus dashboard and upload your files (.txt, .pdf, .docx, .csv, .md, .json, .xml, and more are supported)
- Navigate to Build > Assistant, select your assistant, and associate the uploaded files in the "Files" or "Knowledge Base" section
- Add a system prompt instructing the assistant when to use the knowledge base, then click Publish
When you publish an assistant with selected files, Sulus automatically creates a query tool with those files configured as a knowledge base.
Method 2: Using the Query Tool API
For more advanced configurations, you can use the API to create a Query Tool:
Step 1: Upload your files
curl --location 'https://api.sulus.ai/file' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--form 'file=@"<PATH_TO_YOUR_FILE>"'
Step 2: Create a query tool with your file IDs
curl --location 'https://api.sulus.ai/tool/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--data '{
"type": "query",
"function": {
"name": "product-query"
},
"knowledgeBases": [
{
"provider": "google",
"name": "product-kb",
"description": "Contains comprehensive product information, service details, and company offerings",
"fileIds": ["<FILE_ID_1>", "<FILE_ID_2>"]
}
]
}'
Step 3: Attach the tool to your assistant and update the system prompt to explicitly instruct when to use the tool by name.
Method 3: Custom Knowledge Base
For full control over document retrieval, you can implement your own knowledge base server. Sulus forwards search requests to your custom endpoint via a webhook-style integration.
curl --location 'https://api.sulus.ai/knowledge-base' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_CORE_SYSTEM_API_KEY' \
--data '{
"provider": "custom-knowledge-base",
"server": {
"url": "https://your-domain.com/kb/search",
"secret": "your-webhook-secret"
}
}'
Custom knowledge bases can only be attached to assistants via the API, not through the dashboard.