Skip to content

davo20019/aidaemon

Repository files navigation

aidaemon

CI Crates.io License: MIT

Website · Documentation · Discord · 𝕏

A self-hosted AI agent that runs on your machine and talks to you on Telegram, Slack, or Discord. It can run commands, browse the web, manage files, remember things across conversations, and learn your workflows over time.

I built this because I wanted to control my computer from my phone, from anywhere. Send a message on Telegram, and it runs a command, checks a log, deploys something, or researches a topic — then replies with the result. I also wanted it to run on cheap hardware: a Raspberry Pi, an old laptop, a $5/month VPS.

What makes it different

  • It's yours — runs on your machine, your API keys, your data. Nothing goes to a third party beyond the LLM API calls you choose to make.
  • It remembers you — persistent memory with fact extraction, vector embeddings, and semantic recall. It learns your preferences, your projects, the people you mention. Not a shallow "memory" feature — a full knowledge graph that grows over time.
  • It's always on — runs as a background daemon. Message it on Telegram at 3am from your phone. Schedule tasks with cron syntax or natural language. It's not an app you open — it's an assistant that's always available.
  • It can act — 40+ tools: terminal commands, file operations, git, web browsing, web research, HTTP requests with OAuth, MCP servers. It doesn't just answer questions — it does things.
  • It's a single binary — no Docker, no Node.js, no Python environment. One binary, copy it anywhere and run it. Starts in milliseconds, uses minimal RAM.
  • It works with any LLM — OpenAI, Anthropic, Google Gemini, DeepSeek, Moonshot, MiniMax, Ollama, OpenRouter, Cloudflare AI Gateway, or any OpenAI-compatible API. Switch providers without changing anything else.

Quick Start

One-line install

curl -sSfL https://get.aidaemon.ai | bash

Homebrew

brew install davo20019/tap/aidaemon

Cargo

cargo install aidaemon

Then run aidaemon — the setup wizard walks you through picking a provider, entering your API key, and connecting a channel.

Features

Channels

Talk to it on Telegram, Slack (Socket Mode), or Discord. Run multiple bots, add new ones at runtime with /connect, no restart needed. Telegram owners can also run /terminal [agent] [working_dir] to launch the hosted terminal Mini App (https://terminal.aidaemon.ai) for direct CLI-agent sessions with automatic secure daemon pairing.

Tools & Agents

40+ built-in tools including terminal execution, file operations, git, web browser (headless Chrome), web search, HTTP requests with auth profiles, and MCP server integration. Tools declare their risk level — read-only operations run freely, side effects require approval.

Delegate complex tasks to sub-agents or external CLI agents (Claude, Gemini, Codex, Aider — auto-discovered).

Memory

SQLite-backed persistent memory with vector embeddings (AllMiniLML6V2). Background consolidation extracts durable facts from conversations. Semantic recall surfaces relevant context automatically. Database encrypted at rest by default.

Skills

Trigger-based instructions that teach it new workflows. Load from files, URLs, or remote registries. Successful procedures auto-promote to skills after enough consistent use.

Automation

Cron-style scheduled tasks with natural language time parsing. Email triggers via IMAP IDLE. Long-running goal tracking with task breakdown and multi-schedule support.

Security

Terminal command allowlists, inline approval flow (Allow Once / Allow Always / Deny), SSRF protection, input sanitization, encrypted state, secrets in OS keychain, and role-based access control. See the security docs for the full model.

Running as a Service

# macOS
aidaemon install-service
launchctl load ~/Library/LaunchAgents/ai.aidaemon.plist

# Linux
sudo aidaemon install-service
sudo systemctl enable --now aidaemon

Configuration

All settings live in config.toml, generated by the setup wizard. See config.toml.example for the full reference and the documentation for detailed guides on each feature.

Secrets (API keys, bot tokens) are stored in your OS keychain by default — not in config files.

If you prefer env-only secrets, set AIDAEMON_NO_KEYCHAIN=1. In that mode:

  • aidaemon reads secrets from environment variables / .env
  • secret writes (including OAuth token refresh rotation) are persisted back to the env file
  • set AIDAEMON_ENV_FILE=/absolute/path/.env to control which env file is used (default: .env in working directory)

For env-only mode, keep the env file private (chmod 600) and out of version control.

Building from Source

cargo build --release                              # standard build
cargo build --release --features "slack,discord"    # with Slack and Discord
cargo build --release --features "browser"          # with headless Chrome
cargo test                                          # run tests

See CLAUDE.md for architecture details, module map, and contributor guidance.

License

MIT

About

Personal AI daemon — Telegram interface, agentic tool use, MCP integration, email triggers, persistent memory

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages