PUT
/
v2
/
agents
/
{agent_id}
/
kb
/
{doc_id}
curl --request PUT \
  --url https://eu-vg-edge.moeaymandev.workers.dev/v2/agents/{agent_id}/kb/{doc_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "content": "<string>",
  "metadata": {
    "description": "<string>"
  },
  "tags": [
    "<string>"
  ],
  "sourceType": "doc",
  "status": "ERROR",
  "ts": 123
}'
{
  "success": true,
  "message": "Document added successfully"
}

Authorizations

Authorization
string
header
required

Agent/Workspace secret API key as bearer token.

Path Parameters

agent_id
string
required

The ID of the agent to add the document to

doc_id
string
required

The ID of the document to add

Body

application/json
Document to add to the agent's KB
status
enum<string>
required

Status of the document in the KB

Available options:
ERROR,
SUCCESS,
PENDING,
INITIALIZED
name
string

Name of the document

content
string

Content of the document

metadata
object
tags
string[]

Tags of the document

sourceType
enum<string>

Type of the document

Available options:
doc,
url
ts
number

Timestamp of the document

Response

200
application/json
Document added
success
boolean
message
string