mercury-agent Agent工作流 是 AI Skill Hub 本期精选AI工具之一。已获得 2.2k 颗 GitHub Star,综合评分 8.2 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
mercury-agent Agent工作流 是一款基于 TypeScript 开发的开源工具,专注于 AI工作流、权限控制、Token预算 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
mercury-agent Agent工作流 是一款基于 TypeScript 开发的开源工具,专注于 AI工作流、权限控制、Token预算 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:npm 全局安装 npm install -g mercury-agent # 方式二:npx 直接运行(无需安装) npx mercury-agent --help # 方式三:项目依赖安装 npm install mercury-agent # 方式四:从源码运行 git clone https://github.com/cosmicstack-labs/mercury-agent cd mercury-agent npm install npm start
# 命令行使用
mercury-agent --help
# 基本用法
mercury-agent [options] <input>
# Node.js 代码中使用
const mercury_agent = require('mercury-agent');
const result = await mercury_agent.run(options);
console.log(result);
# mercury-agent 配置说明 # 查看配置选项 mercury-agent --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export MERCURY_AGENT_CONFIG="/path/to/config.yml"
<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cosmicstack-labs/mercury-agent/main/docs/img/readme-hero-dark.png"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/cosmicstack-labs/mercury-agent/main/docs/img/readme-hero-light.png"> <img alt="Mercury Agent" src="https://raw.githubusercontent.com/cosmicstack-labs/mercury-agent/main/docs/img/readme-hero-light.png" width="520"> </picture> </p>
<p align="center"> <a href="https://www.npmjs.com/package/@cosmicstack/mercury-agent"><img src="https://img.shields.io/npm/v/@cosmicstack/mercury-agent?color=0ea5e9&label=npm" alt="npm version"></a> <a href="https://github.com/cosmicstack-labs/mercury-agent/blob/main/.github/badges/downloads-breakdown.json"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcosmicstack-labs%2Fmercury-agent%2Fmain%2F.github%2Fbadges%2Fdownloads.json" alt="total npm downloads"></a> <a href="https://github.com/cosmicstack-labs/mercury-agent/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/cosmicstack-labs/mercury-agent/ci.yml?branch=main&label=CI" alt="CI"></a> <a href="https://github.com/cosmicstack-labs/mercury-agent/stargazers"><img src="https://img.shields.io/github/stars/cosmicstack-labs/mercury-agent?style=flat&color=f59e0b" alt="GitHub stars"></a> <a href="https://nodejs.org/"><img src="https://img.shields.io/node/v/@cosmicstack/mercury-agent?color=16a34a" alt="node"></a> <a href="LICENSE"><img src="https://img.shields.io/github/license/cosmicstack-labs/mercury-agent?color=64748b" alt="MIT license"></a> <a href="https://discord.gg/5emMpMJy5J"><img src="https://img.shields.io/badge/discord-join-5865F2?logo=discord&logoColor=white" alt="Discord"></a> </p>
<p align="center"> <a href="https://trendshift.io/repositories/30943?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-30943" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/30943/daily" alt="cosmicstack-labs%2Fmercury-agent | Trendshift" width="250" height="55"/></a> </p>
<p align="center"> <a href="https://mercuryagent.sh">Website</a> · <a href="https://mercuryagent.sh/docs">Docs</a> · <a href="#quickstart">Quickstart</a> · <a href="CHANGELOG.md">Changelog</a> · <a href="https://discord.gg/5emMpMJy5J">Discord</a> · <a href="README.zh-CN.md">简体中文</a> </p>
---
Most AI agents forget you by morning, run whatever the model decides, and stop the moment you close the laptop. Mercury doesn't.
Mercury is an open-source agent with a personality you write yourself, a memory that stays on your disk, and a permission system that sits between the model and your machine. Message it from your terminal, Telegram, Discord, Slack or Signal and you reach the same agent, with the same memory, running as one background process you own.
It reads and writes your files, runs commands, ships code through git and GitHub, researches the web and keeps a schedule. Every one of those actions is checked against rules you set, and every turn stays inside a daily token budget.
Then it goes further:
Install it in one line. Talk to it from anywhere. It is still there tomorrow, and it still remembers.
Requirements: Node.js 22+, and Bun 1.3+ only if you want standalone binaries.
git clone https://github.com/cosmicstack-labs/mercury-agent.git
cd mercury-agent
npm install
npm run build # dist/ plus the web UI
npm test # vitest
node dist/index.js # run your build
Standalone binaries:
npm run build:bin # this machine only (release/smoke/)
npm run build:bin:all # all targets: macOS arm64/x64, Linux x64/arm64 (+ no-AVX2 build), Windows x64 (+ no-AVX2 build)
Release binaries are unsigned. On macOS, sign with codesign and notarize before distributing your own builds.
1. Install. The installer downloads a standalone binary for your OS and CPU and verifies its checksum. No Node.js needed.
```bash
<details> <summary><b>CLI commands</b></summary>
| Command | What it does |
|---|---|
mercury | Start Mercury, or attach to it if it is already running |
mercury up | Install the login service and make sure Mercury is running |
mercury attach | Attach this terminal to the running runtime |
mercury code [dir] | Open Mercury Code in a directory |
mercury start [-d] / stop / restart | Control the runtime |
mercury status / logs | Show status and recent logs |
mercury doctor [--platform] | Reconfigure; --platform prints a compatibility report |
mercury setup | Run the setup wizard again |
mercury upgrade [--force] | Upgrade to the latest version |
mercury telegram / discord / slack / signal | Manage channel access |
mercury bots | doctor, list, storage |
mercury skills | search, browse, view, install, remove, update, doctor |
mercury cloud | connect, disconnect, status, login, models |
mercury service | install, uninstall, status |
mercury web-reset-password | Reset the dashboard password |
mercury uninstall [--purge-data] | Remove Mercury, optionally with all data |
</details>
<details> <summary><b>In-chat commands</b></summary>
These run locally and do not use tokens. /help lists everything.
| Command | What it does |
|---|---|
/menu | Command picker |
/status, /trace [id] | Configuration and usage; what a turn did |
/new, /sessions | Fresh conversation; list and switch sessions |
/models | List providers; /models use <provider> to switch |
/budget, /saver | Token budget; Token Saver mode |
/permissions | Switch between Ask Me and Allow All |
/memory | Inspect and manage the Second Brain |
/code, /ws | Mercury Code; workspace view |
/research [topic] | Deep research mode |
/bg, /agents | Background tasks; sub-agents |
/bots, /bot <id> <task> | Bot fleet; give a bot a task |
/tools, /skills | Loaded tools; installed skills |
/cloud, /spotify | Mercury Cloud models; Spotify controls |
/stop, /halt, /reset | Stop work, stop everything, reset context |
/whatsnew | What changed in this version |
</details>
<details> <summary><b>Built-in tools</b></summary>
| Area | Tools |
|---|---|
| Files | read_file, write_file, create_file, edit_file, list_dir, delete_file, send_file, approve_scope |
| Shell | run_command, cd, approve_command |
| Git | git_status, git_diff, git_log, git_add, git_commit, git_push |
| GitHub | create_pr, review_pr, list_issues, create_issue, github_api (when GITHUB_TOKEN is set) |
| Web | fetch_url |
| Skills | install_skill, list_skills, use_skill |
| Scheduler | schedule_task, list_scheduled_tasks, cancel_scheduled_task |
| Memory | save_memory, search_memory |
| Agents | delegate_task, list_agents, stop_agent, dispatch_bot |
| Interaction | ask_user, update_plan, send_message, budget_status |
| Spotify | search, playback, queue, devices, playlists and more (when connected) |
</details>
<details> <summary><b>Files and configuration</b></summary>
Everything Mercury stores lives in ~/.mercury/, never in your project.
| Path | Contents |
|---|---|
mercury.yaml | Main configuration: providers, channels, budget, web |
.env | API keys and tokens |
soul/*.md | Personality: soul, persona, taste, heartbeat |
permissions.yaml | Scopes and approval rules |
skills/ | Installed skills |
schedules.yaml | Scheduled tasks |
sessions/ | Conversations |
memory/second-brain/ | Second Brain database |
bots/ | Bot personas, journals, queues and permissions |
boards.db | Kanban boards |
daemon.log, daemon.pid | Runtime log and process id |
</details>
成熟的开源Agent框架,权限与预算控制设计先进,TypeScript生态友好,维护活跃且社区反馈积极,是企业级AI应用的优选方案。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,mercury-agent Agent工作流 在AI工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | mercury-agent |
| 原始描述 | 开源AI工作流:Soul-driven AI agent with permission-hardened tools, token budgets, and multi-ch。⭐2.2k · TypeScript |
| Topics | AI工作流权限控制Token预算多渠道TypeScript |
| GitHub | https://github.com/cosmicstack-labs/mercury-agent |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-16 · 更新时间:2026-05-19 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。