mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-06 22:32:39 +02:00
1.7 KiB
1.7 KiB
Multi-Agent Architecture Phase 1 Runbook
Scope
This runbook covers mode selection and emergency rollback for:
single_agentshadow_multi_agent_v1multi_agent_v1
Phase 1 keeps execution behavior on the current single-agent path while mode wiring and telemetry are introduced.
Resolution Priority
Mode resolution follows this fixed order:
- Global kill switch (
FORCE_SINGLE_AGENT) - Request override (
architecture_modein chat payload) - System default (
AGENT_ARCHITECTURE_MODE) - Safe fallback (
single_agent)
Configuration
Set environment values in backend runtime:
AGENT_ARCHITECTURE_MODE=single_agent(default)FORCE_SINGLE_AGENT=FALSE(default)
Changes require backend restart because config is loaded at process startup.
Mode Switching
System default switch
- Set
AGENT_ARCHITECTURE_MODEto desired value. - Keep
FORCE_SINGLE_AGENT=FALSE. - Restart backend.
- Verify logs include
[architecture_telemetry]with expectedarchitecture_mode.
Per-request override
Send optional architecture_mode in chat request payload:
"single_agent""shadow_multi_agent_v1""multi_agent_v1"
If FORCE_SINGLE_AGENT=TRUE, request override is ignored by design.
Emergency Rollback
Use the kill switch:
- Set
FORCE_SINGLE_AGENT=TRUE. - Restart backend.
- Verify new requests log
architecture_mode=single_agent. - Keep this state until incident is resolved.
Verification Checklist
- Mode resolves according to the priority order.
- Kill switch overrides all request/default values.
- Streaming response schema remains unchanged.
- Architecture telemetry is emitted with:
architecture_modeorchestrator_usedworker_countretry_countlatency_mstoken_total