Create and manage agent role templates that appear in the Create Agent wizard — defining personality, skills, tone, and expertise for each agent type.
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.
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.
| Concept | Description |
|---|---|
| Role Template | A complete agent identity definition — personality, skills, tone, tags. Used as a starting point when creating new agents. |
| Category | One of 14 departments: Support, Sales, Engineering, Operations, HR, Finance, Marketing, Legal, Research, Creative, Executive, Data, Security, Education. |
| Personality | The 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. |
| Identity | Metadata: job title (e.g., "Customer Support Lead"), tone (formal/casual/professional/friendly), and language code. |
| Suggested Skills | Tools auto-enabled when this role is selected — like agenticmail, web-search, memory, etc. |
| Suggested Preset | Permission preset auto-applied when this role is selected (e.g., "Customer Support Agent"). |
| Tags | Searchable keywords (e.g., "support", "triage", "sla", "empathy") that help users find the right role. |
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:
Click "Create Role" to open the role form with four tabs:
A large text editor for the full SOUL.md personality prompt. Aim for 500+ characters for a well-defined role. See Personality section.
Select skills from the full catalog and optionally set a permission preset. See Skills section.
See exactly how the role will appear in the Create Agent wizard — the "resume card" with badges, skills, and personality excerpt.
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.
Each role template can suggest:
agenticmail, web-search, web-fetch, memory, summarize.These are suggestions — users can always modify skills and permissions after selecting the role template.
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.
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.
| Issue | Solution |
|---|---|
| Custom role doesn't appear in Create Agent wizard | Check 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 empty | Ensure 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 form | Skills are loaded from /api/engine/skills/by-category. Ensure the engine is running and skills are registered. |
| Built-in role can't be edited | By design. Use the "Duplicate" button to create an editable copy. |