Add Text

Add raw text content to an agent's knowledge base.

POST/knowledge/add-text

Add raw text content to the knowledge base. The text is chunked, embedded, and indexed for retrieval.

No parameters for this endpoint.


Request Body

FieldTypeRequiredDescription
agent_idstringYesThe agent's public ID (ag_*)
textstringYesRaw text content to add
titlestringNoDisplay 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

CodeDescription
401Missing or invalid authentication
404Agent not found
413Text too large

On this page