> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Profiles Module

> Built-in agent profiles and mode configurations

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    A[📋 Profile] --> B[🤖 Agent]
    B --> C[🔧 Tools + prompt]
    C --> D[▶️ Run task]
    E[➕ Custom profile] --> A

    classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef tool fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef ok fill:#10B981,stroke:#7C90A0,color:#fff
    classDef input fill:#6366F1,stroke:#7C90A0,color:#fff
    class A,B agent
    class C tool
    class D ok
    class E input

```

## How It Works

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

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
sequenceDiagram
    participant User
    participant Agent
    participant Profile

    User->>Agent: Task
    Agent->>Profile: Load prompt + tools
    Profile-->>Agent: Configured persona
    Agent-->>User: Response
```

## 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

<Steps>
  <Step title="Use a built-in profile">
    ```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    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}")
    ```
  </Step>

  <Step title="Register a custom profile">
    ```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    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)
    ```
  </Step>
</Steps>

## 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

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
@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

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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

<AccordionGroup>
  <Accordion title="Start with built-in profiles">
    Use `general`, `coder`, or `reviewer` before authoring custom profiles — they already bundle sensible tools and temperature defaults.
  </Accordion>

  <Accordion title="Match mode to role">
    Reserve `SUBAGENT` profiles for delegated tasks; use `PRIMARY` or `ALL` for agents that own the conversation.
  </Accordion>

  <Accordion title="Keep custom profiles focused">
    One clear purpose per profile (e.g. security audit, planning) keeps tool lists small and prompts easier to maintain.
  </Accordion>

  <Accordion title="Hide experimental profiles">
    Set `hidden=True` on profiles still in development so they stay out of `list_profiles()` until ready.
  </Accordion>
</AccordionGroup>

***

## Related

<CardGroup cols={2}>
  <Card icon="users" href="/features/handoffs" title="Handoffs">
    Delegate work to subagents that can reuse profile presets.
  </Card>

  <Card icon="sliders" href="/features/agent-centric-api" title="Agent-Centric API">
    Consolidated feature flags and config objects on `Agent(...)`.
  </Card>
</CardGroup>
