惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
美团技术团队
Recent Announcements
Recent Announcements
B
Blog
GbyAI
GbyAI
雷峰网
雷峰网
博客园_首页
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Tailwind CSS Blog
M
MIT News - Artificial intelligence
V
V2EX
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
L
LangChain Blog
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
A
About on SuperTechFans
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
Hugging Face - Blog
Hugging Face - Blog
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
Last Week in AI
Last Week in AI
aimingoo的专栏
aimingoo的专栏

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I Built a Private AI Assistant That Runs 100% Locally — N...
David Simões · 2026-05-13 · via DEV Community

David Simões

Every time I used ChatGPT or similar tools the same thought crossed my mind:

"Where is this conversation going? Who has access to it? What are they doing with my data?"

So I decided to build my own solution. Meet CrustAI 🦀 — a fully private, self-hosted AI assistant that runs entirely on your own machine.

No cloud. No subscriptions. No data leaving your computer. Ever.

🌐 Documentation | ⭐ GitHub


The Problem I Wanted to Solve

Most AI assistants have one fundamental issue — your data belongs to someone else.

When you ask ChatGPT something personal, that conversation is:

  • Stored on OpenAI's servers
  • Potentially used to train future models
  • Subject to their privacy policy (which can change)
  • Accessible in case of a data breach

I wanted an AI assistant that was genuinely mine — one that I could use daily through apps I already use (Telegram, WhatsApp) without worrying about privacy.


What is CrustAI?

CrustAI is a self-hosted AI assistant powered by Ollama that connects to your favorite messaging platforms and runs completely offline after setup.

Key features:

  • 🔒 100% Private — all processing happens on your hardware
  • 🧠 Local LLM — powered by Ollama (llama3.2, tinyllama, phi3, mistral...)
  • 📱 Multi-platform — Telegram, WhatsApp, Discord and Slack
  • 🧬 Long-term memory — remembers facts across conversations
  • 🗣️ Offline voice — speech-to-text and text-to-speech (pt-BR)
  • REST API — built-in Fastify server for custom integrations
  • 🎭 Custom personality — fully configurable assistant behavior

Tech Stack

Technology Purpose
Node.js Runtime environment
Ollama Local LLM inference engine
node-telegram-bot-api Telegram integration
@whiskeysockets/baileys WhatsApp integration
discord.js Discord integration
@slack/bolt Slack integration
Fastify REST API server
sql.js Embedded SQLite for memory
yaml Configuration management

Architecture Overview

The architecture is straightforward — a central message handler receives messages from any platform and routes them through the same pipeline:

┌─────────────────────────────────────────────────────┐
│                     CrustAI Core                     │
│                                                      │
│  ┌──────────┐  ┌──────────┐  ┌──────────────────┐  │
│  │ Telegram │  │ Discord  │  │     WhatsApp     │  │
│  │  Adapter │  │  Adapter │  │      Adapter     │  │
│  └────┬─────┘  └────┬─────┘  └────────┬─────────┘  │
│       └──────────────┼──────────────────┘            │
│                      ▼                               │
│            ┌─────────────────┐                      │
│            │  Message Handler │                      │
│            └────────┬────────┘                      │
│         ┌───────────┼───────────┐                   │
│         ▼           ▼           ▼                   │
│    ┌─────────┐ ┌────────┐ ┌──────────┐             │
│    │  Ollama │ │ Memory │ │ REST API │             │
│    │  (LLM)  │ │  Store │ │  Server  │             │
│    └─────────┘ └────────┘ └──────────┘             │
└─────────────────────────────────────────────────────┘

Enter fullscreen mode Exit fullscreen mode

Each platform adapter is independent — you enable only what you need in config.yml.


Getting Started in 5 Steps

Prerequisites

Step 1 — Clone the repository

git clone https://github.com/DaveSimoes/CrustAI.git
cd CrustAI

Enter fullscreen mode Exit fullscreen mode

Step 2 — Install dependencies

npm install

Enter fullscreen mode Exit fullscreen mode

Step 3 — Start Ollama and pull a model

# Start the Ollama server (keep this terminal open)
ollama serve

# In a new terminal — pull a lightweight model
ollama pull tinyllama   # 600MB — works on modest hardware
# or
ollama pull llama3.2    # 2GB — needs ~8GB RAM

Enter fullscreen mode Exit fullscreen mode

Step 4 — Configure the project

cp config/config.example.yml config/config.yml

Enter fullscreen mode Exit fullscreen mode

Edit config/config.yml:

model: tinyllama
ollama_url: http://localhost:11434
language: pt-BR

telegram:
  enabled: true
  token: YOUR_BOT_TOKEN_HERE
  allowed_user_ids: []

Enter fullscreen mode Exit fullscreen mode

Step 5 — Launch CrustAI!

npm start

Enter fullscreen mode Exit fullscreen mode

Expected output:

✓ Ollama connected     (tinyllama)
✓ Memory store ready   (./data/memory.db)
✓ Telegram ready
✓ REST API ready       (http://localhost:3000)

🦀 CrustAI is ready. Your shell awaits.

Enter fullscreen mode Exit fullscreen mode


Available Commands

Once running, use these commands directly in Telegram (or any connected platform):

Command Description
/ping Check if the bot is alive
/help Show all commands
/model Show which AI model is running
/remember <fact> Store a fact in long-term memory
/forget Erase all stored facts
/clear Clear conversation history

The Privacy-First Philosophy

CrustAI was built with privacy as its core principle, not an afterthought:

✅ All conversations processed locally — nothing leaves your hardware
✅ No calls to OpenAI, Anthropic, Google or any cloud AI service
✅ No telemetry or usage tracking
✅ Open source — audit every single line of code
✅ MIT license — use it however you want


Running on Modest Hardware

One concern I had was performance. I'm running CrustAI with tinyllama on a machine with limited RAM and it handles daily conversations well.

For basic Q&A and conversation, tinyllama is surprisingly capable. If you have more resources, llama3.2 or phi3 give significantly better results.


What's Next — Roadmap

  • [ ] Web UI dashboard
  • [ ] Image understanding (multimodal LLMs)
  • [ ] Plugin system for custom tools
  • [ ] Docker one-click deployment
  • [ ] Mobile app companion

Contribute!

CrustAI is open source and I'd love contributions from the community:

  • 🐛 Bug reports — open an issue
  • 💡 Feature ideas — let's discuss in issues
  • 🔧 Pull requests — always welcome
  • Star the repo — helps others discover it!

GitHub: https://github.com/DaveSimoes/CrustAI
Documentation: https://documentcrustai.netlify.app


Final Thoughts

Building CrustAI taught me a lot about local LLM inference, multi-platform bot development, and the real meaning of privacy-first software.

If you're tired of sending your conversations to the cloud, give CrustAI a try. Your data deserves to stay yours.

Made with 🦀 and ❤️ by Dave Simoes


If you found this useful, consider starring the repo and sharing with others who care about privacy!