Add URL

Add a web page URL to an agent's knowledge base.

POST/knowledge/add-url

Scrape a web page, extract its content, and index it for retrieval.

No parameters for this endpoint.


Request Body

FieldTypeRequiredDefaultDescription
agent_idstringYesThe agent's public ID (ag_*)
urlstringYesWeb page URL to scrape and index
scrape_subpagesbooleanNofalseCrawl 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

CodeDescription
401Missing or invalid authentication
404Agent not found
422Invalid URL format

On this page