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 and every retrieval placeholder targets a query placeholder. Agent executions run query, similarity and mmr placeholders.

Permissions. Write on the agent object type (agents).

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.