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 and delete

Update a text, Q&A, or link source:
Replace a file source:
Delete a source (restorable):
Deletes are permanent. chatbase sources restore is deprecated and does nothing.

Changes take effect on their own

Every create, update, or delete trains the source right away. There is no train step. Check progress with:
The status field reads untrained while the source trains, trained once it is live (usually within seconds), or failed if the run did not land. See CLI Agents for the auto-resync schedule.

Commands

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