ReferenceFormats and configConfiguration

Configuration

Everything here belongs to the runtime, the part that runs on your own machines.

Most people never open this page. memnox setup writes sensible defaults, and the file you actually edit is memnox.policies.yaml. Reach for this when you are running the runtime as a service rather than on a laptop.

Where things live

Path

memnox.policies.yaml

Your rules, in the repository, reviewed in a diff like any other file. This is the one you edit.

~/.memnox/config.json

The agent token, mode 0600. Written by memnox setup, because a GUI-launched editor inherits no shell environment and would otherwise reach the runtime with no credential at all.

~/.memnox/policies.json

Which policy files belong to which project on this machine. Paths only. Rule content never leaves the repository that owns it.

.memnox/code-graph.json

The import graph, written by memnox graph build. Safe to delete and rebuild.

Running it as a service

bash
memnox serve --port 7466 --data-dir /var/lib/memnox

--port is the port to listen on, 7466 by default. --data-dir is where the runtime writes its files when no database is configured; it defaults to .memnox in the working directory, which is fine for a laptop and wrong for a service, because a service's working directory is not somewhere you want state. There is also -H, --host, which defaults to 127.0.0.1, deliberately not reachable from another machine until you change it.

Storage

Leave both URLs unset and the runtime keeps everything in plain JSON and JSONL files. That is a real code path rather than a demo mode, and it is what makes "no account required" true.

Flag

--database-url

A shared Postgres, so several runtime processes see the same agents, approvals and audit log. Needed the moment you run more than one.

--redis-url

One rate-limit budget and one session-taint store across every process. Without it each process counts alone, so three processes enforce three times the limit you configured. If this is set and Redis is unreachable, startup fails rather than quietly degrading to that.

--data-dir

Where the file-backed stores live. Ignored once a database URL is set.

--audit-retention-days

How long decisions are kept, pruned on an hourly sweep. 0 keeps everything. Choose deliberately: both answers are defensible, and "nobody decided" is the one that causes trouble.

How strict it is

Flag

--default-effect

What happens when no rule matches. allow is the default, so a first install observes rather than blocking. block is the hardened posture, and switching to it is the real decision on this page.

--enforcement

Enforce in one environment while still observing in another, so staging can be strict before production is.

--rate-limit

How many actions an agent may take in a window. Only an action that actually proceeds spends a slot.

Guards

Each guard is a separate flag on purpose. memnox setup turns them all on because a laptop wants them on; serve makes you name them, so a server never gains a guard because a local default moved. The flag list in your deployment config is the record of what you chose.

Flag

--behavior-guard

Escalates novel destructive actions, bursts and boundary probing, measured against what this agent normally does rather than a global norm.

--trust-guard

Escalates risky actions from an agent whose trust score has fallen.

--verification-guard

Escalates the next action from an agent that never reported how its last one turned out.

--dependency-guard

Governs dependency.add: known-vulnerable versions, and licenses you cannot accept. An unknown license raises nothing, because a lookup failure must never cause a wrongful block.

--code-graph

Path to the import graph. Turns on blast radius, so an edit to a utility is treated as an edit to whatever imports it.

--protected-path

The paths blast radius escalates for, e.g. *payment/*. Repeatable.

Identity and notification

Flag

--admin-token

Require this bearer token on admin routes.

--tls-cert · --tls-key · --tls-ca

Serve over TLS, and accept mTLS client certificates as agent identity. The certificate's subject CN is the agent name.

--approval-webhook

Announce pending approvals to a Slack-compatible endpoint, so a request reaches somebody instead of waiting to be noticed.

Environment variables

Variable

MEMNOX_AGENT_TOKEN

The agent credential. Wins over the config file, which is how CI passes one without writing anything to disk, and how the MCP firewall is given one.

MEMNOX_ADMIN_TOKEN

Same as --admin-token. This is the form to use in a container: a token on the command line is visible in the process list to anyone on the box.

MEMNOX_DATABASE_URL

Same as --database-url. Same reasoning: it usually carries a password.

MEMNOX_REDIS_URL

Same as --redis-url.

MEMNOX_DIFF_BASE

The default git ref memnox ci diffs against. Falls back to HEAD~1. Set it in the pipeline so the scan covers the whole branch rather than the last commit.

When two disagree

shell environment  >  config file  >  built-in default

If a value is not what you expect, check the shell first. That is the answer roughly every time.