POST
/
v2
/
agents
/
{agent_id}
/
kb
/
vector_search
curl --request POST \
  --url https://eu-vg-edge.moeaymandev.workers.dev/v2/agents/{agent_id}/kb/vector_search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "vector": [
    123
  ],
  "max_chunks": 123,
  "with_payload": true,
  "with_vector": true,
  "similarity_threshold": 123
}'
{
  "success": true,
  "message": "Search successful",
  "data": [
    {
      "id": "<string>",
      "namespace": "<string>",
      "similarity": 123,
      "payload": {
        "text": "<string>",
        "chunk_index": 123,
        "doc_id": "<string>",
        "doc_name": "<string>"
      },
      "vector": [
        123
      ],
      "tags": [
        "<string>"
      ]
    }
  ]
}

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 search the KB of

Body

application/json

Search body object

The body is of type object.

Response

200
application/json

Search results

The response is of type object.