Agent Profiles Module
Built-in agent profiles and mode configurations
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
| Profile | Mode | Description |
|---|---|---|
general | Primary | General-purpose coding assistant |
coder | All | Focused code implementation |
planner | Subagent | Task planning and decomposition |
reviewer | Subagent | Code review and quality |
explorer | Subagent | Codebase exploration |
debugger | Subagent | Debugging and troubleshooting |
Quick Start
- Use a built-in profile
python 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}") - Register a custom profile
python 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
| Mode | Description |
|---|---|
PRIMARY | Main agent that can spawn subagents |
SUBAGENT | Spawned by another agent for specific tasks |
ALL | Can 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 listingsFunctions
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
Start with built-in profiles
Use general, coder, or reviewer before authoring custom profiles — they already bundle sensible tools and temperature defaults.
Match mode to role
Reserve SUBAGENT profiles for delegated tasks; use PRIMARY or ALL for agents that own the conversation.
Keep custom profiles focused
One clear purpose per profile (e.g. security audit, planning) keeps tool lists small and prompts easier to maintain.
Hide experimental profiles
Set hidden=True on profiles still in development so they stay out of list_profiles() until ready.