AIdaemon
A personal AI agent that runs as a daemon. Always on, always learning. Chat from Telegram, extend with MCP, powered by any LLM.
aidaemon is a self-hosted AI agent written in Rust that runs as a background service on your machine. It connects to any OpenAI-compatible LLM provider, communicates via Telegram, Slack, or Discord, and can execute tools, manage its own configuration, remember facts, browse the web, and spawn sub-agents โ all autonomously.
Key Features
- Daemon architecture โ runs as systemd/launchd service, always available
- Multi-channel โ chat via Telegram, Slack, or Discord, multi-user access control
- Agentic tool use โ autonomous multi-step reasoning with up to 10 iterations
- MCP integration โ extend with any Model Context Protocol server
- Persistent memory โ SQLite-backed history with semantic search via embeddings
- Multi-model routing โ automatic Fast/Primary/Smart tier selection
- Email triggers โ IMAP IDLE monitoring for inbox notifications
- Command approval โ interactive Telegram approval for shell commands
- Skills system โ dynamic prompt enhancement via markdown files
- Self-maintenance โ reads, updates, validates, and restores its own config
- Browser automation โ Chrome with persistent login sessions, screenshots, and form filling
- Web research โ built-in web search (DuckDuckGo/Brave) and URL fetching
- Sub-agent spawning โ recursive agent delegation for complex tasks
- CLI agent delegation โ delegate to Claude, Gemini, Codex, Aider, etc.
- Scheduled tasks โ cron-style recurring tasks with natural language parsing
- File transfer โ send and receive files via Telegram with path security
- Secrets management โ OS keychain and environment variable support
- Token cost tracking โ per-model usage stats, daily budgets, /cost command
- Event sourcing โ immutable event log with daily consolidation into facts and procedures
- Goals + tasks โ break bigger work into trackable tasks and keep progress moving
- Health monitoring โ HTTP, TCP, command, and file probes with alerting
- Dynamic skills โ install from registries or auto-promote repeated procedures
- Self-updater โ auto-update from GitHub releases with configurable modes
- Discord integration โ slash commands, interactive approval buttons, multi-bot support
- Command risk assessment โ 4-level risk scoring (Safe/Medium/High/Critical) for terminal commands
- People intelligence โ a personal contact book that remembers birthdays, preferences, and relationships for you
Architecture at a Glance
architecture
Telegram โโโ
Slack โโโคโโ> ChannelHub โโ> Agent โโ> LLM Provider
Discord โโโ โ
โโโ> Tools
โ โโโ terminal (risk assessment)
โ โโโ system info
โ โโโ memory (facts)
โ โโโ config manager
โ โโโ web search + fetch
โ โโโ browser (optional)
โ โโโ file transfer
โ โโโ sub-agents + CLI agents
โ โโโ health probes
โ โโโ manage skills
โ โโโ manage people
โ โโโ scheduler
โ โโโ MCP tools (dynamic)
โ
โโโ> Events
โ โโโ immutable event log
โ โโโ daily consolidation
โ
โโโ> Goals + Tasks
โ โโโ break work into tasks
โ โโโ track progress + retries
โ
โโโ> State
โ โโโ SQLite persistence
โ โโโ in-memory working mem
โ
โโโ> Facts
โโโ injected into system prompt
Triggers โโโ> EventBus โโโ> Agent
โโโ IMAP IDLE
Health โโโ> GET /health (axum)Quick Links
- Getting Started โ build and run aidaemon
- Configuration Reference โ full config.toml documentation
- Tools โ built-in and extensible tool system
- Telegram โ bot setup, commands, approval flow
- Slack โ workspace integration via Socket Mode
- Discord โ bot setup, slash commands, approval buttons
- Event Sourcing โ immutable events and consolidation
- Plans (Legacy) โ old planning system notes for older installs
- Health Monitoring โ service probes and alerting