← all repositories
cosmicstack-labs/mercury-agent

An AI agent that actually asks before it rm -rf's

A TypeScript AI agent with permission gates, token budgets, and a SQLite "Second Brain" that runs 24/7 via CLI, Telegram, or web.

2.6k stars TypeScript AgentsLLMOps · Eval
mercury-agent
Velocity · 7d
+53
★ / day
Trend
steady
star history

What it does

Mercury is a local-first AI agent that chats, codes, and executes tasks across CLI, Telegram, or a built-in web dashboard. It ships with 31 built-in tools (filesystem, shell, git, web fetch, scheduling), persists memory in SQLite with full-text search, and can run as a background daemon with auto-restart on crash. You install it with a one-liner curl script or npm, and it boots into an Ink-based TUI.

The interesting bit

The “soul-driven” pitch sounds like marketing, but the implementation is concrete: personality and behavior are defined by markdown files (soul.md, persona.md, taste.md, heartbeat.md) that you own and edit. More practically, Mercury treats permissions as a first-class concern — shell commands hit a blocklist (sudo, rm -rf / are hard-rejected), folder access is scoped, and every session starts with an “Ask Me” or “Allow All” choice. The token budget enforcement is similarly tangible: auto-concise mode kicks in above 70% daily usage, and you can check or override with /budget commands.

Key highlights

  • Permission-hardened execution with blocklists, folder scoping, and per-session approval modes
  • SQLite-backed “Second Brain” with 10 memory types, auto-extraction, and FTS5 search
  • Runs as cross-platform daemon via mercury up — LaunchAgent on macOS, systemd user unit on Linux, Task Scheduler on Windows
  • 126+ community skills installable from registry, with local rendering before you trust them
  • Built-in web dashboard (localhost:6174) with Kanban boards, workspace IDE, and SSE streaming
  • Real-time token streaming in CLI with cursor-save/restore and markdown re-rendering

Caveats

  • Web dashboard defaults to mercury / Mercury@123 credentials and localhost-only binding — you’ll want to change that
  • Community skills are explicitly unaudited; the README warns to review before installing
  • Telegram becomes your primary input channel in daemon mode; CLI becomes log-only

Verdict

Worth a look if you want a self-hosted agent with actual guardrails and persistent memory, not just another LLM wrapper. Skip it if you need cloud-native multi-user collaboration or enterprise SSO — this is a personal machine agent with Telegram as its remote control.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.