Let any AI agent inspect your RabbitMQ brokers: message contents come back masked,
connections and queue reads wait for you, and the agent never holds a password.
An agent (here Claude Code, left) and lox run (right), where you answer. Recorded from one run with lockmq v0.10.0 and lox v0.12.1.
Quick start · How it works · Docs · Lock Family · Website
lockmq is a Lock of the Lock Family, harness security for AI agents. A console sits between your agent and RabbitMQ: it holds the broker credentials and the only broker connections, serves an allowlist of read operations and masks personal data in messages. The agent only asks.
Note
Pre-release (before v1.0): a release may still change the config files, the MCP tools or the CLI.
- The agent never holds a password. Credentials are typed at console start or read from Vault, in an account and a container the agent cannot reach.
- Approval outside the agent. Each message read becomes a ticket on
lockhub, decided in
lox run. Lists and stream reads pass on your rules; connections and queue peeks wait for you. - Personal data stays masked. Bodies, headers and properties are masked per field. On production, by default, every JSON body string and header string that no allow rule names is redacted; text bodies and properties go through rules and detectors.
- Nothing moves. Stream reads store no offset; there are no writes, and a queue peek (which requeues) exists only on a profile you allow.
Handing the agent rabbitmqctl or an admin password gives it every write
too, and every message body in clear. lockmq moves the key and the decision
out of the agent.
brew trust davidgodefroid/tap
brew install davidgodefroid/tap/lockmq davidgodefroid/tap/lox cosignlockmq runs in Docker: Homebrew installs the lockmq launcher, which runs
every command in the release's signed image. It also takes lockhub's lox
v0.12.0 or later and cosign v2.5.0 or later: lox add and lox run verify
every image with cosign. The lockmq formula pulls in neither. The whole
family instead, lox and cosign included:
brew install davidgodefroid/tap/lockfamily.
Without Homebrew, the signed install script of a release:
V=vX.Y.Z
curl -fsSLO "https://raw.githubusercontent.com/DavidGodefroid/lockmq/$V/scripts/install.sh"
less install.sh
LOCKMQ_VERSION=$V sh install.shInstall lockhub's lox v0.12.0
or later and cosign v2.5.0 or later beside it.
Linux and macOS, on amd64 and arm64 (CGO_ENABLED=0); on Windows, WSL 2
with Docker Desktop. Launcher, image, Vault image, lea and building from
source: docs/install.md.
-
In your project, add the broker.
lox addasks where it is (never the password), writes the profile, wires your agent and starts the console:lox add lockmq
-
In a terminal of its own, outside any agent, keep
lox runopen. Every ticket shows up there:lox run
-
Start your agent in the project (
claude,codex,gemini, …) and ask: "which queues have no consumer?"
lox add wires Claude Code; for Codex, Cursor or Gemini CLI, also run
lockmq init codex (or cursor, gemini). With
lea, run lox add in lea's projects
directory, then lea stop and lea. Step by step, by hand:
docs/install.md.
|
🔑 One key holder |
👤 Your rules, your decisions |
|
🕶️ Masking for messages |
🧪 Peek, only if you allow it |
More: the catalogue and the protocols, the safety model and its limits, and every profile key. A company bounds every profile of a machine with the family's managed configuration (lockmq's keys).
Two processes in two containers. Only the console holds the key.
sequenceDiagram
autonumber
participant A as 🤖 AI agent<br/>(lockmq mcp / CLI)
participant C as 🔐 lockmq console
participant L as 🎫 lockhub (lox run)
participant B as 🐇 RabbitMQ
A->>C: lockmq_queues (catalogue)
C->>B: GET /api/queues/{vhost}
C-->>A: selected fields (untrusted data)
A->>C: lockmq_read order-events from last
C->>L: ticket, screen masked
C-->>A: pending, ticket T
L-->>C: signed decision (your rule, or you)
A->>C: lockmq_read --ticket T
C->>B: unnamed stream consumer, at most read_max
C-->>A: masked, capped messages (untrusted data)
- The agent calls an MCP tool (
lockmq_queues,lockmq_read, …) or the CLI. The console checks the operation, the vhost, the tier and the arguments before any broker call. - Catalogue calls run at once. A read or a peek becomes a ticket on
lockhub, and the agent gets
pending; a ticket your profile's auto rules decide within a couple of seconds runs in the same call. lox rundecides, on your profile's rules or by asking you. The console checks the signed decision, reads, masks and caps the messages.
RabbitMQ 3.13 and 4.1, through the management API, the stream protocol and AMQP 0-9-1. The approval screen, the process layout and the protocols: docs/architecture.md.
- The console is the enforcement point. Skills, rules and MCP tool descriptions only guide the agent; the console's checks are the guarantee.
- OS separation. The console runs as its own account in its own container; the kernel checks every peer on the socket.
- Confined clients only. A lockmq client that does not run confined (on
the host, or in a container that sees the Docker socket) is refused, unless
a non-production profile sets
unconfined = true. The check covers the client, not the agent: a host agent that runslockmqthrough the launcher passes it, since the client runs in a throwaway container. To contain the agent itself, run it inside lea. - Allowlist, read-only broker user. What is not in the catalogue does
not exist. Use a
monitoringuser with emptyconfigureandwrite. - The AI tightens, the human loosens. The agent may add mask rules; any loosening of the policy waits for your confirmation in the console.
- Audit. Every decision, refusal and run goes to a hash-chained JSONL log, never with a message body, header or property value (limits).
- Known limits. Masking is best effort, RabbitMQ lets the
readpermission purge a queue, and whoever can rundockercommands can reach the console's container.
Every rule and limit: docs/safety.md. Threat model: docs/security-model.md.
| Doc | What it covers |
|---|---|
| docs/install.md | install paths, by hand, the launcher and its image, building |
| docs/docker.md | the setup guide: image, project, console, agent wiring, broker in a container |
| docs/usage.md | every command, auto rules, the console, the MCP tools, refusal codes |
| docs/configuration.md | every profile key, auto rules, SSH, PII rules, the managed configuration |
| docs/architecture.md | the life of a request, the approval screen, process layout, protocols |
| docs/safety.md | the safety model, peek, console keys, limitations, roadmap, the comparison and highlights in full |
| docs/security-model.md | principles, boundaries, threats and limits |
| CHANGELOG.md | what changed, release by release |
The site, davidgodefroid.github.io/lockmq,
is built from site/.
| Repo | What it does |
|---|---|
| lockfamily | The family site (lockfamily.dev) and the one-line installer. |
| locksql | SQL databases: the agent queries, PII comes back masked; connections and writes wait for you. |
| lockmq | RabbitMQ: masked queue inspection; connections, peeks and unmasked reads wait for you. |
| lockfile | Files (S3, SFTP, disk): the agent asks yes/no questions about files it never reads. |
| lockhttp | Outbound HTTP(S): reads of trusted hosts pass; anything that sends data or reaches an unknown host waits for you. |
| locklog | Logs: masked, bounded log search; the agent reads the logs, not the people in them. |
| lockssh | Commands over SSH: allow-listed commands run at once, the rest waits for you; the key never leaves the console. |
| lockhub | The approval hub and its lox CLI: lox run approves outside the agent's harness and never sees values in clear. |
| lockkit | The shared Go core of every Lock: console, policies, masking, signed tickets, audit, MCP. |
| lea | Runs many agents in containers, wired to the Locks. |
- Contributing: CONTRIBUTING.md. Build with
CGO_ENABLED=0 go build ./cmd/lockmq(Go 1.26+). - Security: report a vulnerability privately, see SECURITY.md.
- License: Apache License 2.0, see LICENSE and NOTICE.