Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

mercury-agent

> AI 编程
Open source

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI or Telegram.

3.0K stars0 likes1 views
WebsiteGitHub

About

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI or Telegram.

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access.

Remembers what matters. Asks before it acts. Runs 24/7 from CLI, Telegram, or Web. 31 built-in tools, Kanban boards, extensible skills, SQLite-backed Second Brain memory.

Current Stable: v1.2.3

English | 简体中文


Quick Start

One-liner install (no Node.js required) — downloads the latest standalone binary for your OS:

bash
# macOS / Linux
curl -fsSL https://mercuryagent.sh/install.sh | sh
powershell
# Windows
irm https://mercuryagent.sh/install.ps1 | iex

Or via npm if you already have Node.js 20+:

bash
npx @cosmicstack/mercury-agent

Or install the npm package globally:

bash
npm i -g @cosmicstack/mercury-agent
mercury

First run triggers the setup wizard (name, provider, optional Telegram). After setup, Mercury opens the Ink TUI startup screen and asks for your permission mode (Ask Me or Allow All) before chat starts.

To reconfigure later (change keys, name, settings):

bash
mercury doctor
mercury doctor --platform

Why Mercury?

Every AI agent can read files, run commands, and fetch URLs. Most do it silently. Mercury asks first — and remembers what matters.

  • Permission-hardened — Shell blocklist (sudo, rm -rf /, etc. never execute). Folder-level read/write scoping. Pending approval flow. Ask Me or Allow All per session. No surprises.
  • Second Brain — Persistent, structured memory with SQLite + FTS5 full-text search. 10 memory types, auto-extraction, conflict resolution, auto-consolidation. Mercury learns your preferences, goals, and habits without manual entry.
  • Soul-driven — Personality defined by markdown files you own (soul.md, persona.md, taste.md, heartbeat.md). No corporate wrapper.
  • Token-aware — Daily budget enforcement. Auto-concise when over 70%. /budget command to check, reset, or override.
  • Live streaming — Real-time token streaming on CLI with cursor-save/restore and markdown re-rendering. Telegram streaming with editable status messages.
  • Always on — Run as a background daemon on any OS. Auto-restarts on crash. Starts on boot. Cron scheduling, heartbeat monitoring, and proactive notifications.
  • Extensible — Install community skills with a single command. Schedule skills as recurring tasks. Based on the Agent Skills specification.

Mercury now seeds a default web-search skill on first run in ~/.mercury/skills/web-search/SKILL.md.

Daemon Mode

One command to make Mercury persistent:

bash
mercury up

This installs the system service (if not installed), starts the background daemon, and ensures Mercury is running. Use this as your go-to command.

If Mercury is already running, mercury up just confirms it and shows the PID.

Other daemon commands

bash
mercury restart      # Restart the background process
mercury stop         # Stop the background process
mercury start -d     # Start in background (without service install)
mercury logs         # View recent daemon logs
mercury status       # Show if daemon is running

Daemon mode includes built-in crash recovery — if the process crashes, it restarts automatically with exponential backoff (up to 10 restarts per minute).

System Service (auto-start on boot)

mercury up installs this automatically. You can also manage it directly:

bash
mercury service install
Platform Method Requires Admin
macOS LaunchAgent (~/Library/LaunchAgents/) No
Linux systemd user unit (~/.config/systemd/user/) No (linger for boot)
Windows Task Scheduler (schtasks) No
bash
mercury service status     # Check if service is running
mercury service uninstall  # Remove the system service

In daemon mode, Telegram becomes your primary channel — CLI is log-only since there's no terminal for input.

CLI Commands

Command Description
mercury up Recommended. Install service + start daemon + ensure running
mercury Start the agent (same as mercury start)
mercury start Start in foreground
mercury start -d Start in background (daemon mode)
mercury restart Restart the background process
mercury stop Stop a background process
mercury logs View recent daemon logs
mercury doctor Reconfigure setup (name, providers, channels, permissions defaults)
mercury doctor --platform Show cross-platform terminal/daemon compatibility diagnostics
mercury setup Re-run the setup wizard
mercury status Show config and daemon status
mercury help Show full manual
mercury upgrade Upgrade to latest version
mercury telegram list List approved and pending Telegram users
mercury telegram approve <code|id> Approve a pairing code or pending request
mercury telegram reject <id> Reject a pending Telegram access request
mercury telegram remove <id> Remove an approved Telegram user
mercury telegram promote <id> Promote a Telegram member to admin
mercury telegram demote <id> Demote a Telegram admin to member
mercury telegram reset Clear all Telegram access and start fresh
mercury service install Install as system service (auto-start on boot)
mercury service uninstall Uninstall system service
mercury service status Show system service status
mercury --verbose Start with debug logging

In-Chat Commands

Type these during a conversation — they don't consume API tokens. Work on both CLI and Telegram.

