Skip to main content
from praisonaiagents import Agent

agent = Agent(
    name="profiled-agent",
    instructions="You are a customer support specialist.",
    profile="support",
)
agent.start("Help a customer reset their password.")
Use built-in agent profiles and modes to spin up specialised assistants without rewriting prompts from scratch. The user describes a support issue; the agent loads the right profile and responds in that mode.

How It Works

The agent loads the named profile’s prompt and tools, then answers the user in that mode.

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

1

Use a built-in profile

from praisonaiagents.agents.profiles import get_profile, list_profiles

coder = get_profile("coder")
print(f"Coder temperature: {coder.temperature}")

for profile in list_profiles():
    print(f"{profile.name}: {profile.description}")
2

Register a custom profile

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

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)

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}")

Best Practices

Use general, coder, or reviewer before authoring custom profiles — they already bundle sensible tools and temperature defaults.
Reserve SUBAGENT profiles for delegated tasks; use PRIMARY or ALL for agents that own the conversation.
One clear purpose per profile (e.g. security audit, planning) keeps tool lists small and prompts easier to maintain.
Set hidden=True on profiles still in development so they stay out of list_profiles() until ready.

Handoffs

Delegate work to subagents that can reuse profile presets.

Agent-Centric API

Consolidated feature flags and config objects on Agent(...).