-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathwebui_gateway_example.yaml
More file actions
252 lines (225 loc) · 10.9 KB
/
webui_gateway_example.yaml
File metadata and controls
252 lines (225 loc) · 10.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# Solace AI Connector Configuration for A2A Web UI
log:
stdout_log_level: INFO
log_file_level: DEBUG # Use DEBUG for development
log_file: webui_example.log
# Shared SAM config
!include ../shared_config.yaml
apps:
- name: webui_example_app
app_base_path: . # Assume running from project root where src/ is located
app_module: solace_agent_mesh.gateway.http_sse.app
# Broker settings for this app instance
broker:
<<: *broker_connection # Points to shared_config.yaml
# Queue name is generated automatically by WebUIBackendApp based on namespace/gateway_id
# --- App Level Config (Validated by WebUIBackendApp.app_schema) ---
app_config:
# --- Required ---
namespace: ${NAMESPACE} # Namespace for A2A communication
session_secret_key: "${SESSION_SECRET_KEY}" # Secret for web sessions
# # --- Development User Identity Configuration (WARNING: Only for development!) ---
# # Force all user identities to sam_dev_user (overrides web-client-xxxxx)
# force_user_identity: "sam_dev_user"
# # Fallback for null identities (kept for completeness)
# default_user_identity: "sam_dev_user"
# --- Artifact Service (Required) ---
artifact_service: *default_artifact_service # Points to shared_config.yaml
session_service:
type: "sql"
database_url: "${WEB_UI_GATEWAY_DATABASE_URL, sqlite:///webui-gateway.db}"
default_behavior: "PERSISTENT"
# --- Platform Service Configuration ---
# URL for Platform Service (runs separately on port 8001)
# Frontend will route /api/v1/platform/* requests to this URL
platform_service:
url: "${PLATFORM_SERVICE_URL, http://localhost:8001}"
# --- OAuth2 Authentication (Optional - Enterprise Feature) ---
# Community mode: frontend_use_authorization=false (default) - uses dev user (sam_dev_user)
# Enterprise mode: frontend_use_authorization=true - validates tokens with external OAuth service
external_auth_service_url: ${EXTERNAL_AUTH_SERVICE_URL}
external_auth_provider: ${EXTERNAL_AUTH_PROVIDER, generic}
frontend_use_authorization: ${FRONTEND_USE_AUTHORIZATION, false} # Set to true for production with OAuth
# --- Optional with Defaults ---
model: *general_model # Optional: defaults to None - Points to shared_config.yaml
gateway_id: ${WEBUI_GATEWAY_ID} # Optional: Unique ID for this instance. If omitted, one will be generated.
fastapi_host: ${FASTAPI_HOST, localhost} # Host for the FastAPI server
fastapi_port: ${FASTAPI_PORT, 8000} # Port for the FastAPI server
cors_allowed_origins: # List of allowed origins for CORS
- "http://localhost:3000" # Example: Allow local React dev server
- "http://127.0.0.1:3000"
# Add other origins as needed, or use ["*"] for wide open (less secure)
# --- Embed Resolution Config ---
enable_embed_resolution: ${ENABLE_EMBED_RESOLUTION} # Enable late-stage resolution
gateway_artifact_content_limit_bytes: ${GATEWAY_ARTIFACT_LIMIT_BYTES, 10000000} # Max size for late-stage embeds
sse_max_queue_size: ${SSE_MAX_QUEUE_SIZE, 200} # Max size of SSE connection queues
# Queue Configuration
visualization_queue_size: ${VISUALIZATION_QUEUE_SIZE, 600}
task_logger_queue_size: ${TASK_LOGGER_QUEUE_SIZE, 600}
system_purpose: >
The system is an AI Chatbot with agentic capabilities.
It will use the agents available to provide information,
reasoning and general assistance for the users in this system.
**Always return useful artifacts and files that you create to the user.**
Provide a status update before each tool call.
Your external name is Agent Mesh.
response_format: >
Responses should be clear, concise, and professionally toned.
Format responses to the user in Markdown using appropriate formatting.
# --- Frontend Config Passthrough ---
frontend_welcome_message: ${FRONTEND_WELCOME_MESSAGE}
frontend_bot_name: ${FRONTEND_BOT_NAME}
frontend_collect_feedback: true
frontend_logo_url: "${WEBUI_FRONTEND_LOGO_URL}"
identity_service:
type: local_file
file_path: ./tests/integration/test_data/people/dummy_employees.json
cache_ttl_seconds: 300
task_logging:
enabled: true
hybrid_buffer:
enabled: false # Enable so events are buffered in RAM first
flush_threshold: 10 # Flush to DB after N events (lower for easier testing)
log_status_updates: true
log_artifact_events: true
log_file_parts: true
max_file_part_size_bytes: 10240
feedback_publishing:
enabled: true
topic: "${NAMESPACE}/sam/feedback/v1"
include_task_info: "stim" # Options: "none", "summary", "stim"
max_payload_size_bytes: 9000000 # 9MB default, safety margin below 10MB broker limit
# --- Frontend Feature Enablement ---
frontend_feature_enablement:
background_tasks: ${BACKGROUND_TASKS_ENABLED, true} # NOTE: task_logging must also be enabled for background tasks to work
auto_title_generation: ${AUTO_TITLE_GENERATION_ENABLED, true} # Enable automatic chat title generation
# --- Background Tasks Configuration ---
background_tasks:
default_timeout_ms: ${BACKGROUND_TASKS_TIMEOUT_MS, 3600000} # 1 hour default timeout
# # --- Speech Configuration (STT/TTS) ---
# # Uncomment the following sections to enable STT and TTS in the UI
# speech:
# # stt:
# # provider: openai
# # url: "https://api.openai.com/v1/audio/transcriptions"
# # api_key: "${OPENAI_API_KEY}"
# # model: "whisper-1"
# stt:
# provider: azure
# azure:
# api_key: "${AZURE_SPEECH_KEY}"
# region: "${AZURE_SPEECH_REGION}"
# language: en-US
# # Text-to-Speech Configuration
# tts:
# provider: ${TTS_PROVIDER, gemini} # "gemini", "azure", or "polly" (can be overridden by UI)
# polly:
# aws_access_key_id: ${AWS_ACCESS_KEY_ID}
# aws_secret_access_key: ${AWS_SECRET_ACCESS_KEY}
# region: ${AWS_POLLY_REGION}
# engine: neural # or 'standard'
# default_voice: Joanna
# # Azure Neural Voices Configuration (voices field defines the subset voices shown in the UI TTS settins)
# azure:
# api_key: "${AZURE_SPEECH_KEY}"
# region: "${AZURE_SPEECH_REGION}"
# default_voice: "en-US-Andrew:DragonHDLatestNeural"
# voices:
# # DragonHD Latest Neural Voices (Highest Quality)
# - "en-US-Ava:DragonHDLatestNeural"
# - "en-US-Ava3:DragonHDLatestNeural"
# - "en-US-Adam:DragonHDLatestNeural"
# - "en-US-Alloy:DragonHDLatestNeural"
# - "en-US-Andrew:DragonHDLatestNeural"
# - "en-US-Andrew2:DragonHDLatestNeural"
# - "en-US-Andrew3:DragonHDLatestNeural"
# - "en-US-Aria:DragonHDLatestNeural"
# - "en-US-Brian:DragonHDLatestNeural"
# - "en-US-Davis:DragonHDLatestNeural"
# - "en-US-Emma:DragonHDLatestNeural"
# - "en-US-Emma2:DragonHDLatestNeural"
# - "en-US-Jenny:DragonHDLatestNeural"
# - "en-US-MultiTalker-Ava-Andrew:DragonHDLatestNeural"
# - "en-US-Nova:DragonHDLatestNeural"
# - "en-US-Phoebe:DragonHDLatestNeural"
# - "en-US-Serena:DragonHDLatestNeural"
# - "en-US-Steffan:DragonHDLatestNeural"
# # Standard Neural Voices
# - "en-US-JennyNeural"
# - "en-US-GuyNeural"
# - "en-US-AriaNeural"
# - "en-US-DavisNeural"
# - "en-US-JaneNeural"
# - "en-US-JasonNeural"
# - "en-US-NancyNeural"
# - "en-US-TonyNeural"
# - "en-GB-LibbyNeural"
# - "en-GB-RyanNeural"
# - "en-GB-SoniaNeural"
# - "en-AU-NatashaNeural"
# - "en-AU-WilliamNeural"
# # Google Gemini Configuration (voices field defines the subset voices shown in the UI TTS settins)
# gemini:
# api_key: "${GEMINI_API_KEY}"
# model: "gemini-2.5-flash-preview-tts"
# default_voice: "Kore"
# language: "en-US"
# voices:
# - "Kore"
# - "Puck"
# - "Zephyr"
# - "Charon"
# - "Fenrir"
# - "Leda"
# - "Aoede"
# - "Callirhoe"
# - "Umbriel"
# - "Enceladus"
# - "Iapetus"
# - "Erinome"
# - "Algieba"
# - "Despina"
# - "Algenib"
# - "Achernar"
# - "Schedar"
# - "Gacrux"
# - "Pulcherrima"
# - "Achird"
# - "Zubenelgenubi"
# - "Vindemiatrix"
# - "Sadachbia"
# - "Sadaltager"
# - "Sulafat"
# - "Autonoe"
# - "Laomedeia"
# - "Orus"
# - "Rasalgethi"
# - "Alnilam"
# # Frontend Speech Tab Default Settings (optional)
# speechTab:
# advancedMode: false
# speechToText:
# speechToText: true
# engineSTT: "external" # Use external for better quality
# languageSTT: "en-US"
# textToSpeech:
# textToSpeech: true
# engineTTS: "external" # Use external for better quality
# voice: "Kore"
# playbackRate: 1.0
# cacheTTS: true
# # --- Data Retention Configuration ---
# # Automatic cleanup of old data (tasks, task events, feedback, and buffered SSE events to prevent unbounded database growth)
# data_retention:
# enabled: true
# # Granular cleanup control - enable/disable specific cleanup types
# cleanup_tasks: ${DATA_RETENTION_CLEANUP_TASKS, true}
# cleanup_feedback: ${DATA_RETENTION_CLEANUP_FEEDBACK, true}
# cleanup_sse_events: ${DATA_RETENTION_CLEANUP_SSE_EVENTS, true}
# # Retention periods
# task_retention_days: ${DATA_RETENTION_TASK_DAYS, 90} # Days to retain task records (default: 90, minimum: 7)
# feedback_retention_days: ${DATA_RETENTION_FEEDBACK_DAYS, 90} # Days to retain feedback records (default: 90, minimum: 7)
# sse_event_retention_days: ${DATA_RETENTION_SSE_EVENT_DAYS, 30} # SSE event buffer retention
# # Cleanup scheduling
# cleanup_interval_hours: ${DATA_RETENTION_CLEANUP_INTERVAL_HOURS, 24} # How often cleanup runs (default: 24, minimum: 1)
# batch_size: ${DATA_RETENTION_BATCH_SIZE, 1000} # Records deleted per transaction (default: 1000, range: 1-10000)