Command Description
/help Show the full manual
/status Show agent config, budget, and usage
/tools List all loaded tools
/skills List installed skills
/stream Toggle Telegram text streaming
/stream off Disable streaming (single message)
/budget Show token budget status
/budget override Override budget for one request
/budget reset Reset usage to zero
/budget set <n> Change daily token budget
/permissions Change permission mode (Ask Me / Allow All)
/view Toggle progress view (balanced/detailed)
/view balanced Set compact progress view
/view detailed Set full progress view
/code agent <task> Delegate a coding task to a sub-agent in background
/ws exit Exit workspace IDE mode back to general chat
/tasks List scheduled tasks
/memory View and manage second brain memory
/unpair Telegram: reset all access

Built-in Tools

Category Tools
Filesystem read_file, write_file, create_file, edit_file, list_dir, delete_file, send_file, approve_scope
Shell run_command, cd, approve_command
Messaging send_message
Git git_status, git_diff, git_log, git_add, git_commit, git_push
Web fetch_url
Skills install_skill, list_skills, use_skill
Scheduler schedule_task, list_scheduled_tasks, cancel_scheduled_task
System budget_status

Installing Skills

Mercury can pull community-contributed skills from the registry at skills.mercuryagent.sh (126+ skills, no auth required).

…

Installed skills land at ~/.mercury/skills/<category>/<slug>/SKILL.md and are picked up by the agent on the next boot — they're treated identically to built-in skills.

Review before you ship. Skills are community-contributed and unaudited. Run mercury skills view <id> before installing.

Overrides: --registry <url> (or MERCURY_SKILLS_REGISTRY) for self-hosted registries, MERCURY_SKILLS_INSTALL_ROOT for an alternate install path, --json for machine-readable output.

Also installable from:

  • Web dashboard — http://127.0.0.1:6174/skills has a registry installer (paste category/slug) and a URL installer side by side.
  • Telegram — /skills, /skills search <q>, /skills view <id>, /skills install <id> (admin-only). Every result includes the registry URL so you can review before installing.

See the Skills reference for the full command surface, frontmatter spec, and API endpoints.

Web Dashboard

Mercury includes a built-in web UI at http://127.0.0.1:6174:

bash
mercury doctor   # Enable web during setup

Or set in ~/.mercury/mercury.yaml:

yaml
web:
  enabled: true
  port: 6174

Features: Chat with SSE streaming, Kanban boards, Second Brain visualization, Workspace IDE, provider/skill/permission/schedule management, usage tracking, dark/light theme.

Default credentials: mercury / Mercury@123. Binds to localhost only.

Kanban Boards

Persistent task boards with agent execution. Create boards, add cards, and let Mercury process them autonomously.

  • Cards — title, description, status (todo/doing/done/blocked), priority, labels, comments, attachments, dependencies
  • Smart execution — Mercury processes cards sequentially, updating status and leaving result comments
  • Cascade execution — process dependent cards in dependency order
  • Token budget — per-card token tracking with auto-pause when exhausted
  • Storage — SQLite with per-board context, variables, and instructions

Access via Web Dashboard or API (/api/boards/*).

Channels

Channel Features
CLI Ink TUI, startup permission mode picker, interactive permission prompts (arrow keys + Enter; Y/N/A shortcuts), progress views (balanced/detailed), real-time streaming
Web React SPA dashboard, chat with SSE streaming, Kanban boards, Second Brain visualization, Workspace IDE, dark/light theme
Telegram HTML formatting, editable streaming messages, file uploads, typing indicators, multi-user access with admin/member roles

Workspace/Coding Shortcuts (CLI)

  • Ctrl+P → switch to Plan mode
  • Ctrl+X → switch to Execute mode
  • Esc or Ctrl+Q → exit workspace to general chat
  • Ctrl+V → toggle progress view (/view is fallback when terminal intercepts Ctrl+V)

Spotify UI Notes (CLI)

  • Spotify deck supports keyboard shortcuts: N next, P previous, +/- volume, Z now playing.
  • Inline album art is optional and safe-gated:
    • Enable with MERCURY_SPOTIFY_ART=1
    • Currently renders only in local iTerm sessions
    • Automatically falls back to text-only UI in SSH/mobile/light terminals

Telegram Access

Mercury uses an organization access model with admins and members.

  • First-time setup: Send /start to your bot, receive a pairing code, enter it in the CLI with mercury telegram approve <code>. You become the first admin.
  • Additional users: Send /start to request access. Admins approve or reject from the CLI.
  • Roles: Admins can approve/reject requests, promote/demote users, and reset access. Members can chat with Mercury.
  • Reset: Admins can send /unpair in Telegram or run mercury telegram reset in the CLI to clear all access and start fresh.
  • Private chats only — group messages are always ignored.

CLI commands: mercury telegram list|approve|reject|remove|promote|demote|reset

Scheduler

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptai-agentai-assistantllm

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.