octo sources: add knowledge

Add websites, files, text and Q&A pairs to an agent from the terminal, list their training status and delete sources with octo sources.

Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.

octo sources manages the knowledge of an agent. Use it to add a website or a PDF from a script, to check whether training finished, or to remove an outdated source. Each command works on one agent, chosen with --agent or your defaultAgent setting.

Commands

Command What it does
octo sources list Lists sources with type, title and status.
octo sources get SOURCE_ID Shows one source.
octo sources add Adds a source.
octo sources delete SOURCE_ID Removes a source.
octo sources summary Shows counts by status and the total size.

Add a source

Pick one input flag per command.

octo sources add --agent agt_123 --website https://example.com/help
octo sources add --agent agt_123 --file ./returns-policy.pdf
octo sources add --agent agt_123 --title "Shipping times" --text "Orders ship in 2 business days."
octo sources add --agent agt_123 \
  --question "Do you ship abroad?" \
  --answer "Yes, to most countries. Rates show at checkout."
Flag Source type Description
--website Website A page or sitemap URL to crawl.
--file Files A PDF, DOCX, TXT or CSV file.
--text with --title Text Pasted content.
--question with --answer Q&A An approved question and answer pair.
--wait any Wait until the source is ready or failed.

Check status

octo sources list --agent agt_123 --status failed

Statuses are queued, training, ready and failed. A source only helps answers once it is ready. Use --wait in a script so the next step runs after training:

octo sources add --agent agt_123 --file ./handbook.pdf --wait && octo chat "What is the notice period?" --agent agt_123

You should see the source move through queued and training and stop at ready. If it stops at failed, run octo sources get SOURCE_ID to read the reason, fix the file or URL, and add it again.

Delete a source

octo sources delete src_42 --agent agt_123 --yes

Note: Removing a source takes its content out of the agent's answers after the next training run. Use auto-retrain or retrain in the dashboard under Build > Sources if you want the change to apply at once.

Something unclear or missing? Tell us and we will fix the page.