Understanding Personas
Learn how AI personas work and how to customize them
A persona in Anam is an AI-powered digital human that can have natural, real-time conversations with your users. Think of it as a customizable avatar with a brain, voice, and personality.
The Persona Configuration
Every persona is defined by a configuration object that brings together three essential components. Here’s what a complete persona config looks like:
This single configuration object defines everything about your persona - how they look, sound, and behave. Let’s break down each component and how it maps to the configuration.
Anatomy of a Persona
1. Persona Name
Config field: name
The name of your persona. This is optional but recommended for internal organization and debugging. It doesn’t affect how the persona behaves, but helps you identify different personas in logs and analytics.
2. Avatar (Visual Appearance)
Config field: avatarId
The face and expressions users see. You can choose from our gallery or create custom avatars using our one-shot avatar generator (enterprise only).
3. Voice (How They Sound)
Config field: voiceId
The speech synthesis that brings your persona to life. Different voices convey different personalities and work better for different use cases. You can sample some of the available voices in our voice gallery.
4. Brain (Intelligence & Personality)
Config fields: brainType
and systemPrompt
The AI model and instructions that define how your persona thinks, responds, and behaves during conversations.
Available Brain Types
Choose the brain type that best fits your use case and performance requirements:
Best for: Most applications
A fast, cost-effective brain powered by GPT-4o Mini. Offers excellent performance for conversational AI with quick response times and reasonable costs.
Best for: Most applications
A fast, cost-effective brain powered by GPT-4o Mini. Offers excellent performance for conversational AI with quick response times and reasonable costs.
Best for: Complex reasoning
A powerful brain using Llama 3.3 70B for applications requiring advanced reasoning capabilities and nuanced conversations.
Coming Soon
Integration with OpenAI’s Advanced Voice Mode for ultra-realistic voice interactions.
This brain type is not yet available. Use ANAM_GPT_4O_MINI_V1
for similar capabilities.
Best for: Custom AI integration
Disables Anam’s built-in AI brains, allowing you to integrate your own AI models and processing logic.
When using CUSTOMER_CLIENT_V1
, you’ll handle AI responses through your own backend and use Anam purely for avatar rendering and voice synthesis. See the custom LLM guide for more information.
Experimenting with configurations
The easiest way to experiment with the available avatars, voices, and brain options is to use the playground in the Anam Lab. From the build page, you can use the settings menu to change the available options and preview over 400 available voices. When you’re happy with your configuration, you can copy the avatar ID and voice ID from the settings bar to use in your own application.
Persona Lifecycle
Understanding how personas work helps you build better experiences:
Configuration
You define the persona’s appearance, voice, and personality in the persona configuration object
Session Token Creation
Your server uses your API key to exchange your persona configuration for a secure session token
Initialization
The client uses the session token to initialize the persona and start the session
Conversation
Real-time back-and-forth communication begins between the persona and the user
Session End
The conversation concludes and the session is cleaned up
Creating Effective Personas
Creating an effective persona requires thoughtful design across multiple dimensions. When you create a persona, the system prompt you choose defines how the persona will respond to your users. Focus on crafting a well-defined identity, personality, and communication style.
Defining Core Identity
Your persona’s identity is the foundation of its interactions. Start by clearly establishing:
- Specific role: What function will your persona fulfil (customer support, sales assistant, product specialist, etc.)
- Areas of expertise: Knowledge relevant to your business and users
- Interaction scope: Types of conversations it should handle
- Clear boundaries: Capabilities and limitations to prevent confusion
System Prompts That Work
Your system prompt is crucial - it defines your persona’s personality and behavior.
Personality and Communication Style
The way your persona communicates is just as important as what it communicates. Consider:
- Tone of voice: Professional, friendly, casual, or authoritative
- Communication style: Concise vs detailed, formal vs informal
- User addressing: How it should greet and interact with users
- Cultural sensitivity: Adaptability to different user backgrounds
Your persona should maintain consistency while adapting to user needs. For example:
Handling Different Scenarios
Guide your persona on how to handle various situations:
When Facing Uncertainty
For Complex Requests
Response Structure Guidelines
Testing and Refinement
Personas can be sensitive to even small changes in the system prompt. If your persona isn’t performing as expected, try small incremental changes rather than major overhauls.
Iterative improvement process:
- Start simple: Begin with basic functionality and expand gradually
- Use example interactions: Include specific examples in your system prompt
- Monitor performance: Track how well the persona handles real conversations
- Collect feedback: Gather input from users and team members
- Make incremental adjustments: Small changes often yield better results than major rewrites
Controlling session duration
You can control how long a persona session remains active by setting the optional maxSessionLengthSeconds
parameter in your persona configuration. This is useful for managing costs, ensuring security, or creating time-limited experiences.
How Session Duration Works
When you set maxSessionLengthSeconds
, the session will automatically end after the specified time limit, regardless of whether the conversation is ongoing. The countdown begins when the persona starts streaming.
If you don’t specify maxSessionLengthSeconds
, the session will continue until manually ended or until it reaches the maximum session length limit of 30 minutes.
Common Use Cases
Customer Support (10-30 minutes)
Allows enough time for complex support issues while preventing sessions from running indefinitely.
Product Demos (5-15 minutes)
Perfect for showcasing key features without overwhelming prospects with lengthy demonstrations.
Trial Experiences (2-5 minutes)
Gives users a taste of your persona’s capabilities while encouraging them to sign up for full access.
Best Practices
Set session durations based on your specific use case. Consider the typical length of conversations in your domain and add a buffer for natural conclusion.
- Factor in conversation flow: Allow enough time for natural conversation completion
- Consider user experience: Abrupt session endings can frustrate users, so consider displaying a countdown timer to the user
- Monitor usage patterns: Track actual session lengths to optimize your limits
- Communicate limits: Let users know when sessions are time-limited
Example: Building a Sales Assistant
Here’s how to create a persona optimized for sales conversations using the recommended system prompt structure: