Request Body
The agent’s public ID (ag_*)
The search query (natural language question)
Number of most relevant chunks to return (1–20)
Response 200
Response Fields
Ranked list of matching chunks
The text content of the chunk
Name of the knowledge source
Source type (text, url, file, etc.)
Cosine similarity (0.0–1.0). Higher = more relevant
Position of this chunk within its source
The original search query
Number of results returned
Use Cases
- Debug retrieval quality: Verify that the right content is being found for specific questions
- Tune chunk size: Check if chunks are too large (low relevance) or too small (missing context)
- Validate knowledge: Confirm that newly added sources are indexed and retrievable

