Logical architecture
Experience plane
Flutter live call · officer portal · administration
↓ WebRTC / HTTPS
Media plane
LiveKit SFU · TURN/TLS · room auth · network telemetry
↓ audio events / selected video evidence
Realtime agent plane
streaming STT/TTS · interruption · frame sampler · camera guidance
↓ durable case commands
Application and reasoning plane
case service · reasoning agent · tool loop · notifications
├── model gateway
├── hierarchical retrieval / research
├── weather / soil / terrain / field history
├── exact policy verification
└── human review / live join coordinator
Data and governance plane
PostgreSQL/PostGIS · object storage · audit · analyticsLive media plane
- LiveKit handles rooms, participants, audio/video tracks, adaptive subscription, TURN and connection telemetry.
- Agent workers subscribe to audio continuously and video according to sampling policy.
- Full-resolution diagnostic stills use a separate authenticated capture/upload path.
- Officer join uses the same room and role-scoped tokens.
- Recording/egress is disabled unless a purpose-specific policy enables it.
Scaling domains
Scale independently: SFU/TURN nodes, realtime agent workers, STT connections, TTS streams, video samplers, reasoning calls, research jobs, retrieval, PostgreSQL, object storage and officer operations.
Provider gateway
All STT, TTS, reasoning, vision, embedding and search calls pass through internal adapters that manage model version, redaction, selected-frame limits, schema validation, timeouts, quotas, cost and fallback.
Target options
| Capability | Preferred | Conditional alternative |
|---|---|---|
| Mobile | Flutter | Native Android if device evidence requires |
| Live media | LiveKit | Approved WebRTC SFU equivalent |
| Reasoning | GPT-5.6 Sol / provider-neutral gateway | Approved frontier or sovereign model |
| Workflow | Application state; LangGraph for complex durable HITL | Custom durable workflow |
| Database | PostgreSQL/PostGIS | Managed equivalent |
| Vector | pgvector initially | Qdrant at scale |
| Events | PostgreSQL outbox/worker | Kafka/Redpanda at scale |
| Storage | S3-compatible government-controlled store | Approved managed object storage |