Understanding OffGrid AI ToolKit. From Simple to Technical
Imagine having a team of AI experts living on a flash drive in your pocket. That's OffGrid AI ToolKit. A complete artificial intelligence system that works entirely from a USB drive. No installation needed, no internet required, and most importantly, your conversations never leave your computer.
Using OffGrid AI is as easy as:
That's it! Within 30 seconds, you have powerful AI running completely offline. It's like having ChatGPT, but it lives on your USB drive and doesn't need the internet.
Your conversations, questions, and data stay on YOUR device. Nothing is sent to corporate servers, nothing is tracked, and there's no digital footprint. When you unplug the USB, it's like the AI was never there.
The toolkit includes different AI models you can switch between. Think of them as different specialists. Need quick answers? Use the 4B model. Need deep analysis? Switch to the 27B model. Have medical questions? There's MedGemma for that.
This isn't just a text chatbot. You can show it images from your phone's camera or computer, and it will analyze and describe what it sees. Perfect for identifying plants on a hike, getting help with technical diagrams, or analyzing medical images in remote locations.
We've included field-tested prompts for survival situations, medical emergencies, technical troubleshooting, and more. Just click any prompt to instantly use it. No typing required. Learn more about our prompt testing.
Connect your phone to the same WiFi as your computer, scan a QR code, and access the AI from your phone's browser. Your phone becomes the interface while your computer does the heavy lifting. All still private and off-grid.
Save up to 50 conversations directly to your USB drive. Name them, reload them later, and take them with you when switching computers. Your important chats are never left behind and always portable.
OffGrid AI ToolKit is perfect for anyone who values privacy and needs reliable AI access:
Discover more use cases on our website.
OffGrid AI ToolKit is true technological independence. It's AI that belongs to you, runs where you need it, and keeps your thoughts private. No accounts, no subscriptions, no surveillance. Just powerful AI that works anywhere you have a computer.
OffGrid AI represents a breakthrough in making powerful AI models truly portable and private. This section details the technical architecture, innovations, and engineering solutions that make it possible to run GPT-class AI entirely from a USB flash drive with zero installation and no internet connection.
USB Flash Drive (Any Letter:/)
├── OffGrid_AI_ToolKit/
│ ├── OffGridLauncher/
│ │ ├── dist/win-unpacked/ # Electron app (172MB compiled)
│ │ ├── main.js # Process orchestration
│ │ ├── preload.js # Security bridge
│ │ └── launcher.html # System UI
│ ├── Dashboard/
│ │ ├── index.html # Main chat interface
│ │ ├── saved_conversations.json # Portable conversation storage
│ │ ├── User_Guide/ # Hot-swappable MD docs
│ │ ├── Ready_Made_Prompts/ # Clickable prompt library
│ │ └── Model_Benchmarks/ # Live documentation
│ ├── Ollama_App/
│ │ └── ollama.exe # AI inference engine (port 11434)
│ ├── CaddyWS/
│ │ └── caddy.exe # Zero-config web server (port 8000)
│ └── Ollama/.ollama/models/ # 31GB of AI models
├── Gemma3 4B/12B/27B # Vision-capable models
└── MedGemma 4B # Medical specialist
The entire system fits on a 64GB USB 3.2 drive with 18.2GB free space remaining for user data and saved conversations.
The system automatically finds itself regardless of USB drive letter assignment:
function getBasePath() {
let currentDir = exeDir;
while (currentDir !== path.dirname(currentDir)) {
const testPath = path.join(currentDir, 'OffGrid_AI_ToolKit');
if (fs.existsSync(testPath)) return testPath;
currentDir = path.dirname(currentDir);
}
}
Why this matters: Users can plug the USB into any port, get any drive letter (E:/, F:/, G:/, etc.), and the system still works perfectly.
The cleverest hack in our system - using computer resources from your phone:
// Auto-generate QR code for instant mobile access
const detectNetworkIP = async () => {
const response = await fetch('/local_ip.txt');
const ip = await response.text();
return `http://${ip}:8000`;
};
new QRCode("qrcode", {
text: await detectNetworkIP(),
width: 128,
height: 128
});
A sophisticated ProcessManager class handles all system processes with multiple fallback strategies:
class ProcessManager {
// Multi-tier shutdown system
async terminateProcess(processName) {
// Step 1: Graceful termination
process.kill('SIGTERM');
// Step 2: Force kill by PID if still running
await this.forceKillProcess(pid);
// Step 3: Kill by name (cleanup any orphans)
await this.killProcessByName(processName);
}
// Dashboard shutdown detection via Caddy logs
if (logLine.includes('shutdown-signal=true')) {
this.initiateShutdown('dashboard-signal');
}
}
Result: Clean shutdown from any entry point - dashboard button, system tray, or launcher - with no orphaned processes.
Challenge: Ollama needs to recognize models without system installation.
Solution: Dynamic environment variable configuration:
process.env.OLLAMA_HOME = path.join(basePath, 'Ollama', '.ollama');
process.env.OLLAMA_MODELS = path.join(basePath, 'Ollama', '.ollama', 'models');
This ensures models are recognized in both development and production environments without any system registry entries.
We believe we created the first implementation of single-click prompt insertion from markdown documentation:
// Any <code> element in markdown becomes clickable
document.addEventListener('click', function(e) {
if (e.target.tagName === 'CODE' && e.target.closest('.markdown-content')) {
// Instantly copy to input field
document.getElementById('messageInput').value = e.target.textContent;
autoResize(document.getElementById('messageInput'));
// Visual feedback
e.target.style.background = '#10b981';
showNotification('✓ Copied & ready to send!');
}
});
Impact: 500+ ready-made prompts become instantly usable with a single click. No copy-paste needed.
All documentation lives as markdown files that can be edited without touching code:
const CONTENT_PATHS = {
'user-guide': '/User_Guide/user_guide.md',
'benchmarks': '/Model_Benchmarks/model-benchmarks.md',
'ready-prompts': '/Ready_Made_Prompts/ready_made_prompts.md'
};
async function loadExternalContent(contentId) {
const content = await fetch(CONTENT_PATHS[contentId]);
const markdown = await content.text();
const html = marked.parse(markdown);
addMarkdownMessage(html);
}
Benefits:
Mobile photos are automatically optimized before AI processing:
function resizeImage(file, maxWidth, maxHeight) {
// 12MP photo (4MB) → 200KB optimized
// 5-10x faster inference
canvas.toBlob(function(blob) {
const reader = new FileReader();
reader.onloadend = function() {
callback(reader.result);
};
reader.readAsDataURL(blob);
}, 'image/jpeg', 0.8);
}
Results:
Every conversation can be saved directly to the USB drive for true portability:
class ConversationManager {
saveConversation(title) {
// Save to USB drive for cross-computer access
const conversation = {
title: title,
messages: this.currentConversation,
timestamp: new Date().toISOString(),
model: currentModel
};
// Limit to 50 most recent conversations
if (this.savedConversations.length >= 50) {
this.savedConversations.shift();
}
this.savedConversations.push(conversation);
this.saveToDisk(); // Write to saved_conversations.json
}
}
Features:
| Model | Response Time | RAM Required | Best For |
|---|---|---|---|
| Gemma3-4b | 30-90 seconds | 6-8GB | Quick queries, basic tasks |
| Gemma3-12b | 2-3 minutes | 12-16GB | Complex analysis, better accuracy |
| Gemma3-27b | ~10 minutes | 32GB+ | Maximum intelligence, deep thinking |
| MedGemma-4b | 30-90 seconds | 6-8GB | Medical queries (text only) |
Note: Response times are for complete answers running from USB 3.2. Times may vary based on query complexity and system resources. See detailed model benchmarks on our website.
| Resource | Usage | Notes |
|---|---|---|
| Idle RAM | < 100MB | Just launcher running |
| Active RAM (4B) | 4-6GB | Lightweight model |
| Active RAM (27B) | 24-32GB | Full intelligence |
| CPU Usage | Variable | Scales with model size |
| GPU | Optional | CPU-only inference works |
| Storage | 31GB | All models included |
| Free Space | 18.2GB | Available for user data |
Our executable is signed with a DigiCert certificate, ensuring:
Solution: Electron app with embedded Ollama + dynamic environment variables
// Set paths at runtime, not install time
process.env.OLLAMA_HOME = path.join(basePath, 'Ollama', '.ollama');
process.env.OLLAMA_MODELS = path.join(basePath, 'Ollama', '.ollama', 'models');
Solution: Caddy single executable with zero configuration needed
caddy.exe file-server --root Dashboard --listen :8000
Solution: Preload script bridges renderer to main process
contextBridge.exposeInMainWorld('electronAPI', {
shutdown: () => ipcRenderer.invoke('shutdown-request'),
getProcessStatus: () => ipcRenderer.invoke('process-status'),
saveConversations: (data) => ipcRenderer.invoke('save-conversations', data),
loadConversations: () => ipcRenderer.invoke('load-conversations')
});
Solution: Multi-strategy IP detection
// Strategy 1: Write IP to file for dashboard access
fs.writeFileSync('local_ip.txt', localIP);
// Strategy 2: QR code generation for mobile
new QRCode(element, `http://${localIP}:8000`);
// Strategy 3: Display in launcher for manual entry
document.getElementById('mobileSpec').textContent = localIP;
Solution: Automatic firewall rule configuration
netsh advfirewall firewall add rule name="OffGrid AI - Port 8000"
dir=in action=allow protocol=TCP localport=8000
// Ctrl+Shift+M reveals developer tools
mainWindow.webContents.on('before-input-event', (event, input) => {
if (input.control && input.shift && input.key === 'M') {
Menu.setApplicationMenu(createDeveloperMenu());
}
});
try {
const response = await fetch('/local_ip.txt');
const ip = await response.text();
} catch {
// Fallback to manual IP entry
mobileUrl = 'Enter IP manually';
}
What Worked Better Than Expected:
What Required Creative Solutions:
Special thanks to the entire open source community. Your commitment to free and open software made it possible to take a dream and turn it into reality. This is what happens when brilliant minds share their work freely. Together we build the future we want to see.
The code demonstrates that powerful software doesn't require:
Build on this work. Fork it. Improve it. Keep AI free.
Internet connection required for these links
OffGrid AI proves that powerful, private AI is possible without compromise. By combining existing tools in novel ways and adding key innovations (click-to-prompt, hot-swappable docs, process orchestration), we've created something that shouldn't exist: GPT-class AI that runs from a thumb drive.
This isn't just a product. It's a demonstration of what's possible when developers prioritize user sovereignty over corporate convenience. The techniques shown here can be applied to any software that currently requires cloud connectivity.
The future of computing is local, private, and portable. And being ready.
OffGrid AI ToolKit - Because your thoughts belong to you.
Version 1.0.0 | January 2025
OffGrid AI ToolKit, LLC | Arizona, USA