v1
latestOpenAPI 3.0.02026-08-04891301.4 MBSearch an agent's knowledge base
Performs a semantic search over an agent's knowledge base and returns a ranked, kind-discriminated list of matching items.
Two item kinds may appear in data:
- "chunk" — chunk-level results from the agent's context store. Present for all agents.
- "document" — document-level results. Present only when the agent has an active archastro/knowledge installation.
Results from both kinds are scored with Reciprocal Rank Fusion (RRF), normalized to be comparable across kinds, then merged into a single ranked list. On a relevance tie, chunks appear before documents. The total number of results is capped at max_results across both kinds.
Use mode to choose the retrieval strategy: "hybrid" (default) combines vector and full-text search; "vector" and "fulltext" select each strategy independently.
post/api/v1/agents/{agent}/search
Path parameters
agentstring required
ID (agi_...) or lookup_key of the agent whose knowledge base to search.
Request body
Example request
{
"max_results": 1,
"mode": "string",
"query": "string",
"recency_days": 1,
"source_types": [
"string"
]
}Response
Successful response
Example response
{
"data": []
}