Mercury Agent is a personal AI agent that runs as a long-lived process on your own machine and is reachable from a terminal TUI, a local web dashboard, or Telegram. Its design centres on asking before it acts: a shell blocklist prevents commands such as sudo and rm -rf / from running, filesystem access is scoped per folder, and each session starts in either an Ask Me or Allow All permission mode with an approval flow for pending actions.
The agent's personality is defined by markdown files you own (soul.md, persona.md, taste.md, heartbeat.md). A Second Brain memory layer stores facts about you in a local SQLite database with FTS5 full-text search: after each conversation it extracts up to three facts with confidence, importance, and durability scores, injects the top five matching memories before each message, consolidates a profile summary every hour, resolves conflicting memories by confidence or recency, and prunes stale entries on a schedule.
Token usage is tracked against a daily budget, with automatic concise responses once usage passes 70% and /budget commands to check, reset, or override. mercury up installs a system service (LaunchAgent, systemd user unit, or Task Scheduler) and starts a background daemon with crash recovery; in daemon mode Telegram becomes the primary channel. Multiple LLM providers can be configured in order, with automatic fallback down the list.
Features
- Permission-hardened tools: 31 built-in tools across filesystem, shell, git, web fetch, messaging, skills, scheduler, and system categories, gated by blocklists, folder scoping, and per-session approval
- Second Brain memory: 10 memory types (identity, preference, goal, project, habit, decision, constraint, relationship, episode, reflection) with automatic extraction, recall, consolidation, and pruning, stored locally
- Token budgets: daily budget enforcement with auto-concise mode and per-request override
- Channels: Ink TUI with live streaming, React web dashboard with SSE chat, and Telegram with editable streaming messages, file uploads, and admin/member roles
- Daemon mode: background service with auto-restart on crash, boot start, and log access
- Kanban boards: persistent task boards whose cards the agent processes sequentially or in dependency order, with per-card token tracking
- Scheduler: recurring cron-expression tasks and one-shot delayed tasks that persist across restarts and reply to the originating channel
- Skills: installs community skills from a registry following the Agent Skills specification, via CLI, web dashboard, or Telegram
- Provider fallback: ordered list of LLM providers (DeepSeek, OpenAI, Anthropic, and others) tried in sequence
- Workspace mode: plan and execute modes for coding tasks, with background sub-agent delegation via /code agent
