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 and filters fields of an agent execution. 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.
Agents and prompt templates describes retrieval placeholders, and Filter operators describes the filter language.
Request
Responses
- 200
- 400
- 401
- 404
- 500
An object that maps the name of each retrieval placeholder to the fragments that the placeholder retrieved, in ascending order of distance. query placeholders do not appear.
The x-pipeline-id header is missing (plain text Header of type `x-pipeline-id` was missing) or is not a valid identifier (Invalid pipeline ID), or a placeholder cannot run (Invalid parameter). details.error holds the reason, such as Missing parameter '<name>' when prompt lacks the value that a retrieval placeholder targets.
The authentication headers are missing or invalid, or the API key is inactive or expired. Errors lists the messages.
The agent does not exist or the key lacks execute permission on the agent (Agent not found), the pipeline does not exist or the key lacks execute permission on the pipeline (Pipeline not found), or a placeholder names an embedding model outside the pipeline (Embedding Model with id <id> not found).
Retrieval failed (Internal error). details.error holds the cause, such as a failure of the embedding model or an invalid filter.