autopilot
Run multi-hour workflows unattended.
Autopilot mode lets Mercury plan, execute, and recover from failures across hundreds of turns without supervision. Set a goal, walk away, return to a clean diff.
mercury agent
Open-source AI coding agent with 40+ tools, Autopilot mode, persistent Second Brain memory, a typed Skills system, and a provider-agnostic runtime. Built for engineers who treat their terminal as a primary surface.
install
$ npm i -g @cosmicstack/mercury-agent$ mercuryRequires Node 20+. First-run prompts for your model provider credentials and stores them in your OS keychain. No telemetry, no account, no cloud component required.
capabilities
autopilot
Autopilot mode lets Mercury plan, execute, and recover from failures across hundreds of turns without supervision. Set a goal, walk away, return to a clean diff.
second brain
The Second Brain stores decisions, conventions, and project knowledge in a structured, queryable form. Mercury remembers what you taught it last week — and what it learned about your codebase last month.
skills
Skills are versioned, parameterized procedures that Mercury can invoke. Built-in skills cover refactoring, code review, and migrations. Your own skills extend the agent without rewriting it.
provider agnostic
Mercury speaks OpenAI, Anthropic, Cohere, Mistral, xAI, and OpenRouter natively. Route different tools to different providers; fail over automatically when one is degraded.
40+ tools
Filesystem, shell, git, web fetch, browser, code search, AST refactor, structured edits, MCP — the tool set is the product. Each tool is sandboxed, auditable, and individually testable.
open source
The runtime, tools, and skills library are all open source under MIT. Use it commercially. Fork it. Ship a managed offering. We'd rather you build than ask.
providers
Route different tools to different providers. Fail over automatically when one is degraded. Bring your own API keys — we never proxy your traffic.
OpenAI
gpt-5, gpt-5-mini, o-series
Anthropic
claude-opus-4.7, claude-sonnet-4.5, claude-haiku-4.5
xAI
grok-4, grok-4-mini
Mistral
mistral-large-3, codestral-2
Cohere
command-a, command-r-plus-08
OpenRouter
300+ models via unified gateway
channels
Stable
Bi-weekly releases
Production engineers. Default channel.
npm i -g @cosmicstack/mercury-agentBeta
Weekly cut from main
Teams who want new tools first.
npm i -g @cosmicstack/mercury-agent@betaNightly
Built on every merge
Contributors and early adopters.
npm i -g @cosmicstack/mercury-agent@nightlycomparison
We try to be honest about this rather than puff it up. Read the source, verify the claims, then decide for yourself.
| Capability | Mercury Agent | Cursor Agent | Claude Code |
|---|---|---|---|
| Open source runtime | ✓ | — | — |
| Provider-agnostic (6+ providers) | ✓ | Limited | — |
| Long-horizon autopilot mode | ✓ | Limited | ✓ |
| Persistent project memory | Second Brain | Rules file | AGENTS.md |
| User-authored skills | 128 community + 23 built-in | — | — |
| Self-hostable | ✓ | — | — |
| MCP support | ✓ | ✓ | ✓ |
get started
No signup. No cloud component. No telemetry. Just an open-source agent and your terminal.