{
"items": [
{
"id": "507f1f77bcf86cd799439011",
"dialog_id": "string",
"mcp_server_id": "string",
"platform_type": "vk",
"event_type": "message",
"entity_type": "string",
"entity_id": "string",
"metadata": {
"list_id": "list-123",
"client_type": "web",
"custom_field": "value"
},
"parent_event_id": "event-parent-123",
"is_rolled_back": true,
"rolled_back_by_event_id": "string",
"rollback_payload": {
"previous_state": "old_value"
},
"summary": "string",
"tags": [
"api_call",
"payment"
],
"transaction_id": "string",
"agent_id": "string",
"user_id": "string",
"timestamp": "2019-08-24T14:15:22.123Z",
"model_id": "string",
"provider_id": "string",
"model_slug": "gpt-4o",
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0,
"cached_tokens": 0,
"reasoning_tokens": 0,
"cached_percentage": 0.53,
"billing_mode": "tokens",
"client_currency": "RUB",
"client_input_cost": 250,
"client_output_cost": 420,
"client_total_cost": 670,
"message": {
"content": "Привет! Как настроить MCP сервер?",
"role": "user",
"model": "gpt-4o"
},
"status_is_delivered": 0,
"status_is_read": 0,
"status_is_deleted": 0,
"status_is_failed": 0,
"status_delivered_at": "2025-12-29T10:00:00Z",
"status_read_at": "2025-12-29T10:01:00Z",
"status_read_by": "user-123",
"status_failed_at": "2019-08-24T14:15:22.123Z",
"status_failure_reason": "User blocked agent",
"status_deleted_at": "2025-12-29T10:00:00Z",
"status_deleted_by": {
"id": "user-123",
"type": "user",
"first_name": "Иван",
"last_name": "Петров"
},
"message_is_edited": 0,
"message_edited_at": "2025-12-29T10:00:00Z",
"message_edited_by": {
"id": "user-123",
"type": "user",
"first_name": "Иван",
"last_name": "Петров"
},
"tool_name": "search_servers",
"tool_duration_ms": 1500,
"tool_error_message": "API timeout",
"sender": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "lead",
"first_name": "Иван",
"last_name": "Петров",
"username": "ivan_petrov",
"avatar_url": "https://example.com/avatar.jpg"
},
"webhook_provider": "telegram",
"webhook_message_id": "12345",
"webhook_chat_id": "-1001234567890",
"webhook_user_id": "987654321",
"duration_ms": 2500,
"http_status_code": 200,
"tool_executed_at": "2019-08-24T14:15:22.123Z",
"tool_completed_at": "2019-08-24T14:15:22.123Z",
"tool_failed_at": "2019-08-24T14:15:22.123Z",
"thinking_completed_at": "2019-08-24T14:15:22.123Z",
"thinking_duration_ms": 3000,
"thinking_text": "Analyzing user request to determine which tool to use...",
"reasoning_text": "I should use search_servers tool because user is asking about MCP servers",
"buttons": [],
"attachments": [],
"metrics": [],
"metrics_status": "pending",
"summary_status": "pending",
"related_costs": [
{
"event_type": "image_generation",
"costs": {
"client_total_cost": 12
},
"metadata": {
"model": "dall-e-3"
}
},
{
"event_type": "metrics_extraction",
"costs": {
"client_total_cost": 1
},
"metadata": {
"metrics_count": 3
}
}
],
"total_cost": 683,
"button_click": {
"callback_data": "confirm_order",
"button_text": "Подтвердить заказ",
"callback_id": "123456789",
"message_id": 12345,
"action": "callback",
"url": "https://example.com"
},
"error": {
"code": "ai_generation_failed",
"message": "Превышено время ожидания ответа",
"error_type": "ai.connection_terminated",
"message_key": "errors.ai.timeout",
"original_message": "Request timed out.",
"user_event_id": "507f1f77bcf86cd799439011",
"details": {
"stack_trace": "Error: Request timed out.\n at ...",
"http_status": 504
},
"retry_count": 3
},
"tool": {
"name": "search_servers",
"input": {
"query": "MCP server",
"limit": 10
},
"output": "{\"results\": [], \"total\": 0}",
"duration_ms": 1500,
"executed_at": "2025-12-29T10:00:00.000Z",
"completed_at": "2025-12-29T10:00:01.500Z",
"failed_at": "2025-12-29T10:00:01.500Z",
"error_message": "Connection timeout"
},
"search": {
"score": 12.5,
"highlighted": "Хочу <mark>заказать</mark> пиццу с доставкой"
},
"ai_thinking": {
"messages_count": 15,
"context_stats": {
"total_tokens": 5000,
"messages": 15,
"system_messages": 1,
"user_messages": 7,
"assistant_messages": 6,
"tool_messages": 1
},
"available_tools": [
{
"name": "search_servers",
"description": "Search MCP servers by query"
},
{
"name": "get_server_info",
"description": "Get detailed server info"
}
]
},
"ai_reasoning": {
"reasoning": "User wants to find PostgreSQL servers, I should use search_servers tool",
"tools_to_call": [
{
"name": "search_servers",
"args": {
"query": "postgres",
"limit": 10
}
}
]
},
"mcp_tool_result_info": {
"result_length": 15000,
"was_truncated": true,
"truncate_limit": 10000
}
}
],
"has_more": true,
"next_cursor": "2025-01-03T10:00:00.000Z:uuid-050",
"prev_cursor": "2025-01-04T12:00:00.123Z:uuid-001"
}