Skip to main content

Run an agent retrieval dry run

POST 

/agents/:agent_id/search

Runs the retrieval placeholders of an agent against the pipeline named in the x-pipeline-id header, without calling an LLM, and returns the fragments that each retrieval placeholder retrieves. The body takes the prompt, classification, path and filters fields of an agent execution. Each placeholder searches the default index of its kind in the pipeline, or, for a similarity or mmr placeholder with embedding, the vector index of that embedding model. A request without path covers only the documents without a path. A client application uses the dry run to test the placeholders, filters and classifications of an agent.

Permissions. Execute on the agent and on the pipeline, and a classification allow-list that covers every classification that the request names.

Agents and prompt templates describes retrieval placeholders, and Filter operators describes the filter language.

Request​

Responses​

An object that maps the name of each retrieval placeholder to the fragments that the placeholder retrieved, in the order of the placeholder's search type. query placeholders do not appear.