Add a web page or site
Add a URL knowledge-base source. The page is read, cleaned to its main text, chunked, and embedded, the same shape as `add_text_kb_source` but the content is pulled at ingest time. Pass `wholeSite: true` to read up to 100 pages of the same site as one source instead. Re-fetch is manual unless a schedule is set with `edit_kb_source_schedule`. Paywalled pages, or a site with no readable pages, fail with an error the operator can act on. Use for public content the operator wants to keep current (pricing page, FAQ page, policy page, or a whole small-business site).
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Path Parameters
Workspace slug (GET /me lists yours).
Agent slug within the workspace.
Header Parameters
A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/workspaces/string/agents/string/knowledge-base/urls" \ -H "Content-Type: application/json" \ -d '{ "url": "http://example.com" }'{
"source": {
"id": "string",
"status": "string",
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Add a text source POST
Add a plain-text knowledge-base source to the agent. The content is chunked (~512 tokens), embedded at 1024 dimensions, and stored for retrieval via the `search_knowledge_base` tool at call time. Use when the caller's content lives in your prompt / docs / FAQ, paste it here rather than stuffing it into the system prompt. **The first source on an agent auto-attaches the `search_knowledge_base` tool**; the agent will start citing the new content on its next call.
Delete a knowledge source DELETE
Delete a knowledge-base source by id. Cascades to its chunks via the FK. Use when content is wrong or no longer wanted; for content that just needs re-reading, call `refresh_kb_source` instead, which keeps the source's id and sync schedule.