Agent Personas
Purpose and Scope
Agent Personas define the personality, behavior, and voice of AI agents in the Automatos AI platform. A persona consists of a system prompt, voice description, suggested model parameters, and categorization metadata that shapes how an agent communicates and approaches tasks.
This document covers:
The
Personadatabase model and its fieldsGlobal (platform-wide) vs workspace-custom persona scopes
How agents are assigned personas during creation
Persona resolution during runtime context assembly
API endpoints for persona CRUD operations
For information about creating and configuring agents, see Creating Agents. For details on how personas integrate with plugins and tools during context assembly, see Agent Context Assembly.
Sources: orchestrator/core/models/personas.py:1-48, orchestrator/api/personas.py:1-10
Persona Data Model
The Persona model is defined in the personas table and represents both predefined (global) and workspace-specific personality profiles.
Key Fields
slug
String(100)
Unique URL-safe identifier, used in API references
name
String(255)
Human-readable display name
system_prompt
Text
The core instruction text injected into agent context
voice_description
String(500)
Describes the persona's communication style
category
String(100)
Organizational grouping (e.g., "Engineering", "Sales")
suggested_temperature
Float
Recommended sampling temperature (0.0-2.0)
scope
String(20)
Either "global" (platform-wide) or "workspace" (custom)
workspace_id
UUID
Foreign key to workspaces table, null for global personas
Sources: orchestrator/core/models/personas.py:22-48
Persona Scopes: Global vs Workspace
Personas exist in two scopes:
Global Personas
Scope:
"global"Workspace ID:
nullVisibility: Available to all workspaces
Source: Seeded at database initialization from predefined templates
Management: Platform administrators only
Examples: "Senior Engineer", "Sales Development Representative", "DevOps / SRE Engineer"
Workspace Personas
Scope:
"workspace"Workspace ID: Set to the owning workspace UUID
Visibility: Only visible to users within that workspace
Source: Created by workspace members via API
Management: Workspace members with appropriate permissions
Use Case: Custom personalities tailored to team-specific needs
Scope Filtering Query
When listing personas, the API filters based on the requesting user's workspace context:
Sources: orchestrator/api/personas.py:165-205, orchestrator/core/models/personas.py:43-44
Predefined Personas
The platform ships with 8 predefined global personas seeded during database initialization. These are loaded by the seed_personas function.
Example: Senior Engineer Persona
Seeding Process
The seed_personas function in load_seed_data.py performs idempotent upserts:
For each predefined persona definition, query by
slugIf exists, update fields if changed (name, description, system_prompt, etc.)
If not exists, insert new record
Log counts: created, updated, unchanged
Sources: orchestrator/core/seeds/seed_personas.py:19-140, orchestrator/core/database/load_seed_data.py:146-156
Agent-Persona Assignment
Agents store persona assignment through three fields on the agents table:
persona_id
UUID (FK)
Reference to a personas record
custom_persona_prompt
Text
Freeform custom system prompt
use_custom_persona
Boolean
Flag to use custom prompt instead of persona_id
Three Persona Modes
The platform supports three distinct persona modes, implemented both in the frontend and backend:
Title: Persona Mode State Machine
Mode 1: No Persona (personaMode = 'none')
persona_idisnulluse_custom_personaisfalsecustom_persona_promptis empty or nullAgent has no persona-based system prompt, relies only on plugins/tools
Used for purely functional agents without personality
Mode 2: Predefined Persona (personaMode = 'predefined')
persona_idis set to a valid persona UUIDuse_custom_personaisfalseSystem uses the referenced persona's
system_promptInherits
suggested_temperaturefrom the persona recordUI shows persona name, category, and voice description
Mode 3: Custom Prompt (personaMode = 'custom')
custom_persona_promptcontains freeform textuse_custom_personaistrueSystem ignores
persona_idand uses the custom promptUser has full control over the agent's personality
Can be pre-filled by switching from predefined mode
Frontend Persona Selection Flow
Title: Frontend Persona Mode Selection in CreateAgentModal
Assignment via API
The /api/agents/{agent_id}/persona endpoint allows setting or updating an agent's persona:
Predefined Persona Assignment:
Custom Prompt Assignment:
Clear Persona (No Persona Mode):
Frontend Implementation Details
The persona selection UI is implemented in two key locations:
1. Agent Creation Wizard (CreateAgentModal component)
Step 2 of 5-step wizard
Three-card layout for mode selection (none/predefined/custom)
Auto-filters personas by agent category from Step 1
Pre-fills custom prompt when switching from predefined mode
2. Agent Configuration Modal (AgentConfigurationModal component)
"Persona" tab in agent settings
Shows current persona name and prompt
Allows switching between modes
Saves immediately via
handleSavePersonafunction
Sources: frontend/components/agents/create-agent-modal.tsx:89-329, frontend/components/agents/agent-configuration-modal.tsx:123-447, orchestrator/api/personas.py:316-381
Persona Resolution in Context Assembly
During runtime, when an agent executes a task, the system assembles its full context including the persona's system prompt. This occurs in the get_assembled_context endpoint at /api/agents/{agent_id}/assembled-context.
Title: Runtime Context Assembly with Persona Resolution
Context Assembly Logic
The persona resolution logic prioritizes custom prompts over predefined personas, with fallback to no-persona mode. This is implemented in the get_assembled_context endpoint:
Temperature Override Behavior
When a predefined persona is used, the persona's suggested_temperature overrides the agent's model configuration:
Persona suggested_temperature
1 (Highest)
0.5 (Senior Engineer persona)
Agent model_config.temperature
2
0.7 (default from model selector)
System default
3 (Fallback)
0.7 (hardcoded)
This allows persona designers to specify optimal sampling parameters for each personality type. For example:
Senior Engineer persona:
suggested_temperature = 0.5(more deterministic, code-focused)Content Strategist persona:
suggested_temperature = 0.9(more creative, varied output)
Sources: orchestrator/api/agent_plugins.py:240-288
Output Structure
The AssembledContextOut response provides the complete runtime context for the agent, including resolved persona details:
Field Descriptions:
agent_id
Integer
Unique agent identifier
model
String
Resolved LLM model ID (from model_config.model_id)
temperature
Float
Final sampling temperature (persona override applied)
system_prompt
String
Complete assembled system prompt (persona + plugins)
persona
Object
Persona metadata (null if no persona assigned)
persona.name
String
Display name of the persona
persona.slug
String
URL-safe identifier for the persona
persona.category
String
Persona category (e.g., "Engineering")
persona.voice_description
String
Communication style description
plugins_loaded
Array[String]
List of plugin slugs included in context
tools
Array[Object]
Composio tools available to the agent
token_estimate
Integer
Estimated token count for the full system_prompt
Usage Example:
Frontend components use this endpoint to display the agent's current configuration and preview the assembled context before execution:
Sources: orchestrator/api/agent_plugins.py:211-337
Persona API Endpoints
The Personas API provides REST endpoints under the /api/personas prefix for listing, retrieving, and managing personas.
Endpoint Reference
GET
/api/personas
Required
List global + workspace personas (filtered by user's workspace)
GET
/api/personas/{persona_id}
Required
Get full persona details including system_prompt
GET
/api/personas/categories
Required
List available persona categories
POST
/api/workspaces/{workspace_id}/personas
Required
Create custom workspace persona
PUT
/api/workspaces/{workspace_id}/personas/{persona_id}
Required
Update custom workspace persona
DELETE
/api/workspaces/{workspace_id}/personas/{persona_id}
Required
Deactivate custom workspace persona
GET
/api/agents/{agent_id}/persona
Required
Get agent's current persona assignment
PUT
/api/agents/{agent_id}/persona
Required
Set/update agent's persona
List Personas Query Parameters
category
String
Filter by category (e.g., "Engineering", "Sales")
scope
String
Filter by scope: "all", "global", "workspace"
Example Request:
Example Response:
Sources: orchestrator/api/personas.py:165-211, orchestrator/api/personas.py:214-242
Creating Custom Personas
Workspace members can create custom personas tailored to their team's needs.
Creation Flow
Request Body Schema
Slug Generation
The _slugify helper function converts the persona name into a URL-safe slug:
Convert to lowercase
Remove non-alphanumeric characters (except spaces and hyphens)
Replace spaces/multiple hyphens with single hyphen
Truncate to 100 characters
If slug already exists, append 8-character UUID segment
Example: "Custom Backend Specialist" → "custom-backend-specialist" or "custom-backend-specialist-a3f8c921"
Validation Rules
name
Required, 1-255 characters
voice_description
Optional, max 500 characters
category
Optional, max 100 characters
suggested_temperature
Optional, 0.0 - 2.0 range
system_prompt
Optional, no length limit (Text type)
workspace_id
Must match authenticated user's workspace
Sources: orchestrator/api/personas.py:245-307, orchestrator/api/personas.py:114-120
Integration with Agent Creation Wizard
The 5-step agent creation wizard (CreateAgentModal component) implements persona selection at Step 2: Persona, with automatic category filtering and smart pre-filling.
Title: Agent Creation Wizard Data Flow
Category-Based Persona Filtering
When the user selects an agent category in Step 1 (e.g., "Engineering", "Sales"), Step 2 automatically filters the persona list to show only relevant personas:
This reduces cognitive load by showing only contextually relevant personas. For example:
Category: Engineering → Shows "Senior Engineer", "Code Reviewer", "DevOps / SRE Engineer"
Category: Sales → Shows "Sales Development Representative", "Account Executive", "Customer Success Manager"
Category: Custom → Shows all personas
Pre-Fill Behavior
When switching from predefined to custom mode, the UI pre-fills the custom prompt textarea with the selected persona's system_prompt:
This allows users to start with a proven template and customize it to their needs.
Persona Assignment in Agent Creation
The handleCreate function orchestrates multiple API calls to set up the agent:
UI Components
The persona selection UI presents:
Three-card mode selector
No Persona card (Bot icon)
Predefined card (User icon)
Custom card (PenLine icon)
Persona browser (predefined mode)
Scrollable list of filtered personas
Expandable system prompt previews (ChevronDown/ChevronUp)
Badge showing persona category
Temperature display
Custom prompt editor (custom mode)
Textarea with placeholder text
Character count
Tip about pre-filling from predefined
Sources: frontend/components/agents/create-agent-modal.tsx:184-338, frontend/components/agents/create-agent-modal.tsx:528-696
Sources Summary
Core Models:
orchestrator/core/models/personas.py:1-48 - Persona ORM model definition
orchestrator/core/models/init.py:21 - Model import
Seeding:
orchestrator/core/seeds/seed_personas.py:1-214 - Predefined persona definitions
orchestrator/core/database/load_seed_data.py:146-156 - Persona seeding invocation
API Endpoints:
orchestrator/api/personas.py:1-381 - Complete Personas API router
orchestrator/api/agent_plugins.py:211-337 - Context assembly with persona resolution
orchestrator/api/agents.py:359-428 - Agent creation with persona assignment
Main Application:
orchestrator/main.py:83 - Personas router registration
Last updated

