Every model runs on your hardware: Gemma 3 / Phi-4 language models through a llama.cpp sidecar, SAM2 for imagery segmentation, and YOLO-E for object detection in FMV and still imagery. Natural-language queries, segmentation masks, and georeferenced detections — with zero cloud AI calls, because the enclaves this platform serves don't have a cloud.
The C#/WPF host launches an embedded Python orchestrator (FastAPI) which in turn drives a llama.cpp server loading Gemma GGUF weights from local disk. Lazy-start by default: the sidecar only spins up when you first use AI.
%APPDATA%/VoltGrid/models/; an in-app downloader with progress fetches them once, or you copy them in by hand.VoltGrid (C#/WPF) └─ AiOrchestratorHost → sidecar :8004 ├─ /v1/chat → llama.cpp :8080 (Gemma GGUF) ├─ /nl2sql → NL → DuckDB SQL ├─ /embed → text → vector ├─ /rag/query → vector similarity search ├─ /segment → SAM2 on COGs └─ /health → liveness probe ● all inference local · no cloud AI calls
Language, segmentation, and detection each feed results back into the same map and DuckDB hub.
Gemma 3 / Phi-4 via llama.cpp answer geospatial questions in the AI Assistant panel — grounded in your local data, not a hosted API.
Type "show all tracks in the Cyan team" and the LLM drafts the DuckDB SQL with schema context — spatial predicates like ST_DWithin included.
Load a COG, mark an area, and SAM2 produces polygon boundaries rendered as GeoJSON overlays — building extraction, flood extent, vegetation mapping.
Zero-shot detection over the ArcGIS REST ImageServer: COG window → PNG → detect → geo-reference → FeatureSet, consumable by ArcGIS Maps SDK clients.
Frame-level detection in the FMV player, with each detection georeferenced via KLV telemetry, published as a CoT event, drawn on the blue-force overlay, and broadcast to TAK peers.
Build a vector index on any DuckDB text column, query for semantically similar rows, and enrich the chatbot's answers with retrieved context.
NL→SQL never executes blind: the generated DuckDB SQL fills the Query Builder editor where you review it, edit it, and click Run yourself. The model drafts; the human decides.
# status + per-feature availability GET /api/ai GET /api/ai/capabilities GET /api/ai/models → installed status POST /api/ai/models/download → SSE progress # inference POST /api/ai/chat POST /api/ai/nl2sql POST /api/ai/segment → SAM2 on a COG POST /api/ai/detect/cog → YOLO-E FeatureSet # sidecar down → 503 · app unaffected
The YOLO-E detection service runs as a separate container; NVIDIA GPU (CUDA 11.8+) is strongly recommended for usable FMV latency — CPU works but slowly. LLM answers and generated SQL are drafts and should be reviewed before use, which is exactly how the workflow is built.
Drop the weights on disk, flip on the sidecar, and get chat, NL→SQL, segmentation, and detection inside the COP — on hardware you control, on networks that never leave the room.