Skip to main content
POST
Search Agent Knowledge Base

Example: Search with Text

Example: Search with a Vector

Use searchQuery for most requests. The API will create the embedding for you and search the agent KB automatically.
Results are chunk-level matches, so a single source document may appear multiple times if several chunks are relevant.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agentId
string
required

Body

application/json
vector
number[]
searchQuery
string
Minimum string length: 1
vectorDb
enum<string>
default:postgres
Available options:
firebase,
postgres
defaultDimension
integer
default:1536
Required range: x > 0
max_chunks
integer
default:5
Required range: 1 <= x <= 100
similarity_threshold
number
default:0
Required range: 0 <= x <= 1
with_payload
boolean
default:true
with_vector
boolean
default:false

Response

Successful response

success
boolean
required
message
string
required
data
object[]
required