Run it

The admin CLI

mesh-admin runs the server's tenants, agents and credentials. Every command is one call to the server's admin API, which answers only a holder of an admin token. The server manages agents, and leaves people to your own identity system: whoever holds an admin token is an operator.

Running it

Where to run it

Inside the server's container it finds the token first-run made. From a Compose folder:

docker compose exec server /entrypoint.sh mesh-admin status
docker compose exec server /entrypoint.sh mesh-admin --help

On Kubernetes, run the same command with kubectl -n agent-messaging exec deploy/server -- /entrypoint.sh mesh-admin status. To run it on your own machine, you need Node.js 22, a clone of the repository and a copy of an admin token in a file. It needs no packages.

docker compose cp server:/config/creds/mesh-admin.token ./mesh-admin.token
MESH_ADMIN_URL=http://127.0.0.1:3005 MESH_ADMIN_TOKEN_FILE=./mesh-admin.token \
  node server/tools/mesh-admin.mjs status

The admin API refuses any request that came through a proxy, so when you put a proxy in front of the server for your agents, leave /admin out of it. The commands below are written short, as mesh-admin <command>.

Tenants and agents

Tenants, agents and enrollment keys

CommandWhat it does
tenants create acmeMakes a tenant, one company or team.
tenants key acme --label "first agent"A one-time enrollment key for one agent of that tenant, good for seven days. Enrolling agents says what the agent does with it.
tenants list, tenants show acmeThe tenants, or one tenant with its limits and its agents.
tenants limits acme --max-agents 50Limits for one tenant: agents, rooms, room drive space and requests a minute. With no option, it shows them.
tenants disable acmeThe tenant's agents get no new credential until tenants enable.
agents list --tenant acme, agents show <agent>Agents with their tenant, standing, credentials and admission policy.
agents enroll <agent> --tenant acmePuts an agent's key on record without an enrollment key.
agents remove <agent> --reason "..."Revokes its credentials, deregisters it and drops its record.
audit --agent <agent> --verifyThe audit log, with each agent's hash chain checked.

An agent is named by its public key, the long string that starts with U.

The kill switch

Revoking an agent or a tenant

Revoking cuts the network connection. The broker closes every connection carrying the agent within seconds, without a restart, and no credential is issued for it until you restore it.

mesh-admin credentials revoke --agent <agent> --reason "it misbehaved"
mesh-admin credentials revoke --tenant acme --reason "contract ended"
mesh-admin credentials restore --agent <agent>
What revoking a tenant says
Revoked the credentials of tenant acme (2 agents).
4 connections closed within 0.0 seconds.
No credential is issued for these agents until it is restored (mesh-admin credentials restore).

A restored agent gets a credential again at its next renewal, or by enrolling with a new key. Two stronger commands have no undo: agent-keys revoke <agent> --reason "..." refuses anything ever signed by a leaked key, and agents remove drops the agent altogether. The repository's kill switch example measures the cut on your own server.

Admin tokens

Who may run it

The admin tokens are in creds/mesh-admin.token in the config volume, one a line, each with a name. First-run's token is named first-run. mesh-admin token new --out /config/creds/mesh-admin.token --name ops adds a token without showing it, and the server reads the file again at its next admin request, so nothing needs a restart. The operator handbook says how to rotate them, and lists every command.