Get Communication Stats
GET /api/agents/communication/stats
Get comprehensive agent communication statistics and analytics.
Args: request: FastAPI Request object for backend context
Returns: CommunicationStatsResponse: Detailed communication metrics and statistics
Note: Provides comprehensive analytics on agent communication patterns including message volumes, consultation metrics, handoff statistics, and performance data for system optimization and monitoring purposes.
Responses
Section titled “ Responses ”Successful Response
Communication statistics response model.
Provides comprehensive statistics about inter-agent communications including message counts, active conversations, consultation metrics, and system health. Used for communication monitoring and analytics.
Fields:
total_messages: Total messages sent through system (non-negative integer)active_consultations: Currently active consultation requests (non-negative integer)completed_handoffs: Successfully completed handoffs (non-negative integer)failed_communications: Failed communication attempts (non-negative integer)average_response_time_ms: Average agent response time in milliseconds (non-negative float)agent_communication_matrix: Matrix of agent-to-agent communication counts
Usage: GET /api/agent-communication/communications/stats returns this response model.
JSON Example:
{
"totalMessages": 1542,
"activeConsultations": 5,
"completedHandoffs": 23,
"failedCommunications": 2,
"averageResponseTimeMs": 145.3,
"agentCommunicationMatrix": {
"HAWKEN": {"LAGAN": 45, "ORCHESTRATOR": 23},
"LAGAN": {"HAWKEN": 45}
}
}object
Total messages sent through system
Currently active consultation requests
Successfully completed handoffs
Failed communication attempts
Average agent response time in ms
Matrix of agent-to-agent communication counts