repowiserepowise

App

cosmicstack-labs / mercury-agent

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

★ 4,032stars on GitHubTypeScriptMIT

This connects Repowise to cosmicstack-labs/mercury-agent's code. It does not install mercury-agent.

Repowise maps public repos from their source. Not affiliated with cosmicstack-labs. What is Repowise?

github.com/cosmicstack-labs/mercury-agentIndexed at 3e3b44a

What is mercury-agent?

mercury-agent is an open-source AI agent that lives on your machine and keeps working after you close the terminal. It keeps a memory of durable facts on your disk and checks file access, shell commands and outbound requests against rules you set before acting. You reach the same agent from a terminal, Telegram, Discord, Slack or Signal, and it is written mainly in TypeScript. To install it, run npm i -g @cosmicstack/mercury-agent. Its code health is 6.5 out of 10 (Fair), ranked #184 of 4,000+ indexed repos. The last commit to mercury-agent was on Oct 13, 2026, and 16 people have contributed.

As of commit 3e3b44a, indexed Oct 14, 2026. What it is comes from a model reading the README; the rest is measured from the source and git history, not from the maintainer.

For agentsmercury-agent.md

Repo facts: type, license, health, rank, contributors
mercury-agent facts
TypeApp
LicenseMIT
Code health6.5 / 10 (Fair)
Health rank#184 of 4,000+ indexed repos
Last commitOct 13, 2026
Contributors16
Bus factor1
Size733 files, 95,776 lines

Install mercury-agent

Commands copied from the README

  1. 1Install Mercury with npm on Node.js 22 or newer.
    npm i -g @cosmicstack/mercury-agent

Full install notes on GitHub

Explore mercury-agent

Ask about this code in your agent

This connects Repowise to mercury-agent's code. It does not install mercury-agent. To install mercury-agent, use the install steps.

Useful if you want to change or fork mercury-agent: your agent can ask how it is put together and get answers that cite its files.

Ask about mercury-agent

Answers come from mercury-agent's README and source, with the files they cite. Two free answers a day without an account.

Featured answer

mercury-agent is an open-source AI agent, written mainly in TypeScript, that runs on your own machine and keeps working after you close the terminal. It keeps durable memory on disk and checks file access, shell commands and outbound requests against permission rules you set, plus a daily token budget. Messages arrive through channels (the terminal, Telegram, Discord, Slack, Signal and a local web dashboard), and a single background process owns those channels so a terminal session attaches to it. The repository has 733 files across layers including UI (64), Application (192), CLI (18), API (15), Service (34), Utility (31), Config (5), Data (2), Types (5) and Docs & Tooling (206). To start reading, begin with src/index.ts for the entry point, src/channels/cli.ts for the terminal channel, and src/core/agent.ts for the agent logic, then src/bots for the scheduled specialists.

Files per layer in mercury-agent10 layers.

Basis: Inferred · knowledge graph· as of 3e3b44a

Want this for your own codebase? Map your repo free

About this page

Get a page like this for your own codebase

Repowise built this map of cosmicstack-labs/mercury-agent from its source and git history. It parses every symbol, draws the dependency graph, scores each file's health from complexity, duplication, coverage and churn, finds hotspots and owners in the history, and writes documentation for every module. Your coding agent reads the same index over MCP, so its answers cite real files.

Free for 2 public repos, with a page like this one. No card. See how Repowise works

Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed. Star Repowise on GitHub

cosmicstack-labs/mercury-agent FAQ

What is mercury-agent?

mercury-agent is an open-source AI agent that runs on your machine as one background process. It keeps its memory in a SQLite file on your disk and checks its actions against permission rules you set.

How does mercury-agent work?

mercury-agent runs one background process that owns its channels, bots and web dashboard. Each message from the terminal, Telegram, Discord, Slack or Signal reaches the same agent, which checks every action against your rules and a daily token budget.

How do I install mercury-agent?

Install mercury-agent with npm using Node.js 22 or newer, then run mercury to start the first-run setup wizard. Upgrades use the mercury upgrade command. See the install steps

What language is mercury-agent written in?

mercury-agent is written mainly in TypeScript, with some JavaScript and shell scripts. Its primary language is TypeScript.

How is the mercury-agent code organized?

The src directory holds most of the agent runtime, including src/channels, src/core and src/bots. The ui directory holds the browser UI, website holds the Docusaurus documentation site, and scripts holds build tooling.

Who is mercury-agent for?

mercury-agent is for people who want an AI agent on their own machine that remembers what matters and asks before it acts. It also suits people who want it to keep working while they are away.

What license does mercury-agent use?

mercury-agent is licensed under MIT, as stated by its SPDX identifier MIT. You can use, modify and redistribute it under those terms.

Code health

6.5out of 10Fair

Hotspots average 4.2, the place fixes pay off most.

On the leaderboards:#59 of 70 TypeScript repos

Key features of mercury-agent

  • Keeps durable facts such as preferences, goals and decisions in a SQLite file under ~/.mercury, which you can inspect, pause or clear with /memory.
  • Checks file access, shell commands and outbound requests against rules you set, and asks for approval before risky actions.
  • Enforces a daily token budget on every turn and can trim context or route routine work to a cheaper model in Token Saver mode.
  • Lets you reach the same agent, with the same memory and permissions, from the terminal, Telegram, Discord, Slack, Signal and a local web dashboard.
  • Runs as a background process under a login service on each supported OS and restarts itself after a crash.
  • Provides Mercury Code, a full-screen coding environment that works inside a repository and reports success only after a build, test or typecheck passes.

How cosmicstack-labs/mercury-agent works

Messages enter through channels: the terminal, Telegram, Discord, Slack, Signal and a local web dashboard all reach the same agent. src/channels/cli.ts implements the terminal channel, and src/index.ts is one of the entry points for starting the program. A single background process owns the channels, bots and web dashboard, so running mercury in a terminal attaches to that process instead of starting a separate one. The agent logic lives in src/core/agent.ts, and each action it takes is checked against permission rules and a daily token budget. src/bots holds the code that defines and checks Mercury Bots, the persistent specialists that run on schedules and deliver finished files. The ui directory holds the browser UI foundation, with src/ui/App.tsx as one of its entry points, and website holds the Docusaurus documentation site. scripts holds build-adjacent tooling such as vendor patching and native dependency checks.

The codebase has 733 files and 4,898 symbols in 6 modules, led by TypeScript, JavaScript and Shell. Code health is 6.5 out of 10, rated fair.