pre-1.0A Lock of the Lock Family · open source · Apache 2.0

Your agent reads the queue. You hold the key.

Any AI agent can inspect your RabbitMQ brokers through lockmq, with message contents masked. Connections and queue reads wait for you, and the agent never holds a password.

Install with Homebrew
brew trust davidgodefroid/tap
brew install davidgodefroid/tap/lockmq davidgodefroid/tap/lox cosign

Needs Docker, lockhub’s lox v0.12.0 or later and cosign v2.5.0 or later. Then lox add lockmq and lox run. The whole family: brew install davidgodefroid/tap/lockfamily.

Part of the Lock Family: one hub (lox run) approves for every Lock.

lockmq · profile devlox run · auto mode

Connect
askedonce per lox run sessionThe password is typed at your terminal, never by the agent.
List
autolockmq queues --filter 'orders.*'Queues, bindings, consumers, policies: answered at once.
Read a stream
autolockmq read order-events --from lastThe customer’s email comes back <redacted:rN.K>.
Peek · unmask
askedevery timeA peek requeues messages: it exists only on a profile you set to tier peek.

Approved · y

Your rules, per profile

Each action is auto, ask or deny in .lockmq/config.toml. These are the defaults.

What waits for you, and what does not, with the default rules.

See it run

Four steps. 1: in lox run, in a terminal of their own, the human types the broker password that the lock's console asks for. 2: an agent (here Claude Code) makes its first requests to the broker, lockmq_queues among them; lox run shows the question "connect on dev/dev" and the human presses y. 3: the agent gets the three queues of the vhost orders, then calls lockmq_read on the stream order-events; lox run approves it by a rule and lists it in its feed as auto:action. 4: the agent gets the messages back with the customer's email replaced by a reference.

Swipe sideways to see both terminals.

An agent (here Claude Code, left) lists queues and reads a stream; you answer in lox run (right): the broker password, then the first connection. The stream read passes on the default rules, and the customer’s email comes back masked. Recorded from one run with lockmq v0.10.0 and lox v0.12.1.

Why lockmq?

“Why does orders.failed fill up?” is a good question for an agent. Answering it means looking at queues, bindings, policies, consumers and, in the end, a few messages.

Handing the agent rabbitmqctl, the management API or an admin password gives it every write too: purge, delete, publish, shovels. It also gets every message body in clear.

lockmq moves the key and the decision out of the agent.

Broker credentials in the agent compared with lockmq
PropertyAgent with credentialslockmq
Agent never sees the broker passwordNoYes
Agent has no broker connectionNoYes
Only an allowlist of read operations existsNoYes
Message reads decided outside the agent, by your rules or by youNoYes
Message bodies, headers and properties maskedNoYes
Stream reads never store an offsetNoYes
Queue peek off by default, asked every time unless you loosen it, refused near the delivery limitNoYes
Policy loosening needs a human confirmationNoYes
Hash-chained audit log, never message content (limits)NoYes

In-agent approval is a convenience; a separate approval process is a boundary.

See what you approve

Before a read or a peek runs, the console builds its screen: the stream or queue, where it starts, what moves and the masking in force. The screen goes to lockhub as a signed ticket.

lox run decides it on your profile’s rules, or asks you. A peek shows its side effects before you answer.

╭─ PROD · rabbitmq.example.com:15671 / orders · user lockmq-ro · tier read ─────
│ requested by uid 1000 (alice) · pid 48211 · process "lockmq" (self-reported name)
│ agent: see the order events around 10:42 to explain a missing confirmation
│
│ READ stream order-events  from timestamp 2026-10-19T10:40:00Z  max 20
│
│ stream: first offset 1200311 · last committed chunk at 1402977 · via stream protocol
│ no offset stored · no message removed
│ PII: masked (2 mask rules, 1 allow rules; body redact-unknown; detectors: card, email, iban, phone)
│ auto rule: auto.read=auto
╰─ pending: ticket 01J…
Once decided, the console reads, masks, caps the output and hands the messages to the agent, framed as untrusted data. The audit log keeps who asked what, never the content.

Highlights

  • One key holder

    Credentials are typed at console start, or read from HashiCorp Vault. Never in argv, env, files, logs, the socket or error messages.

  • Catalogue first

    Overview and alarms, queues, one queue with its DLX, TTL, delivery limit and policy; exchanges, bindings, consumers, connections, stream offsets and lag.

  • Your rules, your decisions

    Per profile, each action is auto, ask or deny. By default lists and stream reads pass; the first connection and every peek are asked.

  • Peek, only if you allow it

    Reading a classic or quorum queue requeues messages. It exists only on a profile set to tier peek, and is refused near the delivery limit.

  • Masking for messages

    JSON bodies masked per leaf (redact-unknown on production), headers and properties by rule and name. Binary bodies become a size and a hash.

  • OS separation

    The Docker image runs the console under its own account. The kernel checks every peer on the socket.

  • The AI tightens, the human loosens

    The agent may add mask rules or tighten a profile. A new tier, limit, vhost, URL or looser rule waits for your confirmation.

  • Refusals the agent can act on

    Every refusal carries a stable code, a hint and a retry rule: rewrite, ask the user, or stop.

Quick start

  1. Install with Homebrew (the box above). Docker must be running.

  2. In your project, lox add lockmq asks where your broker is, sets up the lock and starts its console.

    cd your-project
    lox add lockmq
  3. In a terminal of its own, outside any agent, keep lox run open. Every ticket shows up there for your decision.

    lox run
  4. 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).

Without Homebrew, or step by step: the install guide

Know the limits

The console is the enforcement point. Skills, rules and MCP tool descriptions only guide the agent.

Masking is best effort. A queue peek is not read-only (messages are requeued), so it is off unless you allow it on a profile.

RabbitMQ lets the read permission purge a queue: lockmq never does, but grant read narrowly. lockmq has no writes of any kind.

Read the security model