Skip to main content
Roles define custom system prompts that shape how Claude agents behave when working on tasks. A role can be assigned to individual tasks to customize agent behavior.

List Roles

invoke('get_roles', { projectId: 1 })
Returns all roles for a project.
[
  {
    "id": 1,
    "projectId": 1,
    "name": "Backend Developer",
    "systemPrompt": "You are a senior backend developer...",
    "isGlobal": false,
    "createdAt": "2025-01-15T10:00:00Z"
  }
]

List Global Roles

invoke('get_global_roles')
Returns all roles not tied to a specific project. Global roles are available across all projects.

Create Role

invoke('create_role', {
  projectId: 1,
  name: "Backend Developer",
  systemPrompt: "You are a senior backend developer specializing in Rust and TypeScript...",
  isGlobal: false
})
FieldRequiredDefaultDescription
projectIdYesProject to associate the role with
nameYesRole display name
systemPromptYesSystem prompt injected into Claude’s context
isGlobalNofalseMake role available across all projects

Update Role

invoke('update_role', {
  id: 1,
  name: "Senior Backend Developer",
  systemPrompt: "Updated system prompt...",
  isGlobal: false
})
Accepts the same fields as Create. All fields are required on update.

Delete Role

invoke('delete_role', { id: 1 })
Deleting a role does not affect tasks that were previously assigned to it. Those tasks will continue to work without a role-specific system prompt.