Sightglass is an open-source, local-first agentic control plane designed for high-stakes field operations (HVAC, plumbing, electrical).
Most AI wrappers act as black boxes, exposing businesses to cloud latency, data leakage, and hallucinated purchase orders. Sightglass solves this by making the invisible engineering visible. It executes complex, multi-step LLM reasoning entirely on local hardware and streams the live LangGraph state transitions directly to a split-screen dashboard via Server-Sent Events (SSE).
- Split-Screen Observability: A Next.js dual-pane dashboard. The Business Pane handles dispatcher logic, while the Engineering Pane visualizes the LangGraph state machine in real-time using React Flow.
- Air-Gapped Inference: LLM extraction and reasoning are powered entirely by local models (
llama3.1:8b) via Ollama, ensuring 0% data leakage and zero API token costs. - Stateful Human-in-the-Loop (HITL): Built on LangGraph
MemorySaver. When an agent proposes a high-risk action (e.g., ordering a part over $500), the graph automatically pauses execution, persists its state to memory, and awaits an asynchronous webhook approval from a human dispatcher before resuming. - Streaming Asynchronous Architecture: Utilizes FastAPI's
StreamingResponseto push LangGraphastream_eventsto the frontend, eliminating UI blocking during heavy LLM inference.
graph LR
subgraph Edge ["Field Edge (PWA)"]
Tech["Technician Input"]
DB[("IndexedDB")]
Tech --> DB
end
subgraph ControlPlane ["Control Plane (FastAPI)"]
API["REST API"]
Graph["LangGraph State Machine"]
API --> Graph
end
subgraph Compute ["Local Compute"]
Ollama["Ollama / RTX 4060"]
Graph --> Ollama
end
subgraph Frontend ["Sightglass Dashboard"]
BizPane["Business Pane (Next.js / Shadcn)"]
EngPane["Engineering Pane (React Flow)"]
end
DB -- "Sync /api/sync" --> API
Graph -- "SSE Stream" --> BizPane
Graph -- "SSE Stream" --> EngPane
EngPane -. "Human Interrupt (/api/resume)" .-> API
- AI & Orchestration: LangGraph, LangChain Core, Ollama (Llama 3.1 8B), Pydantic (Structured Outputs).
- Backend: Python, FastAPI, Uvicorn, Server-Sent Events (SSE).
- Frontend: Next.js (App Router), TypeScript, Tailwind CSS, Shadcn UI, React Flow.
Intake: Synchronously parses messy, unstructured field tickets into a strict JSON schema using a local LLM.Inventory: Queries a mock SQL warehouse for part availability and cost.Routing (Edge): Evaluates business logic. Ifcost > $500, routes toHITL. Otherwise, routes toEND.HITL: Checkpoints the graph state to memory and suspends execution until the frontend issues a/api/resumePOST request.
Sightglass is designed to run on consumer-grade hardware (e.g., an NVIDIA RTX 4060) without requiring enterprise cloud budgets.
- Python 3.10+
- Node.js 18+
- Ollama installed and serving
llama3.1:8blocally athttp://localhost:11434.
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8000
cd frontend
npm install
npm run dev
Open http://localhost:3000 in your browser. Submit a mock field ticket on the left pane. Watch the engineering pane map the live node transitions. If you request an expensive part (like a Compressor), watch the graph pause at the risk gate until you click Approve Order.