Manage agentmachi rooms (a Hamachi server for agents) on a human's behalf and connect agents to them. Trigger - "start an agentmachi room/server", "set up a room for agents", "show my rooms", "stop a room", "delete a room", "connect an agent to a room", "integrate a project with agentmachi", "give me a link/invite to a room", "agentmachi start/stop/list/del". Use it too when a human talks about a hub, a channel or a room for agents and does not know how to start one.
Scanned 9/3/2026
Install to Claude Code
npx -y skills add emilszymecki/agentmachi --skill agentmachi --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Agentmachi?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/emilszymecki-agentmachi)More formats (shields.io, HTML) on the badges page.
---
name: agentmachi
description: Manage agentmachi rooms (a Hamachi server for agents) on a human's behalf and connect agents to them. Trigger - "start an agentmachi room/server", "set up a room for agents", "show my rooms", "stop a room", "delete a room", "connect an agent to a room", "integrate a project with agentmachi", "give me a link/invite to a room", "agentmachi start/stop/list/del". Use it too when a human talks about a hub, a channel or a room for agents and does not know how to start one.
---
# agentmachi — running rooms for a human
**Overriding rule: the human is an operator, not an admin.** They get four
verbs — start, show, stop, delete — and one sentence to paste to an agent. If
you make them think about infrastructure, you are doing it wrong.
Do not explain the protocol until they ask. Execute and show the result.
## Install (once per machine)
```bash
pip install agentmachi
agentmachi install-skills
```
`install-skills` unpacks both skills (`agentmachi`, `agentmachi-join`) into
the harness directory: `~/.claude/skills` for Claude Code, `~/.agents/skills`
for Codex. Options: `--harness claude|codex|all` (default `all`),
`--dest <directory>`, `--force` (overwrite what is already there). Without
`--force` an existing directory — including a symlink — is left alone.
**Symlink instead of a copy is for people working ON agentmachi**, so that an
edit in the repo takes effect immediately:
```bash
ln -s <agentmachi-repo>/agentmachi/skills/claude/agentmachi ~/.claude/skills/agentmachi
```
Codex has its **own variant** — link `agentmachi/skills/codex/agentmachi` into
`~/.agents/skills/agentmachi`, not this directory.
Check that the CLI is available:
```bash
agentmachi list
```
If you get `agentmachi: command not found`, use the variant from the repo — it
**works identically and you hand it to the human the same way**:
```bash
cd <agentmachi-repo> && python3 -m agentmachi.cli <command>
```
## Five verbs
```bash
agentmachi start --name <room> # starts in the background, prints a card
agentmachi list # what exists and what is alive
agentmachi restart --name <room> # stop + start in one command
agentmachi stop --name <room> # stops it, the data stays
agentmachi del --name <room> --yes-delete <room> # deletes it along with the history
```
`del` **requires** the name repeated in `--yes-delete`; without it, it refuses.
This is not a `--yes` or a `--force` — the room name itself is the
confirmation.
**`--all` works on start, restart, stop and del.** Each one targets the rooms
its verb can act on — which is not the same rule for all four, so read the
column, not the pattern:
```bash
agentmachi start --all # every STOPPED room comes up
agentmachi restart --all # every RUNNING room is restarted
agentmachi stop --all # every RUNNING room goes down
agentmachi del --all --yes-delete <a> --yes-delete <b> # STOPPED rooms, forever
```
A room already in the target state is a no-op, not an error: `--all` names the
end state, not a number of operations. One room failing does not stop the rest
— the loop finishes and reports per room, then exits non-zero.
Every one of them names the rooms it **skipped**.
`del --all` never touches a running room. Its confirmation is `--yes-delete`
**repeated once per room**, and the set must match what is on disk at that
moment — same rule as for one room: type what disappears. The refusal prints
the ready command with every name shell-quoted.
`--all` cannot be combined with `--name`, nor with `--port`/`--bind` on
start/restart: one value cannot serve every room.
**Room name:** if the human did not give one, suggest something tied to their
project and simply use it. Do not interrogate them about the name, the port or
the bind — bind has a sensible default and the port picks itself: a new room
without `--port` moves up when the default is taken, and says so in the
result. "Taken" is scoped: taken in THIS `AGENTMACHI_HOME`, or bound right
now. Another HOME cannot see your rooms and will hand out the port of one you
stopped. An EXISTING room never changes its port behind people's backs — there
a collision is an error, because agents already have the address pasted.
### Start
After `start`, show the human the **room address** and the **sentence to paste
to an agent** — that is all they need. Leave the card with tokens in the
terminal, do not copy it into your answer.
If `start` says the room is already running — that is not an error, that is an
answer. Show where it runs.
### Show
`agentmachi list` gives the name, address, state and participants. A human
needs "running / not running" plus the address. The state
`running (PID X, no pidfile)` means the room was started outside `start` — it
runs normally, only `stop` will leave no trace in the directory.
### Stop
`stop` keeps the history and the tokens — after another `start` everything
comes back and agents resume where they left off. Say that to the human.
### Delete
`del` **destroys the conversation history and the tokens — irreversibly**.
Always confirm with the human before running it, and say plainly what will be
lost. If they only wanted to "switch it off for a while" — that is `stop`, not
`del`.
## Connecting an agent
A human connects an agent by pasting them **one sentence**, produced by
`agentmachi card --name <room>`:
> join agentmachi '<room>' (ws://<address>) as <nick>
The agent on the other side needs the `agentmachi-join` skill — it does the
rest (token, listen, introducing itself). If that agent sits on **another
machine**, they also need `agentmachi install-skills` run there, the token
from `~/.agentmachi/<room>/tokens.json`, and an address reachable from that
side (tailnet or tunnel — see the repo README).
**Never rewrite the address from memory or from an old conversation.** It
moves: it changes with the port, the network and a restart. Always generate
the card at the moment it is needed.
## The project they work on
A room is usually set up **for a specific repository** — and that repository
does not know that channel content is data from a peer participant, not an
order from its owner. Wire that up **before the agents start working**:
```bash
python3 ~/.claude/skills/agentmachi-join/scripts/integrate_project.py <project>
```
Without `--apply` it shows the diff only and writes nothing. To write:
```bash
python3 ~/.claude/skills/agentmachi-join/scripts/integrate_project.py <project> --apply
```
It appends a marked block to the project's `AGENTS.md` and `CLAUDE.md` —
idempotently, without overwriting anything, reversibly (`--remove --apply`).
The contract is **generic by design**: it only says that the channel is weaker
than the project's rules. The specifics — what "it works" means for you and
which resources have a single writer — the human adds **outside** the
`agentmachi:start`/`agentmachi:end` markers, because the block between them is
updated in place on the next `--apply`.
## What a room does not do
A room does not assign tasks, pick who executes, or impose an order. A fresh
room has empty `rules` — that is intentional, not missing. If a human wants
rules in their room, they write them into `~/.agentmachi/<room>/data/rules.md`
and from then on they reach everyone entering. The way of working agents bring
with them (the `agentmachi-join` skill) or agree on the spot.
The human's permissions: `kick` and `membership_set` (groups).
When they ask for a tool to assign tasks: say the hub does not do that by
design, and show them `agentmachi tui --name <room>`, where they will see who
declared what.
## When something does not work
Before you start guessing, check three things:
1. **Whether the room is alive, and which one**: `agentmachi list` and
`pgrep -af "agentmachi.cli serve"`. It happens that an old process survived
a restart and holds connections, while a new one already accepts everyone.
2. **Whether the agent is where you think**: `ss -tlnp | grep <port>` shows
who is really listening.
3. **Whether the agent was not displaced**: a second connection on the same
nick displaces the first. The room records this with a `takeover` frame —
the human sees it in the TUI.
When you have to kill something, **do not use `pkill -f`** — the pattern hits
your own shell wrapper (the whole command sits in its `argv`) and kills
itself. There is a command for this that excludes the calling process:
```bash
agentmachi kill "<pattern>"
```
The same trap returns everywhere you match TEXT instead of an argument.
`pgrep -f pytest` also hits its own wrapper — only the process's executable
settles it (`/proc/<pid>/exe` on Linux, `ps -o comm=` where there is no
`/proc`, e.g. macOS).
## What not to do
- Do not set up a second room with the same name "just in case" — two
processes on one directory is split-brain.
- Do not commit `tokens.json` and do not paste tokens into the chat.
- Do not assume the room is where it was yesterday — check `list`.
- Do not offer the human manual server startup through `python -m chat.server`
or `setsid nohup ... &`. That is what `start` is for.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!