Skip to main content

Agent Profiles Module

The Agent Profiles module provides built-in agent profiles and mode configurations for common agent use cases.

Features

  • Built-in Profiles - Pre-configured agents for common tasks
  • Agent Modes - Primary, subagent, and all-context modes
  • Custom Profiles - Register your own agent profiles
  • Profile Discovery - List and filter available profiles

Built-in Profiles

ProfileModeDescription
generalPrimaryGeneral-purpose coding assistant
coderAllFocused code implementation
plannerSubagentTask planning and decomposition
reviewerSubagentCode review and quality
explorerSubagentCodebase exploration
debuggerSubagentDebugging and troubleshooting

Quick Start

from praisonaiagents.agents.profiles import (
    get_profile,
    list_profiles,
    register_profile,
    AgentProfile,
    AgentMode
)

# Get a built-in profile
coder = get_profile("coder")
print(f"Coder temperature: {coder.temperature}")

# List all profiles
for profile in list_profiles():
    print(f"{profile.name}: {profile.description}")

Agent Modes

ModeDescription
PRIMARYMain agent that can spawn subagents
SUBAGENTSpawned by another agent for specific tasks
ALLCan be used in any context

API Reference

AgentProfile

@dataclass
class AgentProfile:
    name: str                    # Unique profile name
    description: str             # What this agent does
    mode: AgentMode              # Execution mode
    system_prompt: str           # System prompt
    tools: List[str]             # Available tools
    temperature: float           # LLM temperature
    max_steps: int               # Maximum execution steps
    hidden: bool                 # Hide from listings

Functions

def get_profile(name: str) -> Optional[AgentProfile]:
    """Get a profile by name."""

def list_profiles(include_hidden: bool = False) -> List[AgentProfile]:
    """List all available profiles."""

def register_profile(profile: AgentProfile) -> None:
    """Register a custom profile."""

def get_profiles_by_mode(mode: AgentMode) -> List[AgentProfile]:
    """Get profiles that work in a specific mode."""

Examples

Using Built-in Profiles

from praisonaiagents.agents.profiles import get_profile

# Get the coder profile
coder = get_profile("coder")

# Use profile settings
print(f"System prompt: {coder.system_prompt[:100]}...")
print(f"Tools: {coder.tools}")
print(f"Temperature: {coder.temperature}")

Custom Profile

from praisonaiagents.agents.profiles import (
    register_profile,
    AgentProfile,
    AgentMode
)

# Create custom profile
security_auditor = AgentProfile(
    name="security_auditor",
    description="Security vulnerability scanner",
    mode=AgentMode.SUBAGENT,
    system_prompt="You are a security expert...",
    tools=["read_file", "search"],
    temperature=0.2,
    max_steps=40
)

register_profile(security_auditor)

Filter by Mode

from praisonaiagents.agents.profiles import (
    get_profiles_by_mode,
    AgentMode
)

# Get all subagent-capable profiles
subagents = get_profiles_by_mode(AgentMode.SUBAGENT)
for profile in subagents:
    print(f"{profile.name}: {profile.description}")