Change an agent's name, description, instructions, context, welcome
message, sample tasks or model.
Send only the fields you want to change; everything else stays as it is.
Changes take effect for everyone using the agent right away. Sending
values the agent already has changes nothing.
API key: updating needs a key that acts as a user who can edit the
agent in elvex.
Avoiding lost updates: read the agent first and send its ETag
header back as If-Match:
GET /v0/agents/2qHnV8xWcT5rLm3KpZ9dYb7FsJe
→ ETag: "5d41402abc4b2a76b9719d911017c592"
PATCH /v0/agents/2qHnV8xWcT5rLm3KpZ9dYb7FsJe
If-Match: "5d41402abc4b2a76b9719d911017c592"
{"instructions": "Answer in the newsroom's style guide."}
If someone changed the agent in between, you get 412 and nothing is
saved. The response carries the new ETag for your next update.
Model: pick a model id from GET /v0/models. temperature goes
up to 1, or 2 for Google models; a higher value is refused with 422. It
is ignored, not refused, for models that don't take one, and a
temperature too high for a newly chosen model is cleared; the response
then shows temperature: null.
Sharing, Slack, Teams, integrations and data sources can't be changed
through the API. Besides plan limits, 403 means the key doesn't act as a
user, that user can't edit this agent, or your company's model access
list blocks the model for them.
Responses
422
Invalid fields, unknown fields, or a model your company's providers don't serve
Updated 4 days ago
Did this page help you?
Yes
No
Language
ShellNodeRubyPHPPython
Credentials
Bearer
Bearer
Loading…
Response
Click Try It! to start a request and see the response here! Or choose an example: