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
- 201
- 400
- 401
- 403
- 409
- 501
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.
The prompt template or a placeholder breaks a validation rule (Invalid prompt type, Invalid prompt or Invalid placeholder of type <placeholder>).
The authentication headers are missing or invalid, or the API key is inactive or expired. Errors lists the messages.
The key lacks write permission on the agents object type (Unauthorized: access level ... required for Agent ...), the license is not valid (Invalid license: <reason>) or the license limit for agents is reached (License limits exceeded for Agent).
Another agent already has this name (Conflict unique error).
A placeholder has the type hybrid or history, which agents do not implement (Not implemented).