mutx-dev/mutx-dev runs its control plane on SQLite with no account, enforces roles from the database, and returns block for a tool call that matches a tenant rule and allow for one that doesn’t.
Input
main at 5ad48f0, a local SQLite fileNeedsGit, Python 3.11,
uv, curl, sqlite3, no Docker, no API key, no accountEvidence
/health JSON, CLI output, two policy decisions, 58 testsPrerequisites
- macOS or Linux with Git,
curlandsqlite3; - Python 3.11 and
uv(plainpython3.11 -m venvandpipalso work); - port 8000 free, and about 500 MB of disk for the Python packages.
mutx.dev and api.mutx.dev is down, so this recipe stays on localhost. Nothing in it calls a model.
1. Clone and install
mutx CLI from the checkout into .venv.
2. Start the API on SQLite
WEB_CONCURRENCY=1. Turning off email verification lets a password account sign in without an email provider. The log ends with Database tables verified/created and Starting background agent monitor....
Open a second terminal in the same mutx-dev directory and check the probe:
3. Give the CLI a throwaway config
The CLI keeps its API URL and tokens in~/.mutx/config.json. Point HOME at a temporary directory in this terminal so your real config isn’t touched:
http://localhost:8000, so no extra flag is needed here.
4. Create and sign in an operator
register prints “Verify your email” even with verification off. The password needs an uppercase letter and a special character. Keep -u on login, because the login command treats localhost:8000 as “not set” and otherwise sends your password to https://api.mutx.dev (resolve_hosted_api_url).
5. Hit the role check, then grant the role
VIEWER and creating agents needs DEVELOPER. No API route grants roles, so write it into the database:
6. Register and stop an agent
creating and doesn’t contact OpenAI. Stopping it sets the status to stopped in the database.
7. Add a block rule and evaluate two tool calls
The CLI has no policy command, so use the API with the token the CLI saved:policy_store.py matches each rule’s pattern against the tool name as a glob or a substring, case-insensitively.
8. Run the matching tests
Expected evidence
/healthreturns"status":"healthy"and"database":"ready";- the first
mutx doctorshowsAuthenticated: noandAPI Health: healthy, with OpenClaw missing and documents not ready; mutx whoamiprintsEmail: operator@example.comandPlan: FREE;- the first
agents createprintsError: Insufficient permissions. Required roles: ['DEVELOPER'], and the second printsCreated agent: <uuid> - demo-agent; agents statusends withStatus: stopped;- the
shell.execevaluation returns"decision":"block"with one match fromno-shell, and theweb.searchevaluation returns"decision":"allow"with"No enabled policy rules matched"; - pytest prints
58 passed.
5ad48f0.
This recipe does not prove
- that an agent ran. The agent is a database record, and no process registered against it;
- that stopping it would stop a live agent process. The API writes no command to the queue agents poll;
- that the governed runtime in
src/security, its signed receipts or the approval flow ran./v1/policies/evaluateis the tenant rule check only, and the approval route needs a paid plan; - anything about PostgreSQL, Redis, Docker, the dashboard, the macOS app or the hosted service;
- that this setup is safe to expose. Email verification is off, the JWT secret is generated per process, and the role was granted by editing the database.