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

# Use Cases

> 12 real-world implementation patterns for PraisonAI recipes

Twelve production patterns show which integration model fits each recipe scenario.

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

agent = Agent(
    name="Use Case Mapper",
    instructions="Map business scenarios to PraisonAI recipe patterns.",
)
agent.start("Automate draft replies for SaaS support tickets.")
```

The user finds a scenario below and copies the recommended model plus implementation steps.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    subgraph "Use Cases"
        U[📋 Scenario] --> A[🧭 Match Pattern]
        A --> O[✅ Recipe + Model]
    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 mapper which pattern fits your scenario.

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

agent = Agent(name="Use Case Mapper", instructions="Map scenarios to recipe patterns.")
agent.start("Automate draft replies for SaaS support tickets.")
```

**2. With Configuration**

Run the matched recipe from the CLI once you pick a pattern.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai recipe run support-reply-drafter \
  --input '{"ticket_id": "T-123", "customer_message": "I need help"}' \
  --json
```

***

## How It Works

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

    User->>Agent: Describe a business scenario
    Agent->>Recipe: Select pattern + integration model
    Recipe-->>Agent: Steps and schema
    Agent-->>User: Implementation plan
```

***

## 1. SaaS AI Support Reply Drafts

### What It Is

Automatically generate draft replies for customer support tickets using AI, allowing agents to review and send.

### Recommended Integration Model

**Model 3 (HTTP Sidecar)** or **Model 4 (Remote Runner)**

* HTTP API integrates with existing ticketing systems
* Supports multiple concurrent requests
* Easy to add auth for multi-tenant SaaS

### Implementation

**1. Create Recipe**

```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# support-reply/TEMPLATE.yaml
schema_version: "1.0"
name: support-reply-drafter
description: Generate support reply drafts

requires:
  env: [OPENAI_API_KEY]

config:
  input:
    ticket_id:
      type: string
      required: true
    customer_message:
      type: string
      required: true
    context:
      type: string
      required: false
```

**2. Start Server**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai serve recipe --port 8765 --auth api-key
```

**3. Integrate with Ticketing System**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import requests

def generate_reply_draft(ticket_id, customer_message):
    response = requests.post(
        "http://localhost:8765/v1/recipes/run",
        headers={"X-API-Key": "your-key"},
        json={
            "recipe": "support-reply-drafter",
            "input": {
                "ticket_id": ticket_id,
                "customer_message": customer_message
            }
        }
    )
    return response.json()["output"]["draft"]
```

### Security Considerations

* **PII**: Customer messages may contain PII; ensure data handling compliance
* **Output review**: Always have human review before sending
* **Rate limiting**: Prevent abuse with request limits

### Example Payload

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "recipe": "support-reply-drafter",
  "input": {
    "ticket_id": "T-12345",
    "customer_message": "I can't log into my account",
    "context": "Premium customer, 2 years"
  }
}
```

***

## 2. Meeting Notes → Action Items

### What It Is

Extract action items, decisions, and follow-ups from meeting transcripts or notes.

### Recommended Integration Model

**Model 2 (CLI)** or **Model 5 (Event-Driven)**

* CLI for ad-hoc processing
* Event-driven for automated pipeline from recording service

### Implementation

**1. Process via CLI**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai recipe run meeting-action-items \
  --input '{"transcript": "...meeting notes..."}' \
  --json
```

**2. Automated Pipeline**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Triggered when new transcript arrives
from praisonai import recipe

def process_meeting(transcript_path):
    with open(transcript_path) as f:
        transcript = f.read()
    
    result = recipe.run(
        "meeting-action-items",
        input={"transcript": transcript}
    )
    
    return result.output["action_items"]
