Persona Statistics
View usage statistics and performance metrics for all personas in the workspace.
Provides insights into persona effectiveness, usage patterns, and performance across scenarios.
Request
curl -X GET "https://api.chanl.ai/api/v1/workspaces/ws_123/personas/stats" \
-H "Authorization: Bearer <access_token>"const response = await fetch(`https://api.chanl.ai/api/v1/workspaces/${workspaceId}/personas/stats`, {
headers: {
'Authorization': 'Bearer ' + accessToken
}
});
const { data } = await response.json();
console.log('Persona stats:', data.stats);import requests
response = requests.get(
f'https://api.chanl.ai/api/v1/workspaces/{workspace_id}/personas/stats',
headers={'Authorization': f'Bearer {access_token}'}
)
stats = response.json()['data']['stats']Response
{
"success": true,
"data": {
"stats": {
"overview": {
"total_personas": 15,
"active_personas": 12,
"total_simulations": 1456,
"avg_score_all_personas": 83.7
},
"most_used_persona": {
"id": "persona_123",
"name": "Frustrated Customer",
"usage_count": 234,
"avg_score": 72.3,
"success_rate": 89.2
},
"best_performing_persona": {
"id": "persona_456",
"name": "Polite Customer",
"usage_count": 189,
"avg_score": 94.1,
"success_rate": 98.4
},
"worst_performing_persona": {
"id": "persona_789",
"name": "Very Difficult Customer",
"usage_count": 67,
"avg_score": 58.3,
"success_rate": 73.1
},
"personas_by_emotion": {
"frustrated": {
"count": 3,
"avg_score": 71.2,
"total_simulations": 345
},
"happy": {
"count": 2,
"avg_score": 92.7,
"total_simulations": 234
},
"confused": {
"count": 4,
"avg_score": 78.9,
"total_simulations": 289
},
"neutral": {
"count": 6,
"avg_score": 86.4,
"total_simulations": 588
}
},
"personas_by_difficulty": {
"easy": {
"count": 5,
"avg_score": 91.3,
"total_simulations": 456
},
"medium": {
"count": 7,
"avg_score": 81.7,
"total_simulations": 623
},
"hard": {
"count": 3,
"avg_score": 69.2,
"total_simulations": 377
}
},
"personas_by_language": {
"en": {
"count": 12,
"avg_score": 84.1
},
"es": {
"count": 2,
"avg_score": 81.3
},
"fr": {
"count": 1,
"avg_score": 79.8
}
},
"usage_trends": {
"last_7_days": {
"total_simulations": 89,
"avg_score": 85.2,
"most_used": "persona_123"
},
"last_30_days": {
"total_simulations": 378,
"avg_score": 83.9,
"most_used": "persona_123"
}
},
"performance_insights": [
{
"type": "recommendation",
"message": "Consider creating more 'easy' difficulty personas - they show highest success rates"
},
{
"type": "warning",
"message": "Persona 'Very Difficult Customer' has low scores - review and optimize"
},
{
"type": "insight",
"message": "Frustrated personas are used frequently but have lower scores - good for stress testing"
}
]
}
}
}Query Parameters
periodstringTime period for statistics (7d, 30d, 90d) - default: 30d
include_trendsbooleanInclude historical trend data - default: true
group_bystringGroup statistics by field (emotion, difficulty, language) - default: all
Use Cases
- Performance Analysis: Identify which persona types work best
- Usage Optimization: Understand which personas are most valuable
- Content Planning: Guide creation of new personas based on gaps
- Quality Improvement: Find personas that need refinement
- Training Insights: Use performance data to improve agent training