# Updating the agent

> How mmw-agent tells you about a new version, what mmw-agent update does, how to update by hand, check your version and go back to an earlier one.

Each client's settings name one specific agent version, for example `mmw_agent-0.1.14-py3-none-any.whl`. So the agent does not update itself: a new version starts working when that link in the settings changes. One command does it.

## How you learn about a new version

- Once a day the agent (since 0.1.13) checks whether a new version is out. The check goes to app.mmwhub.tech and takes at most a second and a half. If the server does not answer, the agent stays silent.
- If a newer version exists, Claude Code mentions it in one line at the start of a session and offers the update command.
- In your account, the Clients section shows the agent version for connections that go through the local agent. An older one is marked "outdated", and hovering over the mark shows the update command.
- An email is sent only for important security fixes. Regular versions get no email.

To turn the daily check off, set `MMW_UPDATE_CHECK=off`.

## Updating with one command

Run the command with the link to the new version in a terminal:

```bash
MMW_ENDPOINT=https://mcp.mmwhub.tech uvx --from https://app.mmwhub.tech/downloads/mmw-agent/mmw_agent-0.1.14-py3-none-any.whl mmw-agent update
```

The link in the command always points to the new version: agents before 0.1.13 have no `update` command.

What the command does:

1. Looks up the latest version number and checks that it is newer than yours.

2. Downloads the new version and compares its SHA-256 checksum with the one published on the site. If they differ, nothing changes.

3. Changes the agent link in the MMW settings of Claude Code, Codex, Cursor and Claude Desktop, and in the Claude Code hooks. If the session start hook is missing, it adds it.

4. Prints the result for each client: updated, already on this version, or not found.

Your key, server address and other settings stay as they were. The command does not ask for the key and never shows it. Clients without MMW are left alone. Before changing a file it saves a copy next to it named `<file>.bak-mmw-update-<time>`.

After the update, restart the apps whose settings changed.

To only check for a new version without changing anything:

```bash
MMW_ENDPOINT=https://mcp.mmwhub.tech uvx --from https://app.mmwhub.tech/downloads/mmw-agent/mmw_agent-0.1.14-py3-none-any.whl mmw-agent update --check
```

## Updating by hand

You can change the version number in the link yourself. The link appears in each client's MMW settings (`uvx --from …/mmw_agent-<version>-py3-none-any.whl mmw-agent`) and in the Claude Code hooks in `~/.claude/settings.json`. Where each client keeps its settings is on the [Agent configuration](/agent/configuration/) page. All published versions and their checksums are listed in https://app.mmwhub.tech/downloads/mmw-agent/SHA256SUMS.

## Checking your version

```bash
MMW_ENDPOINT=https://mcp.mmwhub.tech uvx --from <link from your settings> mmw-agent status
```

The `mmw_sync_status` tool also reports it in `agent_version`. If the agent already knows about a newer version, `latest_version` and the update command are there too.

## Going back to an earlier version

Earlier versions stay on the site. To go back, put the earlier version number back into the link by hand, or restore the settings files from the `*.bak-mmw-update-*` copies the update made. Then restart the apps.

The `update` command only moves forward. To go to an earlier version, use one of the ways above.

## What's next
