v0.1 Pre-release · open source, Apache 2.0

Your AI reads the queue.
You hold the key.

Let Claude Code, Codex, Cursor or Gemini CLI inspect your RabbitMQ brokers without ever handing them a password.

lockmq puts a human-held console between your AI agent and RabbitMQ. The agent asks; the console, running in a terminal you keep in view under its own account, holds the broker credentials and the only broker connections, serves an allowlist of read-only operations, masks personal data in messages and waits for your approval before any message content leaves it. The agent never sees a credential and never opens a connection.

  • Linux and macOS
  • amd64 and arm64
  • RabbitMQ 3.13 and 4.x
  • Management API, stream protocol, AMQP 0-9-1
  • Apache 2.0

See it run

Claude Code, in the account alice, lists the queues of the vhost orders through lockmq, then asks to read the last 3 messages of the stream order-events. The lockmq console, in its own account, shows the approval screen; the human types y, and Claude Code gets the messages back with the customer's email replaced by a reference.

Swipe sideways to see both terminals.

Claude Code (left, account alice) lists queues at once: a catalogue call needs no approval. Reading a stream stops in the lockmq console (right, account lockmq) until you type y; the messages come back masked, the customer's email as a <redacted:rN.K> reference.

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), and 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
Every message read approved by a humanNoYes
Message bodies, headers and properties maskedNoYes
Stream reads never store an offsetNoYes
Queue peek off by default, never auto-approved, refused near the delivery limitNoYes
Policy loosening needs a human confirmationNoYes
Append-only audit log (never message content)NoYes

See what you approve

When the agent asks to read a stream, the console shows you this screen and waits. Nothing is read until you approve; on a production profile you type the profile name, not y.

╭─ 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 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)
╰─ Type the profile name "prod" to approve:
On approval the console reads, masks, caps the output and hands the messages back to the agent, framed as untrusted data. The audit log keeps who asked what, never the content.

No answer within 5 minutes means denied.

Highlights

  • One key holder

    Credentials are typed at console start, or read from the OS keychain or HashiCorp Vault. Never in argv, env, files, logs, the socket or error messages; URI passwords are stripped from every answer.

  • Catalogue first, no prompt

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

  • Messages, approved

    read reads a stream from first, last, an offset or a timestamp with an unnamed consumer: nothing stored, nothing moved. You approve each read.

  • Peek, only if you allow it

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

  • Masking for messages

    JSON bodies masked per leaf (redact-unknown on production), headers and properties by rule and name, value detectors; binary bodies reduced to size and hash.

  • OS separation

    lockmq install 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 or URL waits for your confirmation in the console.

  • 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 (see the Install page for packages, checksums and signatures)
curl -fsSL https://raw.githubusercontent.com/DavidGodefroid/lockmq/main/scripts/install.sh | sh

# 2. Separate the console from the agent (once per machine)
lockmq install

# 3. In your project: a broker profile, then your agents
lockmq setup
lockmq init

# 4. In a session of the lockmq account, start the console and keep it open
lockmq console --profile dev --project DIR

Then ask your agent: “which queues have no consumer?”. Catalogue calls answer at once; message reads wait for your approval in the console. lockmq doctor checks the setup.

Full install options, checksums and signatures

The lock family

Human-gated tools for AI agents, built on the same console, separation and approval model.

  • locksql

    Databases: MariaDB, MySQL, PostgreSQL, SQLite. Your AI writes the query; you approve it.

  • lockmqYou are here

    Message queues: RabbitMQ. Your AI reads the queue; you approve each message read.

  • lockfile

    Files: your AI asks yes/no questions about a file it never reads.

  • lockkit

    The shared Go framework: console, separation, approval, masking, audit, MCP.

Know the limits

The console is the enforcement point; skills and 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. v0.1 has no writes of any kind.

Read the security model