Add Text
Add raw text content to an agent's knowledge base.
POST
/knowledge/add-textAdd raw text content to the knowledge base. The text is chunked, embedded, and indexed for retrieval.
No parameters for this endpoint.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | The agent's public ID (ag_*) |
text | string | Yes | Raw text content to add |
title | string | No | Display name for this source |
Response 201
{
"id": 1,
"name": "Return Policy",
"type": "text",
"status": "processing",
"created_at": "2026-03-07T14:00:00Z"
}The source begins processing immediately. Check status via List Sources.
Errors
| Code | Description |
|---|---|
401 | Missing or invalid authentication |
404 | Agent not found |
413 | Text too large |