answerLoopsanswerLoops Docs
ReferenceAgent API

Semantically search the organization's knowledge base

GET
/api/v1/agent/kb/search

Authorization

bearerAuth kb:read
AuthorizationBearer <token>

Org-scoped API key generated in Settings → API Keys (al_live_ prefix). Shared with the MCP server — the same key authenticates both surfaces. A key carries a set of least-privilege scopes; each operation lists the scope it requires. A key missing a required scope gets 403 with a WWW-Authenticate: Bearer error="insufficient_scope" header. Scope catalogue: see the x-api-scopes object and /.well-known/oauth-protected-resource.

In: header

Scope: kb:read

Query Parameters

query*string
Lengthlength <= 2000
limit?integer
Range1 <= value <= 20
Default5

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/agent/kb/search?query=string"
{  "results": [    {      "question": "string",      "answer": "string",      "score": 0    }  ]}
{  "error": {    "message": "string",    "code": "rate_limited"  }}
{  "error": {    "message": "string",    "code": "rate_limited"  }}
{  "error": {    "message": "string",    "code": "rate_limited"  }}
{  "error": {    "message": "string",    "code": "rate_limited"  }}