Skip to main content
Everything you can add in the console’s Knowledge tab is also available through the API, so you can keep an agent in sync with your help center, CMS or repository automatically.

Source types

Every source counts toward your plan’s storage (characters of text plus bytes of files), and crawled pages toward its page limit. When a limit is reached the API returns 403 with PLAN_LIMIT_REACHED. GET /agents/{agentId} shows the current storage.used and storage.limit.

Add knowledge

Files and websites are indexed before the response returns, so a large file or site can take a while. Use a generous client timeout for these requests.
Crawling skips pages the agent already has, so you can call it again later to pick up new pages. To refresh a page that changed, delete it and crawl again.

Keep knowledge in sync

A typical sync job lists what the agent has, removes what’s gone, and adds what’s new:
Subscribe to the source.added and source.deleted webhooks to react to changes made by teammates in the console.

Search without generating

POST /agents/{agentId}/search returns the passages closest to a query, without calling a model. It’s fast, costs a flat 0.2 credits per search, and gives you the raw material to build your own retrieval flow, a “related articles” box or a search page.
  • Results are sorted by score (0 to 1, higher is closer). Passages under 0.3 aren’t returned.
  • limit is 1–20 (default 5). Several passages from one file or website can be returned, each pointing to its source.
  • An empty results array means nothing in the agent’s knowledge is close to the query.

Rate answers

Collect end-user feedback on replies with POST /agents/{agentId}/conversations/{conversationRef}/messages/{messageId}/feedback:
rating is up or down. Sending feedback again for the same message replaces it. The feedback is returned with the message by the messages endpoint.