AI agents on your own machine

A Mercur agent is Claude Code working for your team on a computer you control. You connect a computer once, create agents on it from the console, and give each agent the repositories it needs. From then on your team can talk to it in the console, in Slack or from Claude, and it can run on a schedule or whenever another tool sends a webhook.

The code stays on your computer, and the agent runs with your Claude Code account on that machine. Mercur keeps the agents organized, delivers messages and webhooks to them, and records what each run did.

These are AI agents. They are not the CLI agent, the small program that forwards a public URL to a port on your machine. You can use either one without the other.

Agents are included on Free, Solo and Team. A guest without an account cannot create one.

Open Agents

What people use agents for

  • Answering questions about the code. A product manager asks "what happens when a customer cancels mid-month?" and gets an answer based on the code itself, with the files it came from.
  • Routine development work. A failing build or a new bug report starts a run that looks into it and prepares a fix on a branch for someone to review.
  • Regular reports and posts. Release notes every Friday, a morning list of the branches the agent prepared overnight, posted to Slack.

What you need

  • A Mercur account on Free, Solo or Team, with Manage access to agents. The workspace owner always has it; other members get it in Settings → Members.
  • A computer that stays on while agents should work: your laptop, a desktop in the office or a small server. It needs Claude Code installed and logged in, and git 2.36 or newer.
  • An empty folder on that computer. Every agent gets its own folder inside it.
  • The Mercur CLI 0.8.0 or newer, or the Mercur desktop app for macOS 0.10.0 or newer.

1. Connect a computer

A connected computer is called a host. It runs the agents created on it and only touches the folder you give it.

With the CLI. Sign in (approve the code in your browser), then start the host with its folder:

Sign in
mercur login
Connect this computer
mkdir -p ~/mercur-agents
mercur host start ~/mercur-agents

The host runs in the foreground; Ctrl+C stops it and every agent on it. Run the same command again to bring it back. The first start registers the computer under its hostname; pass --name to choose another name.

With the desktop app. Open Agents in the console inside the app and use the This computer card: pick a folder, choose what agents on this computer may do, and select Connect this computer. Start, Stop and Disconnect are on the same card.

Once connected, the computer appears on the Agents page with a green dot.

2. Create an agent

On the Agents page select New agent, choose the Computer, give the agent a Name and select Create agent. The agent shows "Setting up…" for a moment while the computer prepares its folder, then it is ready. If the computer is offline, the agent is created anyway and starts when the computer connects.

Each agent has a few settings that decide what it may do:

SettingWhat it controls
Highest mode

Read-only: the agent reads code and answers. Edit: it may also change files, commit and run the commands you allow.

ModelsAny model, or only the Claude models you list.
Allowed commandsCommands an Edit run may execute, one per line, for example npm test.
Runs at onceHow many tasks the agent works on at the same time (1 to 4). The rest wait in its queue.

A chat or an automation picks its own mode, but never above the agent's highest mode.

3. Talk to it

Open the agent and go to the Chat tab. Select New chat, choose Read-only or Edit, and ask something:

Where do we send the password reset email, and what happens if the user's address bounces?

The agent reads its folder and answers. A chat is private to the person who started it. When the computer is offline, chat pauses until it is back.

4. Give it repositories

An agent is most useful with your code in front of it.

  1. In Settings → Git accounts, select Connect GitHub or Connect GitLab and approve access.
  2. Open the agent's Repositories tab and select Add repository. Pick the repository, the folder name and the Start branch new work begins from.
  3. Leave Agents may push branches off if the agent should only read and suggest. Turn it on if it may push its own branches for you to review.

The computer copies the repository into the agent's folder and keeps it up to date before each run. Only the person who added a repository can change it. Disconnecting a Git account keeps the copies on the computer, but the agent stops using those repositories until you add them again with a connected account.

5. What you control

Agents run on your computer with that computer's access, so decide how much they may do before you point them at real work.

  • The agent's settings. The person who created the agent sets its highest mode, models and allowed commands on the Settings tab.
  • The computer's limits. The computer's owner sets limits for every agent on it in the computer's Settings on the Agents page: highest mode, models, allowed commands, how many agents it runs and how many each member may create, and the prefix that pushed branches must start with (mercur/ by default). A computer can also set its own limits when it starts, which the console cannot raise:
A computer whose agents only read and never push
mercur host start ~/mercur-agents --cap-max-mode read-only --no-push
  • Pushing. An Edit run can push a branch when the repository allows it and the computer does not forbid it. It never pushes to the repository's default branch and never force-pushes. Keep a person in charge of what gets merged.
  • A dedicated place. The agent works with the access of the computer it runs on. Give agents their own folder, ideally their own user account or machine, and keep personal files and credentials out of reach.

6. Memory

Every agent has a memory folder for notes it keeps between runs: how your team names things, which service owns what, decisions it was told about. Each automation chooses whether its runs see memory: Off, Read or Read and write. Keep secrets out of memory; anyone who can work with the agent may see what it remembers.

7. Manage computers

List the hosts of this computer and their folders (no network needed):

Run
mercur host ls

Remove a host and the folders of its agents (other files under its folder are left alone):

Run
mercur host remove <name>

You can also delete a host from its ··· menu on the Agents page; its agents are removed with it.

Next steps