Upcoming Mid April 2026
Base URL: https://api-staging.internal-aui.io/knowledge-base-manager/v1
Auth: x-api-key header
List Knowledge Bases
GET /knowledge-bases
Query Parameters
Scope type filter.
Network ID.
Account ID.
Seed ID.
Include hierarchy.
cURL
Best Practices
- Use
include_hierarchy=truefor full visibility — This returns knowledge bases inherited from parent scopes (account, organization), not just network-level ones. Essential for understanding what data the agent has access to. - Filter by scope to avoid confusion — Always pass
network_idandaccount_idto scope the results. Without filters, you may see knowledge bases from other agents.
Upload Files (Bulk)
Upload files to a knowledge base for RAG processing.POST /bulk/files
Content-Type: multipart/form-data
| Field | Type | Description |
|---|---|---|
files | File[] | Files to upload |
created_by | string | User email |
scope_type | string | Scope type |
network_id | string | Network ID |
account_id | string | Account ID |
seed_id | string | Seed ID |
knowledge_base_id | string | Existing KB ID (optional) |
knowledge_base_name | string | New KB name (optional) |
knowledge_base_description | string | New KB description (optional) |
Best Practices
- Supported formats — Upload PDF, DOCX, CSV, TXT, and other document formats. Check
files_failedin the response to catch unsupported or corrupted files. - Use descriptive
knowledge_base_name— Name knowledge bases by content domain (e.g.,product-catalog-2026,return-policy). This makes it easier to manage and audit. - Upload to an existing KB when possible — Pass
knowledge_base_idto add files to an existing knowledge base rather than creating a new one for every upload. This keeps related content together. - Batch uploads — Send multiple files in a single request rather than one file per request. This reduces overhead and ensures atomicity.
Upload Websites (Bulk Scrape)
Scrape websites and add them to a knowledge base.POST /bulk/websites
Best Practices
- Provide meaningful
resource_name— Name each URL resource clearly (e.g.,FAQ Page,Pricing) rather than using the URL as the name. This improves RAG retrieval quality. - Scrape sparingly — Website scraping is resource-intensive. Avoid scraping entire sites — target specific pages with high-quality content relevant to the agent’s domain.
- Check
urls_failedin the response — Pages behind authentication, CAPTCHAs, or JavaScript-heavy SPAs may fail to scrape. Verify each URL is accessible before submitting.
Export Knowledge Bases
Export all knowledge bases for a scope, including vectors.POST /bulk/export
Best Practices
- Export before destructive changes — Always export knowledge bases before deleting resources, migrating agents, or making bulk vector changes. The export includes all vectors and can be re-imported.
- Use exports for environment promotion — Export from staging and import into production to ensure the same knowledge base content is available in both environments.
- Store exports in version control — Save export JSON files alongside your
.aui.jsonagent configs. This gives you a full backup and change history of your agent’s knowledge.
Import Knowledge Bases
Import previously exported knowledge base data.POST /bulk/import
Best Practices
- Review the results summary — Check
vectors_created,vectors_updated, andvectors_deletedto understand exactly what changed. Unexpected deletes may indicate a scope mismatch. - Import is idempotent — Re-importing the same data will update existing vectors rather than creating duplicates. Use this for safe re-syncs.
- Match scope carefully — The import uses scope levels from the export. Ensure the target environment has matching network, account, and organization IDs, or remap them before importing.
