Add URL
Add a web page URL to an agent's knowledge base.
POST
/knowledge/add-urlScrape a web page, extract its content, and index it for retrieval.
No parameters for this endpoint.
Request Body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
agent_id | string | Yes | — | The agent's public ID (ag_*) |
url | string | Yes | — | Web page URL to scrape and index |
scrape_subpages | boolean | No | false | Crawl and index linked pages on the same domain |
Response 201
{
"id": 2,
"name": "https://docs.example.com/getting-started",
"type": "url",
"status": "processing",
"created_at": "2026-03-07T14:00:00Z"
}The URL is scraped and indexed asynchronously. Check status via List Sources.
Errors
| Code | Description |
|---|---|
401 | Missing or invalid authentication |
404 | Agent not found |
422 | Invalid URL format |