MATIH Platform is in active MVP development. Documentation reflects current implementation status.
12. AI Service
Agent System
Persona Agents

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

PersonaIDDescriptionPrimary Tools
BI Analystbi-analystData analysis, dashboards, visualizationexecute_sql, create_chart, analyze_data
Customer Supportcustomer-supportHelp desk, troubleshooting, documentationsearch_docs, create_ticket, lookup_status
Data Engineerdata-engineerPipeline management, data quality, schemarun_pipeline, check_quality, describe_schema
LeadershipleadershipExecutive summaries, KPI tracking, strategyget_kpis, generate_report, compare_periods
MLOpsmlopsModel lifecycle, experiments, deploymentslist_models, deploy_model, get_metrics
Platform Adminplatform-adminInfrastructure, monitoring, configurationcheck_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?"
  }'