Create an agent role
const url = 'https://your-org.evershell.ai/v1/agent-roles';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":"example","org_id":"example","name":"example","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"],"created_at":"2026-04-15T12:00:00Z","updated_at":"2026-04-15T12:00:00Z","archived_at":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-org.evershell.ai/v1/agent-roles \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": "example", "org_id": "example", "name": "example", "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" ], "created_at": "2026-04-15T12:00:00Z", "updated_at": "2026-04-15T12:00:00Z", "archived_at": "2026-04-15T12:00:00Z" }'Permissions: caps:write.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”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.
Responses
Section titled “ Responses ”Created
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" }}Provider is archived (provider_archived) — unarchive it before creating roles that reference it.
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" }}