# Repository Briefing: off-grid-ai/OGAM
> Source: https://repoforai.com/repo/off-grid-ai/OGAM (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/off-grid-ai/OGAM
- **Official Docs / Website**: https://x.com/getoffgridai
- **Category**: Chat UI & AI Apps (聊天界面与 AI 应用)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (94/100 · Maintenance 35/35 · Adoption 19/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.0.129 (2026-12-02) — https://github.com/off-grid-ai/OGAM/releases
- **Review Snapshot**: 2026-12-02 (Note: v0.0.129 on 2026-12-02 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: Local AI, Self-Hosted, GPU
- **Momentum**: 3,746 ★ total (+3 24h / +101 7d) · 379 forks
- **Topics**: `android`, `edge-ai`, `gguf`, `ios`, `llama-cpp`, `local-ai`, `macos`, `mcp`, `mobile-ai`, `offline-ai`, `offline-llm`, `ondevice`
- **When to Use**: Best for: Mobile and Apple Silicon Mac users who want offline chat, document retrieval, and media tools, with the option to use a model server on their own LAN. Skip if: You want a managed ChatGPT-style service, a headless inference server, or predictable large-model performance without testing the actual device and quantization.

## Overview
```text
### Architecture & Core Mechanics
OGAM is a TypeScript/React Native end-user app with React entrypoints in index.js and App.tsx and separate android/, ios/, and native/ trees. The on-device path runs GGUF models through a llama.cpp-based stack, with CPU execution and hardware backends selected for the device. Project retrieval is a separate local pipeline: documents are chunked, embedded with bundled MiniLM, stored in SQLite, and ranked by cosine similarity. The manifest includes @offgrid/rag and @op-engineering/op-sqlite.

The remote path makes OGAM a client of an OpenAI-compatible server rather than a server deployment of its own. It supports model discovery, SSE response streaming, and system-keychain storage for API keys. Tool calling depends on model support: built-ins run in a loop with runaway prevention, while MCP is an integration protocol for connected services, reflected in the @modelcontextprotocol/sdk dependency. Remote inference and external tool calls are distinct from the local inference path and have different data boundaries.

### Key Capabilities & Differentiators
The chat path supports streaming text, thinking mode, Markdown rendering, and imported GGUF weights, with Qwen 3, Llama 3.2, Gemma 3, and Phi-4 among the listed families. Beyond chat, OGAM supports vision, Whisper transcription, and on-device Stable Diffusion with live previews. Diffusion uses Core ML on iOS and can use Snapdragon NPU acceleration. Project conversations automatically expose search_knowledge_base to function-calling models, so document retrieval can be invoked from the conversation.

Performance examples from Snapdragon 8 Gen 2/3 and Apple A17 Pro testing list flagship CPU text generation at 15–30 tokens/s and mid-range CPU generation at 5–15 tokens/s. The flagship Adreno OpenCL example is 20–40 tokens/s, and Snapdragon NPU image generation is listed at 5–10 seconds. These are reference figures, not guarantees for arbitrary weights or workloads. Model size and quantization affect results, and a backend that accelerates text generation does not necessarily accelerate the media pipelines.

### Trade-offs & Limitations
Compared with ChatGPT, OGAM lets users choose between keeping inference on the device and sending it to a server they operate. That control is useful offline and for sensitive material, but the operator takes on model selection, weight storage, compatibility testing, and device sizing. Compared with Ollama or LM Studio, OGAM is primarily a mobile interface and local runtime, not a replacement for the model server when inference is offloaded. Web search, remote inference, and connected services should not be treated as part of an offline-only workflow; analytics and crash reporting are opt-in.

Backend support matters as much as nominal device capacity. Experimental Hexagon acceleration is limited to Q4_0 and Q8_0; K-quants silently fall back to CPU on that backend, and some architectures can produce garbled output. Verify both output quality and throughput on the exact device and quantization you intend to use. The code is MIT-licensed, but check weight licenses independently and account for the optional Pro tier if you need spoken replies, custom personas, approval-gated actions, or Personal Mesh sync.

### Hardware & Deployment Guide
Android users can install the release APK; Apple Silicon Mac users can run the distributed iOS app through the Catalyst/iPad compatibility route. Source builds require Node.js 20+, with JDK 17 and Android SDK 36 on Android and CocoaPods setup on iOS. The general iOS build guidance lists Xcode 15+, but v0.0.128-beta.1 moves iOS builds to Xcode 26 because its Background Assets downloader extension requires the iOS 26 SDK. Match the toolchain to the tag you build.

With model assets on the device, core inference can run without a hosted API. For self-hosted inference, run Ollama, LM Studio, LocalAI, or another compatible server separately on the LAN; OGAM connects as a client. Stable v0.0.127 adds checks around image and video generation, including blurred video previews pending review. The subsequent v0.0.128-beta.2 improves the remote model picker by indicating image, tool, and thinking capabilities.
```

## Key Capabilities
```text
- Model portability: Import your own .gguf files and switch between device inference and an OpenAI-compatible LAN server.
- Acceleration: Use Adreno OpenCL or Apple Metal where supported; experimental Hexagon offload is limited to Q4_0 and Q8_0.
- Document retrieval: Chunk PDFs and text files, embed them with bundled MiniLM, and search project-local SQLite data by cosine similarity.
- Media pipelines: Combine image-aware chat and Whisper transcription with Stable Diffusion using Core ML on iOS or Snapdragon NPU acceleration.
- Tool controls: Function-calling models can invoke built-in tools through a bounded loop; Pro drafts supported external actions for user approval.
- Personal sync: Pro Personal Mesh syncs chats, files, and settings over the user’s own network without a relay.
```

## Quick Start / Clone
```bash
git clone https://github.com/off-grid-ai/OGAM.git
cd OGAM
npm install

# Android
cd android && ./gradlew clean && cd ..
npm run android

# iOS
cd ios && pod install && cd ..
npm run ios
```
