Persona Agents
Production - Role-based persona agents for different user types
Persona Agents are pre-configured agent personalities tailored to specific user roles within the platform. Each persona has a distinct system prompt, tool set, communication style, and domain expertise. Defined in data-plane/ai-service/src/persona/.
12.2.13.1Available Personas
| Persona | ID | Description | Primary Tools |
|---|---|---|---|
| BI Analyst | bi-analyst | Data analysis, dashboards, visualization | execute_sql, create_chart, analyze_data |
| Customer Support | customer-support | Help desk, troubleshooting, documentation | search_docs, create_ticket, lookup_status |
| Data Engineer | data-engineer | Pipeline management, data quality, schema | run_pipeline, check_quality, describe_schema |
| Leadership | leadership | Executive summaries, KPI tracking, strategy | get_kpis, generate_report, compare_periods |
| MLOps | mlops | Model lifecycle, experiments, deployments | list_models, deploy_model, get_metrics |
| Platform Admin | platform-admin | Infrastructure, monitoring, configuration | check_health, view_logs, manage_config |
Persona Configuration Example
BI_ANALYST_PERSONA = AgentConfig(
name="BI Analyst",
description="Expert data analyst for business intelligence",
agent_type=AgentType.CONVERSATIONAL,
role=AgentRole.ANALYST,
system_prompt="""You are an expert Business Intelligence analyst. Your strengths:
- Generating optimized SQL queries for data analysis
- Creating insightful visualizations (bar, line, pie, scatter, heatmap)
- Identifying trends, anomalies, and patterns in data
- Providing clear, actionable business recommendations
- Working with time series, aggregations, and comparisons
Always explain your analysis in business terms. When generating SQL, prefer
readable queries with clear aliases. Suggest appropriate chart types based
on the data shape.""",
tools=["execute_sql", "create_chart", "analyze_data", "export_data"],
temperature=0.3,
max_tokens=8192,
max_iterations=8,
)12.2.13.2Using Personas
# List available personas
curl http://localhost:8000/api/v1/personas?tenant_id=acme-corp
# Start a session with a specific persona
curl -X POST http://localhost:8000/api/v1/chat/sessions \
-H "Content-Type: application/json" \
-H "X-Tenant-ID: acme-corp" \
-d '{
"persona": "bi-analyst",
"user_id": "user-123"
}'
# Send message using persona
curl -X POST http://localhost:8000/api/v1/chat/sessions/{session_id}/messages \
-H "Content-Type: application/json" \
-H "X-Tenant-ID: acme-corp" \
-d '{
"message": "What were our top performing products last quarter?"
}'