Mercury Agent
By: CosmicStack Labs
GitHub: cosmicstack-labs/mercury-agent
npm: @cosmicstack/mercury-agent
Stable: v1.1.9
License: Open source
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.
Quick Start
# One-liner (no Node.js required)
curl -fsSL https://mercuryagent.sh/install.sh | sh
# Or via npm
npx @cosmicstack/mercury-agentFirst run → setup wizard (name, provider, Telegram optional) → Ink TUI startup screen → choose permission mode → chat.
Key Features
Permission-Hardened
- Shell blocklist (
sudo,rm -rf /etc. never execute) - Folder-level read/write scoping
- Pending approval flow
- 2 modes: Ask Me (default) or Allow All per session
Second Brain Memory
- Persistent SQLite + FTS5 full-text search
- 10 memory types, auto-extraction, conflict resolution, auto-consolidation
- Mercury learns preferences, goals, and habits without manual entry
Soul-Driven
- Personality defined by markdown files you own:
soul.md— core identitypersona.md— communication styletaste.md— preferencesheartbeat.md— proactive behavior patterns
- No corporate wrapper
Token-Aware
- Daily budget enforcement
- Auto-concise when over 70%
/budgetcommand to check, reset, override
Daemon Mode
mercury up # Install service + start daemon + ensure running- Auto-restarts on crash (exponential backoff, up to 10/min)
- Starts on boot via LaunchAgent (macOS), systemd user unit (Linux), Task Scheduler (Windows)
- No admin required
31 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 |
Channels
- CLI — Ink TUI with real-time token streaming, cursor-save/restore, markdown re-rendering
- Telegram — Editable status messages, multi-user with approve/reject/promote/demote
- Web — Browser interface
Skills
126+ community skills in the registry. Install with one command:
# In-chat
/install_skill <name>Skills follow the Agent Skills specification. Default skill: web-search on first run.
CLI Commands
| Command | Description |
|---|---|
mercury / mercury start | Start in foreground |
mercury up | Install service + start daemon |
mercury start -d | Background daemon mode |
mercury restart / stop | Daemon lifecycle |
mercury logs | View daemon logs |
mercury doctor | Reconfigure setup |
mercury setup | Re-run setup wizard |
mercury status | Config + daemon status |
mercury upgrade | Upgrade to latest |
mercury telegram list/approve/reject/remove/promote/demote | Telegram user management |
In-Chat Commands
/help, /status, /tools, /skills, /stream, /budget, /permissions, /view, /code agent <task>, /tasks, /memory, /unpair
Architecture
- TypeScript/Node.js 20+
- Standalone binary option (no Node.js required)
- Cross-platform: macOS, Linux, Windows
- Open source with AGENTS.md for LLM-assisted development