Knowledge API

The sources an agent answers from. 7 ops: add_knowledge_source, list_knowledge_sources, get_knowledge_source, update_knowledge_source, sync_knowledge_source, delete_knowledge_source, search_knowledge.

The sources an agent answers from.

Add a knowledge source · POST /api/v1/add_knowledge_source · scope knowledge:write

Adds content agents answer from. kind url: a public page (follow_links: true also reads same-site pages under path_prefix, up to max_pages); sitemap: every page of a sitemap.xml (filtered by path_prefix); markdown, text or file: a document you upload as text (filename tells HTML from Markdown). Content is chunked and embedded; crawls sync in the background within a minute and then every sync_interval_hours. agent_id attaches it to one agent; without it every agent of the organization can use it. Returns the source; check status with get_knowledge_source.

curl -X POST https://getwabi.dev/api/v1/add_knowledge_source \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"kind":"url","name":"Support"}'

List knowledge sources · POST /api/v1/list_knowledge_sources · scope knowledge:read or GET …?input=

The organization's knowledge sources (or one agent's plus the organization-wide ones) with status, document and chunk counts, last and next sync, and whether each is stale and why.

curl -X POST https://getwabi.dev/api/v1/list_knowledge_sources \  -H "Authorization: Bearer wabi_…"

Get a knowledge source · POST /api/v1/get_knowledge_source · scope knowledge:read or GET …?input=

One source with its documents (URL or file name, title, size, when fetched and when last changed) and staleness.

curl -X POST https://getwabi.dev/api/v1/get_knowledge_source \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"source_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Update a knowledge source · POST /api/v1/update_knowledge_source · scope knowledge:write

Renames a source, replaces an uploaded document's content (re-embedded at once), changes a crawl's settings or schedule, or disables it (agents stop using it). Crawl changes take effect at the next sync; call sync_knowledge_source to sync now.

curl -X POST https://getwabi.dev/api/v1/update_knowledge_source \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"source_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Sync a knowledge source now · POST /api/v1/sync_knowledge_source · scope knowledge:write

Re-reads a source now: a crawl is queued for the agents worker (done within a minute or two); an uploaded document is re-embedded at once. Unchanged pages keep their chunks; changed pages are re-chunked; pages that disappeared are removed.

curl -X POST https://getwabi.dev/api/v1/sync_knowledge_source \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"source_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Delete a knowledge source · POST /api/v1/delete_knowledge_source · scope knowledge:write

Deletes a source with its documents and chunks. Agent versions that name it stop finding its content.

curl -X POST https://getwabi.dev/api/v1/delete_knowledge_source \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"source_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Search knowledge · POST /api/v1/search_knowledge · scope knowledge:read or GET …?input=

Hybrid (semantic + keyword) search over knowledge sources, exactly as agents retrieve: the passages that best match a question, each with its source, document title and URL, heading, score and freshness. Pass agent_id to search what that agent can use, or source_ids.

curl -X POST https://getwabi.dev/api/v1/search_knowledge \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"query":"refund"}'