Booting a fully functional AI workstation from a USB stick without touching the host system sounds like a niche dream. Yet, the pai project distills this idea into a practical reality: a Debian 12 live USB operating system that runs entirely in RAM, ships with Ollama for local large language model inference, and layers in privacy protections like MAC spoofing, a firewall, and Tor. It’s a minimal, amnesic environment designed for offline AI experimentation and privacy-conscious workflows.
what pai does and how it’s built
pai is a bootable live USB OS based on Debian 12 that aims to provide a portable, offline AI workstation. The whole system runs in RAM, avoiding disk writes on the host machine to maintain amnesia — akin to the Tails OS philosophy but focused on AI workloads.
Under the hood, pai integrates the Ollama local LLM inference engine with the Sway window manager as its desktop environment, striking a balance between lightweight and functional. The networking stack is hardened for privacy, featuring MAC address spoofing, the UFW firewall, and built-in Tor integration to anonymize traffic.
The project uses Debian live-build tooling combined with Docker to automate building the ISO images. The output is a minimal ISO of about 912 MB with around 20 core packages, including Sway, Firefox, Ollama, and networking utilities. There is also a “full” build option that adds over 100 packages but requires more disk space.
The minimal ISO boots in under 30 seconds on typical x86_64 machines and runs comfortably with 4 GB of RAM, leaving about 1.5 GB free for AI inference tasks. The disk space requirements for persistent storage or downloading AI models are 32 GB for the minimal build and 64 GB+ for the full build.
technical strengths and design tradeoffs
pai’s key strength lies in its amnesic design combined with local AI capabilities. Running entirely in RAM means no trace is left on the host machine’s storage, which is crucial for privacy-focused users. This design is not trivial — it demands careful selection and trimming of packages to fit AI workloads into a minimal, fast-booting ISO.
The choice of Sway as the desktop environment is pragmatic: it is lightweight, Wayland-based, and fits well with the minimal Debian live environment. This keeps the footprint low and reduces attack surface compared to heavier DEs.
The integration of Ollama for local LLM inference is the core AI feature. Ollama abstracts away complex model management, providing a unified CLI and API interface for running language models locally. By embedding it into the live OS, pai offers a fully offline AI experience, which is rare in this space.
Networking privacy is taken seriously. MAC spoofing obscures the hardware identity on networks, the UFW firewall restricts unwanted traffic, and Tor integration anonymizes network connections. These features mirror Tails’ approach but are combined here with AI workload capabilities.
The tradeoff is clear: running entirely in RAM with no persistent storage by default limits long-term data retention and model downloads unless you allocate disk space explicitly. The minimal ISO’s 912 MB size also means only essential packages are included, which might require users to build the full ISO or install additional packages for more complex workflows.
Building the ISO relies on Docker with --privileged mode and requires a sizable disk (32 GB minimum for minimal) and some patience (~10 minutes build time). The Docker-driven build process is a smart choice for reproducibility and automation, though it adds a layer of complexity.
quick start
Requirements
- USB drive: 2 GB minimum (8 GB+ recommended for downloading models)
- Target machine: x86_64 (Intel or AMD, 64-bit)
- RAM: 2 GB minimum, 4 GB+ recommended for AI inference
Prerequisites
- Docker (with
--privilegedsupport) - 32 GB disk space (minimal build) or 64 GB+ (full build)
- ~10 minutes build time (minimal)
docker build -f Dockerfile.build -t pai-builder .
This command builds the Docker image that automates the Debian live-build process for pai. From there, the documentation and scripts in the repo will guide you through generating the ISO and flashing it to a USB drive.
verdict
pai is a niche but compelling project for anyone needing a portable, privacy-first Linux environment optimized for offline AI model inference. Its amnesic design, combined with Ollama and privacy-hardening, targets users who want local AI capabilities without sacrificing anonymity or leaving traces.
The tradeoffs around RAM usage, disk space for models, and limited package set in the minimal build are worth understanding upfront. It’s not for casual users or those wanting a full desktop OS but for AI practitioners and privacy-conscious developers who value a clean, reproducible environment.
If you want to experiment with local LLMs in a live USB OS that boots fast, leaves no trace, and has privacy by design, pai is worth exploring. The build process is straightforward if you’re comfortable with Docker and Debian live-build tooling. Overall, it shows how to strip down a desktop OS to a pocket-sized AI workstation without losing essential privacy features.
Related Articles
- PAI-OpenCode: modular multi-agent AI infrastructure with smart model routing — PAI-OpenCode offers a modular AI infrastructure with 16 specialized agents and smart model routing across 75+ providers,
- Ollama: a unified CLI and API platform for local large language models — Ollama simplifies running and managing open-source large language models locally with a unified CLI and REST API, suppor
- Building private AI workflows with the n8n self-hosted AI starter kit — Spin up a private AI agent stack in under 5 minutes with n8n’s self-hosted AI starter kit. Combines local LLMs, automati
- PycoClaw: Running full OpenClaw AI agents on $5 ESP32 microcontrollers with MicroPython — PycoClaw ports OpenClaw AI agents to MicroPython, enabling full conversational agents on $5 ESP32 chips with 8MB+ flash
- Be More Agent: offline-first conversational AI on Raspberry Pi with hardware-aware audio handling — Be More Agent is an offline-first conversational AI framework for Raspberry Pi, combining local LLM inference with hardw
→ GitHub Repo: nirholas/PAI ⭐ 96 · Shell