Add a URL or text snippet to an agent's knowledge and queue background indexing. Poll GET /agents/{id}/sources or GET /agents/{id}/training-status to watch progress. Requires the write:sources permission.
Authorization
BearerAuth write:sourcesIn: header
Scope: write:sources
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/agents/string/sources" \ -H "Content-Type: application/json" \ -d '{ "type": "url", "url": "https://acme.com/pricing" }'{
"id": 0,
"agentId": "string",
"type": "url",
"name": "string",
"status": "processing"
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}List training sources GET
List an agent's training sources (crawled URLs, text snippets, uploaded files), newest first, paged with `limit`/`offset` and filterable by `type`. Requires the `read:sources` permission.
Delete a training source DELETE
Remove a source and everything indexed from it. This cannot be undone. Requires the `write:sources` permission.