MeetingBaasMeeting Baas

Personas System

AI meeting participants with distinct personalities

The personas system enables AI-powered meeting participants with distinct personalities and behaviors for video meetings through the Meeting Baas API and the Pipecat framework.

Directory Structure

README.md
Core persona definition and behavior
Content.md
Knowledge and contextual information
Rules.md
Interaction and behavior guidelines
persona_types.py
Type definitions and data structures
persona_utils.py
Helper functions and persona management
migrate_personas.py
Tools for updating persona configurations

Core Components

PersonaData Class

from dataclasses import dataclass, field
from enum import Enum
from typing import List, Optional
 
__all__ = ["Gender", "PersonaData"]
 
class Gender(str, Enum):
    MALE = "MALE"
    FEMALE = "FEMALE"
    NON_BINARY = "NON-BINARY"
 
@dataclass
class PersonaData:
    """Core data structure for persona information"""
    name: str
    prompt: str
    additional_context: str = ""
    entry_message: str = ""
    characteristics: List[str] = field(default_factory=list)
    tone_of_voice: List[str] = field(default_factory=list)
    skin_tone: Optional[str] = None
    gender: Optional[Gender] = None
    relevant_links: List[str] = field(default_factory=list)
    language_code: str = "en-US"
    image: Optional[str] = None
    cartesia_voice_id: str = ""
 
    def to_dict(self) -> dict:
        # Implementation not shown
        pass

PersonaManager

class PersonaManager:
    def __init__(self, personas_dir: Optional[Path] = None):
        """Initialize PersonaManager with optional custom personas directory"""
        self.personas_dir = personas_dir or Path(__file__).parent / "personas"
        self.md = markdown.Markdown(extensions=["meta"])
        self.personas = self.load_personas()
 
    def parse_readme(self, content: str) -> Dict:
        """Parse README.md content to extract persona information"""
        # Reset markdown instance for new content
        self.md.reset()
        html = self.md.convert(content)
        # Split content by sections
        sections = content.split("\n## ")
        # Get name from first line (# Title)
        name = sections[0].split("\n", 1)[0].replace("# ", "").strip()
        # Get prompt (first paragraph after title)
        prompt = sections[0].split("\n\n", 1)[1].strip()

Environment Setup

# Core Voice Functionality
CARTESIA_API_KEY=xxx        # For voice synthesis
CARTESIA_VOICE_ID=xxx       # Default voice ID
 
# Image Generation
REPLICATE_KEY=xxx          # For persona image generation
UTFS_KEY=xxx              # For image storage
APP_ID=xxx                # For image management
 
# AI Integration
OPENAI_API_KEY=xxx        # For persona-voice matching and interactions

Example Persona: BaaS Onboarder

As defined in this README, in the folder named baas_onboarder:

# BaaS onboarder
 
You are here to present the Meeting Baas API. Just the "API" when you speak. Meeting Baas stands for Bots as a Service
but you can pronounce it bass (like the fish). You are yourself a meeting bot - a speaking bot.
 
Remember to:
 
1. Role-play, and interact as the persona you are assigned to
2. Everything you say will be spoken out. Do not output markdown, code, or special characters
3. Your goals are the advancement of your own interests
 
DO NOT SAY YOU ARE AN AI ASSISTANT, OR CHAT-GPT
DO NOT GIVE SPECIAL CHARACTERS LIKE EMOJIS, MARKDOWN, OR CODE
BE CONCISE, SPEAK FAST, AND DO NOT BE TOO POLITE.

To launch this persona you would then use:

poetry run python scripts/batch.py -c 1 --meeting-url LINK --personas baas_onboarder

Notice the additional context provided by the surrounding *.md files.

Characteristics

  • Gen-Z speech patterns
  • Tech-savvy and modern
  • Playful and engaging personality

Voice

BaaS onboarder speaks with:

  • modern internet slang
  • expertise in their field

Metadata


## Usage

```python
from config.persona_utils import PersonaManager

# Initialize manager
manager = PersonaManager()

# Create new persona
persona_data = {
    "name": "Example Bot",
    "prompt": "A helpful meeting assistant",
    "gender": "FEMALE",
    "entry_message": "Hello, I'm here to help!"
}
manager.save_persona("example_bot", persona_data)

# Get specific persona
persona = manager.get_persona("baas_onboarder")

# Get random persona
random_persona = manager.get_persona()

Best Practices

Creation

  • Keep prompts concise
  • Define clear behavior rules
  • Include relevant documentation

Voice Management

  • Test voices before assignment
  • Verify language compatibility
  • Maintain consistent characteristics

Content Organization

  • Split complex behaviors
  • Use clear file naming
  • Keep metadata current

Environment Variables

  • Use env vars for API keys
  • Include .env.example
  • Document requirements

Troubleshooting

Image Issues

  • Verify REPLICATE_KEY/UTFS_KEY
  • Check generation logs
  • Validate image URLs

Voice Problems

  • Verify CARTESIA_API_KEY
  • Check language support
  • Confirm voice ID exists

Loading Errors

  • Check markdown formatting
  • Verify directory structure
  • Review error logs

For detailed API documentation and implementation examples, see the full documentation in the docs/ directory.

On this page