Skip to main content
Use source commands to manage an agent’s knowledge base — text, Q&A pairs, links, and file uploads. For REST details, see Sources API. Most commands require an agent ID (-a agt_123) or a default agent.

Add sources

Text snippet:
Website link (crawl mode):
Q&A pair:
File upload:
Link types also include individual (single page) and sitemap.

List and inspect

List sources for an agent:
Show one source:
View aggregated counts and sizes:

Update, delete, and restore

Update a text, Q&A, or link source:
Replace a file source:
Delete a source (restorable):
Restore a deleted source:

Train after changes

Adding or updating sources does not retrain the agent automatically. Queue a training job when you are ready:
See CLI Agents for training and auto-retrain options.

Commands

For every flag, run chatbase sources <command> --help.