Update an agent
PATCH/agents/:agent_id
Changes the fields of an agent that the request names, and keeps the stored value of every omitted field. prompt, placeholders and metadata replace the stored values whole, and description accepts null to clear the description. Foundation4 validates the resulting prompt template and placeholders with the rules of agent creation, including stored values that the request leaves unchanged.
Permissions. Write on the agent.
Agents and prompt templates describes prompt templates and placeholders.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
The agent was updated. The body is the updated agent.
The resulting prompt template or a placeholder breaks a validation rule of agent creation (Invalid prompt type, Invalid prompt, Invalid parameter or Invalid placeholder <name>), with the reason in details.error. The same status reports a body that is not valid JSON.
The authentication headers are missing or invalid, or the API key is inactive or expired. Errors lists the messages.
The license is not valid (Invalid license: <reason>).
No agent with this identifier exists, or the key lacks write permission on the agent (Agent not found, with the identifier in details.id).
Another agent already has the requested name (Conflict unique error).
The body does not match the request schema, for example a value of the wrong type or an unknown field.