```

### Security Considerations

* **Confidentiality**: Meeting content may be sensitive
* **Access control**: Restrict who can process which meetings
* **Retention**: Define data retention policies

***

## 3. SQL Analyst Assistant

### What It Is

Natural language to SQL query generation with schema awareness and result explanation.

### Recommended Integration Model

**Model 1 (Embedded SDK)**

* Direct integration with data tools
* Low latency for interactive queries
* Access to database connections

### Implementation

**1. Define Recipe with Schema**

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

result = recipe.run(
    "sql-analyst",
    input={
        "question": "Show me top 10 customers by revenue",
        "schema": {
            "customers": ["id", "name", "email"],
            "orders": ["id", "customer_id", "amount", "date"]
        }
    }
)

sql_query = result.output["sql"]
explanation = result.output["explanation"]
```

### Security Considerations

* **SQL injection**: Validate generated queries before execution
* **Data access**: Ensure recipe only sees allowed schemas
* **Audit logging**: Log all generated queries

***

## 4. Code Review Assistant

### What It Is

Automated code review providing feedback on style, bugs, security, and best practices.

### Recommended Integration Model

**Model 6 (Plugin Mode)** or **Model 2 (CLI)**

* IDE plugin for real-time feedback
* CLI for CI/CD integration

### Implementation

**1. CI/CD Integration**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# In GitHub Actions
- name: AI Code Review
  run: |
    git diff origin/main...HEAD > changes.diff
    praisonai recipe run code-review \
      --input "{\"diff\": \"$(cat changes.diff)\"}" \
      --json > review.json
```

**2. IDE Plugin**

```javascript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
// VS Code extension
vscode.commands.registerCommand('praisonai.review', async () => {
  const code = vscode.window.activeTextEditor.document.getText();
  const result = await invokeRecipe('code-review', { code });
  showReviewPanel(result.output.feedback);
});
```

***

## 5. Marketing Content Generator

### What It Is

Generate marketing copy, social posts, email campaigns, and ad variations.

### Recommended Integration Model

**Model 3 (HTTP Sidecar)**

* Integrates with marketing platforms
* Supports batch generation
* Easy A/B testing

### Implementation

**1. Generate Content**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai endpoints invoke marketing-content \
  --input-json '{
    "product": "AI Assistant",
    "tone": "professional",
    "channels": ["email", "linkedin", "twitter"]
  }' \
  --json
```

### Security Considerations

* **Brand safety**: Review generated content for brand alignment
* **Compliance**: Ensure claims are accurate and compliant

***

## 6. Customer Onboarding Concierge

### What It Is

Interactive AI assistant guiding new customers through setup, configuration, and first steps.

### Recommended Integration Model

**Model 4 (Remote Runner)** with streaming

* Real-time conversational interface
* Multi-tenant support
* Session state management

### Implementation

**1. Stream Responses**

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

for event in recipe.run_stream(
    "onboarding-concierge",
    input={"user_id": "U-123", "step": "initial"},
    session_id="session-abc"
):
    if event.event_type == "progress":
        print(event.data["message"])
```

***

## 7. Fraud Signal Summarizer

### What It Is

Analyze transaction patterns and summarize potential fraud indicators for human review.

### Recommended Integration Model

**Model 5 (Event-Driven)**

* Process transactions asynchronously
* Handle high volume
* Integrate with alerting systems

### Implementation

**1. Event Handler**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def handle_transaction(transaction):
    result = recipe.run(
        "fraud-analyzer",
        input={
            "transaction_id": transaction["id"],
            "amount": transaction["amount"],
            "patterns": transaction["patterns"]
        }
    )
    
    if result.output["risk_score"] > 0.8:
        send_alert(result.output["summary"])
```

### Security Considerations

* **Data sensitivity**: Transaction data is highly sensitive
* **False positives**: Balance detection vs. customer friction
* **Audit trail**: Log all decisions for compliance

***

## 8. Document Ingestion + Q\&A

### What It Is

Ingest documents, build knowledge base, and answer questions with citations.

### Recommended Integration Model

**Model 1 (Embedded SDK)** or **Model 3 (HTTP Sidecar)**

