Skip to content

Chowki

Chowki is an offline-first AI-powered trail safety network that transforms traditional forest checkpoints into intelligent autonomous ranger stations.

Core trick

Bluetooth store-carry-forward relays hiker check-ins and hazard reports between booths, with a local Gemma model triaging them offline.

Tags

Description

Chowki is an offline-first AI-powered trail safety network that transforms traditional forest checkpoints into intelligent autonomous ranger stations. Using on-device Gemma AI, Bluetooth-based store-carry-forward networking, and a LoRa-inspired emergency mesh, Chowki enables trekker tracking, hazard reporting, and emergency coordination without internet connectivity. At the ranger station, iAPI Managed Agents orchestrate triage, communication, and weather analysis to support explainable, multi-step decision-making for search and rescue operations in remote areas.
nikhilcherry/chowki-brain★ 00 forksTypeScriptMITCreated Jul 11, 2026 · last push Aug 19, 2026

README excerpt

# chowki-brain

<p align="center">
  <img alt="node" src="https://img.shields.io/badge/node-%3E%3D18-339933">
  <img alt="model" src="https://img.shields.io/badge/LLM-Gemma_4_via_Ollama-4285F4">
  <img alt="license" src="https://img.shields.io/badge/license-MIT-green">
</p>

A TypeScript library + CLI wrapping a local Gemma 4 model (served by [Ollama](https://ollama.com)) to power decision-making for `chowki` — a delay-tolerant mesh network for mountain trail booths. This is the only tool in the system that talks to the model.

## System Architecture & Visual Flow

```mermaid
graph TD
    subgraph Users & Hardware
        A[Booth Operator / Sensors] -->|Messy Reports / Hiker Checkins| B(Chowki Booth)
    end

    subgraph local_brain [chowki-brain]
        B -->|Invokes Library / CLI| C{chowki-brain}
        C -->|1. parseReport| D[parseReport]
        C -->|2. judgeOverdue| E[judgeOverdue]
        C -->|3. routeBundle| F[routeBundle]
        C -->|4. compressForLora| G[compressForLora]
    end

    subgraph LLM_Service [Ollama Local Server]
        D & E & F & G -->|Structured Prompt| H[Gemma 4 model]
        H -->|JSON + Reasoning| D & E & F & G
    end

    subgraph Outputs
        D -->|Structured Incident JSON| I[Incident Record]
        E -->|Ok / Watch / Escalate| J[Hiker Status Alert]
        F -->|Carrier Selection & Replication| K[Routing Plan]
        G -->|Compressed <200B LoRa Packet| L[LoRa Payload]
    end
```

## Decision Loop Sequence

```mermaid
sequenceDiag

Team