Skip to main content

Create an agent

POST 

/agents

Creates an agent from a prompt template and the placeholders that the template uses. Foundation4 validates the definition before storing the agent: the prompt contains at least one system message and one user message, the last message is a user message, every name in braces is a placeholder of the agent, no two placeholders share a name, every retrieval placeholder has a target that names a query placeholder, the search parameters are valid, and no placeholder names a search index in index or indexes. Agent executions run query, similarity, mmr, search, hybrid and history placeholders on the default search indexes of the pipeline of each request.

Permissions. Write on the agent object type (agents). The key that creates the agent receives read, write and execute permission on the new agent.

Agents and prompt templates describes prompt templates and placeholders.

Request​

Responses​

The agent was created. The body is the new agent, including the generated id, the include value of each message and every parameter of each retrieval placeholder.