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

# Personas

> Who uses PraisonAI recipes and how

App developers, platform engineers, and recipe authors each follow different integration paths.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent

agent = Agent(
    name="Persona Router",
    instructions="Direct readers to the right recipe persona guide.",
)
agent.start("I deploy recipe infrastructure—where do I start?")
```

The user identifies their role below and opens the matching persona workflow.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    subgraph "Persona Guide"
        U[📋 Role] --> A[🧭 Workflow]
        A --> O[✅ Next Steps]
    end

    classDef input fill:#6366F1,stroke:#7C90A0,color:#fff
    classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef output fill:#10B981,stroke:#7C90A0,color:#fff

    class U input
    class A process
    class O output
```

## Quick Start

**1. Simple Usage**

Ask the router which persona and path fits your work.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent

agent = Agent(name="Persona Router", instructions="Direct readers to a persona guide.")
agent.start("I deploy recipe infrastructure—where do I start?")
```

**2. With Configuration**

Add your language and environment for a targeted workflow.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent

agent = Agent(
    name="Persona Router",
    instructions="Recommend a persona workflow from the described role and stack.",
)
agent.start("I build a Node.js app that calls recipes over HTTP.")
```

***

## How It Works

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

    User->>Agent: State your role
    Agent->>Persona: Select matching workflow
    Persona-->>Agent: Steps and integration models
    Agent-->>User: Tailored guidance
```

***

## Persona 1: App Developer (Backend/Fullstack)

### Role Description

Backend or fullstack developers who integrate AI capabilities into applications. They consume recipes created by others and focus on reliable integration.

### Primary Goals

* Integrate AI features quickly
* Ensure reliability and error handling
* Minimize infrastructure complexity
* Meet performance requirements

### Recommended Integration Models

1. **Model 1 (Embedded SDK)** - For Python applications
2. **Model 3 (HTTP Sidecar)** - For polyglot microservices
3. **Model 2 (CLI)** - For scripts and automation

### Typical Workflow

**1. Discover Available Recipes**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# List all recipes
praisonai recipe list

# Get recipe details
praisonai recipe info support-reply-drafter
```

**2. Test Recipe Locally**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Dry run to validate
praisonai recipe run support-reply-drafter \
  --input '{"ticket_id": "T-123", "message": "Test"}' \
  --dry-run

# Full test run
praisonai recipe run support-reply-drafter \
  --input '{"ticket_id": "T-123", "message": "Test"}' \
  --json
```

**3. Integrate into Application**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonai import recipe

def handle_support_ticket(ticket):
    result = recipe.run(
        "support-reply-drafter",
        input={
            "ticket_id": ticket.id,
            "message": ticket.customer_message
        },
        options={"timeout_sec": 30}
    )
    
    if result.ok:
        return result.output["draft"]
    else:
        logger.error(f"Recipe failed: {result.error}")
        return None
```

**4. Add Error Handling**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonai.recipe import RecipeError, RecipeTimeoutError

try:
    result = recipe.run("my-recipe", input=data)
except RecipeTimeoutError:
    # Handle timeout
    return fallback_response()
except RecipeError as e:
    # Handle other errors
    logger.error(f"Recipe error: {e}")
    raise
```

### Key Concerns

* **Latency**: Monitor recipe execution time
* **Error handling**: Graceful degradation when recipes fail
* **Observability**: Logging, metrics, tracing
* **Testing**: Mock recipes in unit tests

***

## Persona 2: Platform/DevOps Engineer

### Role Description

Engineers responsible for deploying, scaling, and operating recipe infrastructure. They manage servers, authentication, monitoring, and security.

### Primary Goals

* Reliable recipe server deployment
* Secure multi-tenant access
* Monitoring and alerting
* Cost optimization

### Recommended Integration Models

1. **Model 4 (Remote Runner)** - Production deployments
2. **Model 5 (Event-Driven)** - High-scale async processing

### Typical Workflow

**1. Configure Server**

```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# serve.yaml (or agents.yaml)
host: 0.0.0.0
port: 8765
auth: api-key
api_key: ${PRAISONAI_API_KEY}

# Recipe filtering
recipes:
  - support-reply-drafter
  - meeting-action-items

# Performance
preload: true

# CORS for web clients
cors_origins: "https://app.example.com"
```

**2. Deploy with Docker**

```dockerfile theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
FROM python:3.11-slim
RUN pip install praisonai[serve]
COPY serve.yaml /app/
WORKDIR /app
ENV PRAISONAI_API_KEY=${PRAISONAI_API_KEY}
ENV OPENAI_API_KEY=${OPENAI_API_KEY}
EXPOSE 8765
CMD ["praisonai", "recipe", "serve", "--config", "serve.yaml"]
```

**3. Set Up Monitoring**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Health check endpoint
curl http://localhost:8765/health

# Prometheus metrics (if enabled)
curl http://localhost:8765/metrics
```