* SDK for direct integration with document pipelines
* HTTP for multi-service architecture

### Implementation

**1. Ingest Documents**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
result = recipe.run(
    "doc-ingestion",
    input={"documents": ["/path/to/doc1.pdf", "/path/to/doc2.pdf"]}
)
knowledge_base_id = result.output["kb_id"]
```

**2. Query Knowledge Base**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
result = recipe.run(
    "doc-qa",
    input={
        "question": "What is the refund policy?",
        "kb_id": knowledge_base_id
    }
)
print(result.output["answer"])
print(result.output["citations"])
```

***

## 9. Sales Call Coaching

### What It Is

Analyze sales call recordings/transcripts and provide coaching feedback.

### Recommended Integration Model

**Model 5 (Event-Driven)**

* Process calls asynchronously after completion
* Integrate with call recording systems
* Batch processing for historical analysis

### Implementation

**1. Process Call**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai recipe run sales-coach \
  --input '{"transcript": "...", "rep_id": "R-123"}' \
  --json
```

***

## 10. Data Migration Assistant

### What It Is

Assist with data transformation, mapping, and validation during migrations.

### Recommended Integration Model

**Model 2 (CLI)**

* Scriptable for migration pipelines
* Batch processing support
* Easy to integrate with ETL tools

### Implementation

**1. Generate Mapping**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai recipe run data-mapper \
  --input '{
    "source_schema": {...},
    "target_schema": {...},
    "sample_data": [...]
  }' \
  --json > mapping.json
```

***

## 11. Multi-Agent Router

### What It Is

Intelligent routing of requests to specialized agents based on intent and context.

### Recommended Integration Model

**Model 1 (Embedded SDK)** or **Model 3 (HTTP Sidecar)**

* Low latency routing decisions
* Access to multiple downstream agents

### Implementation

**1. Router Recipe**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
result = recipe.run(
    "agent-router",
    input={
        "user_message": "I need help with billing",
        "available_agents": ["billing", "technical", "sales"]
    }
)

target_agent = result.output["selected_agent"]
# Route to target agent
```

***

## 12. Localization Pipeline

### What It Is

Translate and localize content while preserving context, tone, and formatting.

### Recommended Integration Model

**Model 5 (Event-Driven)** or **Model 2 (CLI)**

* Batch processing for content updates
* Event-driven for real-time localization

### Implementation

**1. Localize Content**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai recipe run localization \
  --input '{
    "content": "Welcome to our platform!",
    "source_lang": "en",
    "target_langs": ["es", "fr", "de", "ja"],
    "context": "marketing_homepage"
  }' \
  --json
```

### Security Considerations

* **Cultural sensitivity**: Review translations for cultural appropriateness
* **Legal compliance**: Ensure translations meet local regulations

***

## Testing with Real API Keys

For all use cases, test with real API keys:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Set API key
export OPENAI_API_KEY=your-key

# Run a test
praisonai recipe run my-recipe \
  --input '{"test": "data"}' \
  --json

# Verify output
echo $?  # Should be 0
```

## Best Practices

> [accordion] Start from the closest listed pattern
>
> Each use case names a recommended model and a schema. Copy the nearest match and adapt inputs rather than designing from scratch.

> [accordion] Keep a human in the loop for customer-facing output
>
> Support drafts, sales coaching, and onboarding replies should be reviewed before sending. Recipes generate; people approve.

> [accordion] Pick async models for batch and event work
>
> Fraud summaries and localization pipelines fit event-driven processing better than synchronous HTTP calls.

> [accordion] Restrict tools per scenario
>
> A SQL assistant needs database read access; a code reviewer does not. Set `tools.allow`/`tools.deny` per recipe to match the scenario.

***

## Related

> [card] [Integration Models](https://praison.ai/docs/guides/recipes/integration-models.md)
>
> Detailed setup for each pattern

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


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