A Rust-based local-first AI assistant with persistent memory, autonomous task execution, and kernel-level sandbox security, supporting multiple LLM providers and interfaces.
Overview#
LocalGPT is a local device focused AI assistant built in Rust and delivered as a single binary. Install via cargo install localgpt without needing Node.js, Docker, or Python. Supports Linux, macOS, Windows desktop GUI, and Docker/server headless deployment.
Core Features#
Persistent Memory: Markdown-based knowledge storage with MEMORY.md (long-term knowledge), HEARTBEAT.md (autonomous task queue), and SOUL.md (personality & behavior guidance). Combines SQLite FTS5 full-text search with sqlite-vec + fastembed local embeddings for semantic retrieval.
Autonomous Execution: Daemon mode periodically reads HEARTBEAT.md for background tasks with configurable active hours.
Hybrid Web Search: Native provider search passthrough with client-side fallback.
Security Design#
Multi-layered protection architecture:
- Kernel-level Sandbox: Landlock LSM + seccomp-bpf on Linux, Seatbelt (SBPL) on macOS, rlimits on all platforms (120s timeout, 1MB output limit, 50MB file limit, 64 process limit)
- Policy Signing: LocalGPT.md signed with HMAC-SHA256 to prevent AI self-modification
- Prompt Injection Defense: Tag stripping, pattern detection, content boundaries, protected file blocking
- Audit Chain: All security events logged to append-only, hash-chained audit files
LLM Provider Support#
Supports Anthropic (Claude CLI + API), OpenAI, xAI (Grok), Ollama, GLM (Z.AI), and local OpenAI-compatible servers (LM Studio, llamafile, vLLM). OAuth support for Claude Pro/Max and Gemini subscriptions to avoid pay-per-use.
Interface Support#
CLI, Web UI, desktop GUI (eframe/egui), and Telegram bot. Additional localgpt-gen (Bevy engine) for generating explorable 3D worlds. Discord/WhatsApp bridge integration available.
Use Cases#
- Personal knowledge management and long-term memory storage
- Periodic tasks, reminders, and knowledge organization
- Security-sensitive or offline AI assistance
- Workflow integration via Telegram/Discord/WhatsApp bridges
Quick Start#
cargo install localgpt # Install
localgpt config init # Initialize config
localgpt chat # Interactive chat
localgpt daemon start # Start daemon
Workspace Layout#
<data_dir>/workspace/
├── MEMORY.md # Long-term knowledge
├── HEARTBEAT.md # Autonomous task queue
├── SOUL.md # Personality guidance
└── knowledge/ # Structured knowledge base
License: Apache-2.0