Update an agent role
const url = 'https://your-org.evershell.ai/v1/agent-roles/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"display_name":"example","description":"example","provider_id":"example","model":"example","capabilities":"example","environment":"development","environment_description":"example","task_timeout_seconds":1,"idle_timeout_seconds":1,"thinking_effort":"high","max_continuations":1,"max_context_tokens":1,"pool_policy":"","pool_size":1,"pool_max_size":1,"pack_ids":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://your-org.evershell.ai/v1/agent-roles/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "display_name": "example", "description": "example", "provider_id": "example", "model": "example", "capabilities": "example", "environment": "development", "environment_description": "example", "task_timeout_seconds": 1, "idle_timeout_seconds": 1, "thinking_effort": "high", "max_continuations": 1, "max_context_tokens": 1, "pool_policy": "", "pool_size": 1, "pool_max_size": 1, "pack_ids": [ "example" ] }'Permissions: caps:write.
Body is a partial — only the present fields are applied.
pack_ids replaces the full list when supplied; omit to
leave attachments alone.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
Responses
Section titled “ Responses ”OK
object
Optional override for provider’s default_model
Free-text description of what the environment is — surfaced to the agent at task time so it knows what it’s running against.
Example
{ "environment": "development", "thinking_effort": "high", "pool_policy": ""}Validation failure
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}Resource not found in the caller’s org
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}Role is archived (role_archived) — unarchive before editing.
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}Tenant is past_due, decommissioning, or trial-expired
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}