100% Private Β· Runs Locally Β· Multi-Platform Β· Zero Cloud
Chat with your own AI on Telegram, Discord, WhatsApp, and Slack β no data ever leaves your machine.
git clone https://github.com/DaveSimoes/CrustAI.git
cd CrustAI && npm install && npm startEvery AI assistant you use today sends your conversations to a cloud server. Your questions, your context, your data β all stored externally.
CrustAI is different. It runs entirely on your own machine using Ollama, meaning:
| Without CrustAI | With CrustAI |
|---|---|
| Conversations logged on cloud servers | Conversations stay on your machine |
| Data used to train external models | Zero data collection, ever |
| Requires paid API keys | 100% free, uses local models |
| One platform (e.g., only ChatGPT web) | Works on Telegram, Discord, WhatsApp, Slack |
| Internet required | Works fully offline |
| π 100% Private | Every message stays on your device. No telemetry, no external APIs, no logs |
| π§ Powered by Ollama | Use llama3.2, mistral, phi3, tinyllama and any model you choose |
| π± 4 Platforms, 1 Bot | Connect to Telegram, Discord, WhatsApp, and Slack simultaneously |
| 𧬠Long-Term Memory | Your assistant remembers facts about you across sessions |
| π£οΈ Voice Support | Speak and listen β fully offline voice mode (pt-BR) |
| β‘ REST API | Integrate CrustAI into your own tools and workflows |
| π Personality Config | Give your assistant a custom name, tone, and identity |
| π³ Docker Ready | One-command deployment for servers and home labs |
| π Bilingual | Full English + Portuguese support out of the box |
- Node.js β₯ 20.0
- Ollama installed and running
- A platform token (e.g., Telegram Bot Token from @BotFather)
# 1. Clone the repository
git clone https://github.com/DaveSimoes/CrustAI.git
cd CrustAI
# 2. Install dependencies
npm install
# 3. Start Ollama and pull a model
ollama serve
ollama pull tinyllama # lightweight β 600MB, works on any machine
# or
ollama pull llama3.2 # more powerful β 2GB, recommended 8GB RAM
# 4. Configure
cp config/config.example.yml config/config.yml
# Edit config/config.yml with your platform tokens
# 5. Launch CrustAI
npm startRun a full performance comparison across all supported Ollama models β no cloud, no setup, just results.
node scripts/benchmark.jsβ‘οΈ Full benchmark documentation
Edit config/config.yml:
model: tinyllama # or llama3.2, phi3, mistral...
ollama_url: http://localhost:11434
language: en # or pt-BR
telegram:
enabled: true
token: YOUR_BOT_TOKEN_HERE
allowed_user_ids: [] # leave empty to allow all users
discord:
enabled: false
token: ""
whatsapp:
enabled: false
slack:
enabled: false
voice:
enabled: false
port: 8765| Command | Description |
|---|---|
/ping |
Check if the bot is alive |
/help |
Show all available commands |
/model |
Display which AI model is currently running |
/remember <fact> |
Store a fact in long-term memory |
/forget |
Erase all stored facts |
/clear |
Clear conversation history |
Messaging Platforms (Telegram / Discord / WhatsApp / Slack)
β
βΌ
βββββββββββββββββββββββ
β Message Orchestratorβ
ββββββββββ¬βββββββββββββ
β
ββββββββββββ΄βββββββββββ
βΌ βΌ
βββββββββββββββ ββββββββββββββββ
β Ollama LLM β β Memory Store β
β (local) β β (sql.js) β
βββββββββββββββ ββββββββββββββββ
β β
ββββββββββββ¬βββββββββββ
βΌ
βββββββββββββββ
β REST API β
β (Fastify) β
βββββββββββββββ
Design principle: Adapter boundaries make it trivial to add new messaging platforms without touching the core conversation logic.
- Adapters β Each platform (Telegram, Discord, WhatsApp, Slack) has its own isolated adapter. Messages are normalized into a unified format before reaching the orchestrator.
- Orchestrator β Receives messages, applies personality config, queries the LLM, and manages conversation context.
- Ollama LLM β Runs any compatible model locally. No network calls. No rate limits. No billing.
- Memory Store β Persists user-defined facts in a local SQLite database, available across sessions.
- REST API β Exposes endpoints for integrating CrustAI into custom tools, automations, and dashboards.
| 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 database for memory |
| yaml | Configuration management |
crustai/
βββ src/
β βββ core/
β β βββ index.js # Main orchestrator
β β βββ llm.js # Ollama LLM client
β β βββ commands.js # Command handler
β βββ adapters/
β β βββ telegram/ # Telegram bot
β β βββ discord/ # Discord bot
β β βββ whatsapp/ # WhatsApp bot
β β βββ slack/ # Slack bot
β βββ memory/
β β βββ store.js # Long-term memory (SQLite)
β βββ personality/
β β βββ prompt.js # System prompt builder
β βββ voice/
β β βββ server.js # Offline voice WebSocket server
β βββ api/
β βββ server.js # REST API
βββ config/
β βββ config.yml # Your config (git-ignored)
β βββ config.example.yml # Template
β βββ personality.yml # Assistant personality
βββ demo/
β βββ terminal.gif
β βββ ping.gif
β βββ chat.gif
βββ data/ # Local database (git-ignored)
CrustAI was built with privacy as its core principle β not as a feature, but as a hard technical constraint:
- β All conversations stay on your machine
- β No API keys sent to external AI providers
- β No telemetry, usage tracking, or analytics
- β No accounts, no sign-up, no terms-of-service surprise
- β Fully open source β inspect every single line
- β Your data. Your models. Your rules.
| Model | Size | Best For |
|---|---|---|
tinyllama |
~600MB | Low-end machines, quick replies |
phi3 |
~2GB | Balanced performance |
llama3.2 |
~2GB | General purpose, highly capable |
mistral |
~4GB | Strong reasoning and coding |
llama3 |
~4GB | High quality conversations |
Any model available on ollama.ai can be used.
- Telegram integration
- Discord integration
- WhatsApp integration
- Slack integration
- Long-term memory
- REST API
- Bilingual support (EN / PT-BR)
- Web UI dashboard
- Docker one-click deployment
- Image understanding (multimodal LLMs)
- Plugin system for custom tools
- Mobile app companion
Contributions are very welcome! Please read CONTRIBUTING.md before opening a PR.
# Fork the repository, then:
git checkout -b feature/your-feature
git commit -m "feat: add your feature"
git push origin feature/your-feature
# Open a Pull Request"Connection refused" on Ollama β Make sure Ollama is running: ollama serve
Bot not responding on Telegram β Double-check your token in config/config.yml and that the bot was started with /start.
High memory usage β Switch to a lighter model like tinyllama. Edit model: in config/config.yml.
WhatsApp keeps disconnecting β WhatsApp Web sessions expire. Restart CrustAI to regenerate the QR code.
- πΊπΈ English β you're reading it
- π§π· PortuguΓͺs β role para baixo
CrustAI Γ© um assistente de IA totalmente privado e auto-hospedado que roda inteiramente na sua prΓ³pria mΓ‘quina β nenhum dado sai do seu computador. Conecta-se ao Telegram, WhatsApp, Discord e Slack com o poder de modelos de linguagem locais, sem depender de nenhum provedor externo.
| Funcionalidade | DescriΓ§Γ£o |
|---|---|
| π 100% Privado | Todos os dados ficam na sua mΓ‘quina. Sem nuvem, jamais |
| π§ LLM Local | Powered by Ollama β llama3.2, tinyllama, mistral e muito mais |
| π± Multi-Plataforma | Telegram, WhatsApp, Discord, Slack β um sΓ³ assistente |
| 𧬠MemΓ³ria Longa | Lembra fatos sobre vocΓͺ entre conversas |
| π£οΈ Voz Offline | Fala e escuta sem internet (pt-BR) |
| β‘ REST API | Integre o CrustAI em qualquer fluxo de trabalho |
| π Personalidade | Configure nome, tom e comportamento do assistente |
# 1. Clone o repositΓ³rio
git clone https://github.com/DaveSimoes/CrustAI.git
cd CrustAI
# 2. Instale as dependΓͺncias
npm install
# 3. Inicie o Ollama e baixe um modelo
ollama serve
ollama pull tinyllama
# 4. Configure o projeto
cp config/config.example.yml config/config.yml
# Edite config/config.yml com seu token do Telegram
# 5. Inicie o CrustAI
npm startDave Simoes β Developer passionate about AI, privacy, and open source.
- π GitHub: @DaveSimoes
- πΌ LinkedIn: Dave Simoes
MIT β see LICENSE for details.
Made with π¦ and β€οΈ by Dave Simoes

