How davesimoes/crustai works
CrustAI is a local-first assistant that accepts chat through messaging platforms, a REST/web interface, or voice; routes requests through a shared message handler; and returns responses from a locally hosted Ollama model. The handler handles commands and otherwise combines conversation history, stored facts, and personality context before calling the model and saving the turn. The README documents the major capabilities; connections for those shown in sampled source are cited, while other documented relationships are cited to the README.
Main entry points: core/index.js Message Orchestrator · api/server.js REST API Server · voice/server.js Voice Server · telegram/index.js Telegram Adapter
Components 23
Chat Channels
- Telegram Adapter
src/adapters/telegram/index.js - Discord Adapter
src/adapters/discord/index.js - WhatsApp Adapter
src/adapters/whatsapp/index.js - Slack Adapter
src/adapters/slack/index.js
Assistant Runtime
- Message Orchestrator
src/core/index.js - Command Handler
src/core/commands.js - Prompt Builder
src/personality/prompt.js - Ollama Client
src/core/llm.js
Memory and Configuration
- Memory Store
src/memory/store.js - Configuration Loader
src/utils/config.js - Logger
src/utils/logger.js
Web and Voice
- REST API Server
src/api/server.js - Web Chat UI
src/web/index.html - Voice Server
src/voice/server.js
Other components
- Telegram User
- Discord User
- WhatsApp User
- Slack User
- Ollama Runtime
- Web/API Client
- Voice Client
- Whisper STT
- Piper TTS
Connections 22
- Telegram User → Telegram Adapter: sends messages
README.md - Discord User → Discord Adapter: sends messages
README.md - WhatsApp User → WhatsApp Adapter: sends messages
README.md - Slack User → Slack Adapter: sends messages
README.md - Telegram Adapter → Message Orchestrator: calls handler
src/core/index.js - Discord Adapter → Message Orchestrator: calls handler
src/core/index.js - WhatsApp Adapter → Message Orchestrator: calls handler
src/core/index.js - Slack Adapter → Message Orchestrator: calls handler
src/core/index.js - Message Orchestrator → Command Handler: dispatches commands
src/core/index.js - Message Orchestrator → Memory Store: reads and writes
src/core/index.js - Message Orchestrator → Prompt Builder: builds prompt
src/core/index.js - Message Orchestrator → Ollama Client: requests reply
src/core/index.js - Ollama Client → Ollama Runtime: sends inference request
src/core/llm.js - Message Orchestrator → Configuration Loader: loads settings
src/core/index.js - Web/API Client → REST API Server: sends requests
README.md - REST API Server → Web Chat UI: serves interface
src/api/server.js - REST API Server → Message Orchestrator: calls handler
src/api/server.js - REST API Server → Memory Store: reads and clears
src/api/server.js - Voice Client → Voice Server: sends audio or text
src/voice/server.js - Voice Server → Message Orchestrator: calls handler
src/core/index.js - Voice Server → Whisper STT: transcribes audio
src/voice/server.js - Voice Server → Piper TTS: synthesizes reply
src/voice/server.js