**4. Configure Load Balancer**

```nginx theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
upstream recipe_servers {
    server recipe1:8765;
    server recipe2:8765;
    server recipe3:8765;
}

server {
    listen 443 ssl;
    location /v1/recipes {
        proxy_pass http://recipe_servers;
    }
}
```

**5. Set Up Alerts**

```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# alertmanager rules
groups:
  - name: recipe-server
    rules:
      - alert: RecipeServerDown
        expr: up{job="recipe-server"} == 0
        for: 1m
      - alert: HighLatency
        expr: recipe_request_duration_seconds > 10
        for: 5m
```

### Key Concerns

* **Security**: API key rotation, TLS, network policies
* **Scaling**: Horizontal scaling, load balancing
* **Availability**: Health checks, failover
* **Cost**: Resource utilization, API costs

***

## Persona 3: Recipe Author / Solutions Engineer

### Role Description

Engineers who create and maintain recipes. They design AI workflows, configure agents, and ensure recipes meet business requirements.

### Primary Goals

* Create reusable, reliable recipes
* Document inputs/outputs clearly
* Ensure security and compliance
* Optimize for performance and cost

### Recommended Workflow

**1. Initialize Recipe Project**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai recipe init my-new-recipe
cd my-new-recipe
```

**2. Define Recipe Schema**

```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# TEMPLATE.yaml
schema_version: "1.0"
name: my-new-recipe
version: "1.0.0"
description: |
  Detailed description of what this recipe does.
author: your-name
license: Apache-2.0
tags: [category, use-case]

requires:
  env: [OPENAI_API_KEY]
  packages: []

tools:
  allow: [web_search]
  deny: [shell.exec, file.write]

config:
  input:
    query:
      type: string
      required: true
      description: The user's query
    context:
      type: string
      required: false
      description: Optional context

defaults:
  model: gpt-4o-mini
  temperature: 0.7

outputs:
  - name: result
    type: text
    description: The generated response
```

**3. Define Workflow**

```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# workflow.yaml
framework: praisonai
topic: My Recipe Workflow

roles:
  analyst:
    role: Data Analyst
    goal: Analyze the input and provide insights
    backstory: Expert data analyst
    tasks:
      analyze:
        description: Analyze {query} with context {context}
        expected_output: Structured analysis
```

**4. Validate Recipe**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai recipe validate my-new-recipe
```

**5. Test Recipe**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Dry run
praisonai recipe run my-new-recipe \
  --input '{"query": "test"}' \
  --dry-run

# Full test
praisonai recipe run my-new-recipe \
  --input '{"query": "test"}' \
  --json
```

**6. Package and Distribute**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Create bundle
praisonai recipe pack my-new-recipe --output my-recipe.praison

# Share or deploy
```

### Key Concerns

* **Schema design**: Clear, well-documented inputs/outputs
* **Security**: Tool restrictions, data handling policies
* **Testing**: Comprehensive test cases
* **Versioning**: Semantic versioning, changelog

***

## Persona Collaboration

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
flowchart TD
    RA[Recipe Author] -->|creates| R[Recipe]
    R --> AD[App Developer<br/>integrates]
    R --> PD[Platform/DevOps<br/>deploys]
    R --> EU[End Users<br/>uses]
    
    style RA fill:#FFB6C1
    style R fill:#E8E8E8
    style AD fill:#90EE90
    style PD fill:#87CEEB
    style EU fill:#FFFACD
```

## Best Practices

> [accordion] Restrict tools in the recipe schema
>
> Recipe Authors set `tools.allow` and `tools.deny` in `TEMPLATE.yaml` so a recipe can only reach the capabilities it needs — deny `shell.exec` and `file.write` unless required.

> [accordion] Validate before you run
>
> `praisonai recipe validate` catches schema errors early. Run it in CI so broken recipes never reach App Developers.

> [accordion] Handle recipe failures gracefully in apps
>
> App Developers should catch `RecipeTimeoutError` and `RecipeError` and fall back cleanly rather than surfacing raw errors to users.

> [accordion] Preload recipes on the server for lower latency
>
> Platform/DevOps can set `preload: true` in `serve.yaml` so the first request does not pay the recipe load cost.

***

## Related

> [card] [Integration Models](https://praison.ai/docs/guides/recipes/integration-models.md)
>
> Technical integration options per persona

> [card] [Decision Guide](https://praison.ai/docs/guides/recipes/decision-guide.md)
>
> Choose the model that fits your role


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.