Search the agent's trained knowledge base and get the most relevant passages, ordered by relevance, without generating a reply. Runs the same retrieval the agent uses when answering, so it is the fastest way to check what the agent knows about a topic. Does not use message credits. An agent that has not finished training returns an empty list. Requires the read:knowledge permission.
Authorization
BearerAuth read:knowledgeAuthorizationBearer <token>
In: header
Scope: read:knowledge
Path Parameters
id*string
Query Parameters
query*string
limit?integer
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/agents/string/knowledge/search?query=string"{
"agentId": "string",
"query": "string",
"items": [
{
"content": "Our returns window is 30 days from delivery for unused items.",
"title": "Returns policy",
"url": "https://example.com/returns"
}
]
}{
"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"
}
]
}