Fetchply Docs
GET
/api/v1/agents/{id}/knowledge/search

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:knowledge
AuthorizationBearer <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 starter plan includes 1,000 message credits per month and unlimited agents.",
      "title": "Pricing",
      "url": "https://example.com/pricing"
    }
  ]
}
{
  "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"
    }
  ]
}