Breaking Change: The
brainType parameter has been deprecated and replaced with llmId to support custom language models. For backwards compatibility, you can still pass your existing brainType value as llmId. See our Custom LLMs guide for more details.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: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: llmId and systemPrompt
The AI model and instructions that define how your persona thinks, responds, and behaves during conversations.
Making Your Personas Smarter
While thellmId and systemPrompt define the foundation of your persona’s intelligence, you can make your personas significantly smarter and more capable by:
- Adding a Knowledge Base: Give your persona access to your company’s documents, FAQs, and resources so it can provide accurate, contextual information drawn from your specific content.
- Implementing Tool Calling: Enable your persona to take actions and access real-time data by connecting it to external systems, databases, and APIs. This allows your persona to look up information, perform operations, and interact with your business systems dynamically.
Combining a well-crafted system prompt with knowledge bases and tool calling creates personas that are not only conversational but also deeply integrated with your business operations and information systems.
Available LLM IDs
Choose the LLM ID that best fits your use case and performance requirements:- GPT-4.1 Mini
- Custom LLM
Best for: Most applicationsA fast, cost-effective brain powered by GPT-4.1 Mini. Offers excellent performance for conversational AI with quick response times and reasonable costs.
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:1
Configuration
You define the persona’s appearance, voice, and personality in the persona configuration object
2
Session Token Creation
Your server uses your API key to exchange your persona configuration for a secure session token
3
Initialization
The client uses the session token to initialize the persona and start the session
4
Conversation
Real-time back-and-forth communication begins between the persona and the user
5
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
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.
- 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 optionalmaxSessionLengthSeconds parameter in your persona configuration. This is useful for managing costs, ensuring security, or creating time-limited experiences.
How Session Duration Works
When you setmaxSessionLengthSeconds, 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 (or 2 hours for Enterprise plans).Common Use Cases
Customer Support (10-30 minutes)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

