← Back to Dashboard

Agent Roles

Create and manage agent role templates that appear in the Create Agent wizard — defining personality, skills, tone, and expertise for each agent type.

Table of Contents

Overview

For everyone: The Roles page manages the role templates that appear when creating a new AI agent. Each role template is like a job description — it defines who the agent is, how it communicates, what tools it uses, and what it's an expert in. When you select a role in the Create Agent wizard, all of this gets auto-configured, saving you from building each agent from scratch.

For technical users: Role templates are stored in two places: 51 built-in templates in soul-templates.json and custom templates in the custom_roles database table (migration v32). Custom roles can be org-scoped via org_id. The /souls/by-category API merges both sources, so custom roles appear alongside built-in ones in the Create Agent wizard. Each template contains a full SOUL.md personality prompt, identity metadata (role title, tone, language), suggested skills, and tags for search.

How It Works

  1. Admin creates a role template via the Roles page — defining name, category, personality, skills, and tone.
  2. Template appears in Create Agent wizard — Step 1 "Choose a Role Template" shows all built-in and custom templates grouped by category.
  3. User selects the role — the wizard auto-fills the agent's personality (SOUL.md), job title, communication tone, suggested skills, and permission preset.
  4. User customizes — all auto-filled fields can be edited before creating the agent.

Custom role templates are merged with built-in templates in real-time. When the wizard loads, it queries /api/engine/souls/by-category which returns both sources combined.

Key Concepts

ConceptDescription
Role TemplateA complete agent identity definition — personality, skills, tone, tags. Used as a starting point when creating new agents.
CategoryOne of 14 departments: Support, Sales, Engineering, Operations, HR, Finance, Marketing, Legal, Research, Creative, Executive, Data, Security, Education.
PersonalityThe full SOUL.md prompt that defines the agent's identity, approach, communication style, expertise, principles, and boundaries. This is the core of what makes each role unique.
IdentityMetadata: job title (e.g., "Customer Support Lead"), tone (formal/casual/professional/friendly), and language code.
Suggested SkillsTools auto-enabled when this role is selected — like agenticmail, web-search, memory, etc.
Suggested PresetPermission preset auto-applied when this role is selected (e.g., "Customer Support Agent").
TagsSearchable keywords (e.g., "support", "triage", "sla", "empathy") that help users find the right role.

Built-in Roles

AgenticMail ships with 51 built-in role templates across 14 categories. These cover common enterprise agent roles from Customer Support Lead to Security Operations Analyst. Built-in roles:

Creating Custom Roles

Click "Create Role" to open the role form with four tabs:

General Tab

Personality Tab

A large text editor for the full SOUL.md personality prompt. Aim for 500+ characters for a well-defined role. See Personality section.

Skills & Preset Tab

Select skills from the full catalog and optionally set a permission preset. See Skills section.

Preview Tab

See exactly how the role will appear in the Create Agent wizard — the "resume card" with badges, skills, and personality excerpt.

Personality / SOUL.md

The personality is the most important part of a role template. It's a comprehensive prompt (typically 1000-5000 characters) that uses Markdown headings to define sections:

# Role Name

## Identity
You are the... (who this agent is, their core mission)

## Approach
You... (how they work, their methodology)

## Mental Models
... (frameworks they use to think about problems)

## Decision Framework
... (how they prioritize and make decisions)

## Communication Style
... (how they write, their tone in practice)

## Expertise
... (comma-separated areas of knowledge)

## Principles
- ... (operating rules they follow)

## Boundaries
- ... (what they won't do, limitations)

The Create Agent wizard parses these sections to display a rich "resume card" preview when the role is selected.

Skills & Presets

Each role template can suggest:

These are suggestions — users can always modify skills and permissions after selecting the role template.

Organization Scoping

Custom roles can be scoped to control who sees them:

Use org-scoping when different clients need different agent templates. For example, a law firm client might need a "Legal Intake Specialist" role that isn't relevant to your other clients.

The org switcher in the Roles page header lets you filter custom roles by organization.

Role Preview

The Preview tab shows the exact "resume card" that appears in the Create Agent wizard when a user selects this role. It includes:

Use this preview to verify the role looks polished before saving.

Best Practices

Troubleshooting

IssueSolution
Custom role doesn't appear in Create Agent wizardCheck that the role is active and either global or scoped to the user's org. The wizard calls /api/engine/souls/by-category which merges both sources.
Role preview looks emptyEnsure the personality field has content. The preview card is built from the personality text.
"Role with this name already exists"Slug must be unique within the same org scope. Use a different name or different org.
Skills list is empty in the formSkills are loaded from /api/engine/skills/by-category. Ensure the engine is running and skills are registered.
Built-in role can't be editedBy design. Use the "Duplicate" button to create an editable copy.
AgenticMail Enterprise Documentation Report an issue