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, 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
  • Telegram interface — chat from any device, 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 — headless Chrome with screenshot support
  • Sub-agent spawning — recursive agent delegation for complex tasks
  • CLI agent delegation — delegate to Claude, Gemini, Codex, Aider, etc.

Architecture at a Glance

architecture
Telegram ───> Agent ───> LLM Provider
              │
              ├──> Tools
              │    ├── terminal
              │    ├── system info
              │    ├── memory (facts)
              │    ├── config manager
              │    ├── browser (optional)
              │    ├── sub-agents
              │    ├── CLI agents
              │    └── MCP tools (dynamic)
              │
              ├──> State
              │    ├── SQLite persistence
              │    └── in-memory working mem
              │
              └──> Facts
                   └── injected into system prompt

Triggers ───> EventBus ───> Agent
   └── IMAP IDLE

Health ───> GET /health (axum)

Quick Links