curl --location --request POST '/api/agents' \
--header 'X-Session-Id;' \
--header 'Accept-Language;' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Sales Assistant",
"instruction": "Помогай клиентам...",
"avatar_url": "https://avatars-ai.senler.ru/agents/550e8400.jpg",
"agent_type": "sales",
"server_binding_mode": "none",
"mcp_server_list_id": "string",
"mcp_server_ids": [
"550e8400-e29b-41d4-a716-446655440001",
"650e8400-e29b-41d4-a716-446655440002"
],
"project_id": "string",
"selected_model": "gpt-5.1",
"temperature": 0.7,
"meta": {
"server_list": {
"server_count": 5
},
"status": "idle"
},
"is_active": true,
"metrics_collection_enabled": true,
"trigger_keywords": [
"помощь",
"консультация",
"менеджер"
],
"keyword_dialog_scope": "all",
"keyword_channel_ids": [
"550e8400-e29b-41d4-a716-446655440001"
],
"creation_mode": "manual",
"status": "draft",
"training_config": {
"customDepth": "2months",
"maxDataPoints": 2000
},
"training_mode": "fast",
"enable_buttons": false,
"enable_custom_attachments": false,
"enable_image_generation": false,
"image_generation_model": "dall-e-3",
"enable_audio_generation": false,
"audio_generation_model": "tts-1",
"enable_speech_recognition": false,
"speech_recognition_model": "whisper-1",
"enable_image_recognition": false,
"image_recognition_model": "gpt-4o",
"enable_qr_code": false,
"enable_chart": false,
"enable_web_search": false,
"enable_ai_response": true,
"enable_user_message": true,
"enable_streaming": false,
"use_project_variables": false,
"use_lead_variables": false,
"project_vars_instruction_mode": "none",
"project_vars_user_request_mode": "none",
"lead_vars_instruction_mode": "none",
"lead_vars_user_request_mode": "none"
}'{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "StreamVi Assistant",
"instruction": "string",
"avatar_url": "https://avatars-ai.senler.ru/agents/550e8400.jpg",
"agent_type": "sales",
"server_binding_mode": "list",
"mcp_server_list_id": "550e8400-e29b-41d4-a716-446655440000",
"serverList": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Production Servers",
"description": "string",
"servers": [],
"server_count": 5,
"meta": {
"category": "production",
"priority": 10
},
"created_at": "2019-08-24T14:15:22.123Z",
"updated_at": "2019-08-24T14:15:22.123Z"
},
"mcp_server_ids": [
"550e8400-e29b-41d4-a716-446655440001",
"650e8400-e29b-41d4-a716-446655440002"
],
"servers": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "My MCP Server",
"url": "http://localhost:8791/sse",
"description": "Production server",
"tags": [
"production",
"api"
],
"auth_token": "secret_token",
"mcp_server_list_id": "550e8400-e29b-41d4-a716-446655440000",
"meta": {
"region": "eu",
"version": "1.0.0",
"tags": [
"production"
],
"last_health_check": "string",
"health_status": "healthy"
},
"has_documentation": true,
"documentation_count": 5,
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
],
"project_id": "550e8400-e29b-41d4-a716-446655440000",
"meta": {
"server_list": {
"server_count": 5
},
"status": "training",
"generated_variants": [
{
"name": "Sales Assistant v1",
"instruction": "string",
"agent_type": "sales",
"variant_index": 0,
"selected_model": "gpt-4",
"meta": {},
"quality_score": 85,
"generation_reasoning": "string"
}
]
},
"is_active": true,
"selected_model": "gpt-5.1",
"temperature": 0.7,
"metrics_collection_enabled": true,
"trigger_keywords": [],
"keyword_dialog_scope": "all",
"generated_variants": [],
"status": "draft",
"wizard_current_step": "string",
"wizard_training_mode_selected": "fast",
"wizard_selected_source_ids": [],
"enable_buttons": false,
"enable_custom_attachments": false,
"enable_image_generation": false,
"image_generation_model": "dall-e-3",
"enable_audio_generation": false,
"audio_generation_model": "tts-1",
"enable_speech_recognition": false,
"speech_recognition_model": "whisper-1",
"enable_image_recognition": false,
"image_recognition_model": "gpt-4o",
"enable_qr_code": false,
"enable_chart": false,
"enable_web_search": false,
"enable_ai_response": true,
"enable_user_message": true,
"enable_streaming": false,
"enable_selective_response": false,
"enable_scheduling": false,
"enable_skip_metrics": false,
"enable_mute_dialog": false,
"use_project_variables": false,
"use_lead_variables": false,
"project_vars_instruction_mode": "none",
"project_vars_user_request_mode": "none",
"lead_vars_instruction_mode": "none",
"lead_vars_user_request_mode": "none",
"created_at": "2019-08-24T14:15:22.123Z",
"updated_at": "2019-08-24T14:15:22.123Z"
}