MAQPNADocs

maqpna dev

Run a local MAQPNA (identity broker, gateway, test MCP server) and your agent under it

Get started-o json | yaml

Synopsis#

maqpna dev up [--dir .maqpna] [--gateway-port 8080] [--identity-port 8081] [--echo-port 8090] [--policy FILE]
              [--upstream NAME=URL]... [--model NAME=URL[,MODEL]] [--stub-llm [--stub-llm-script F]] [--no-echo] [--from-source]
              [--dlp-profile FILE] [--checkpoint-key FILE] [--gateway-config FILE]
              [--llamay MODEL [--llamay-bin PATH] [--llamay-port 11435]] [--kosa8 [--kosa8-host-ip IP]]
              [--client-audit FILE [--client-audit-pubkey HEX]]
maqpna dev run [--agent coder] [--namespace dev] [--user you@localhost] [--scope S]... [--session S] [--ttl 1h]
              [--kosa8-image IMAGE [--kosa8-cpus N] [--kosa8-mem-mb N] [--kosa8-keep]] -- CMD [ARG]...
maqpna dev fork [--session S] [--name STEM] [--attach=false] [--ttl 1h] [--sandbox kosa8] [-o json]
maqpna dev snapshot [--session S] [--id ID] [--sandbox kosa8] [-o json]
maqpna dev restore --checkpoint ID [--name STEM] [--attach=false] [--ttl 1h] [--sandbox kosa8] [-o json]
maqpna dev attest [--session S] [--sandbox kosa8] [-o json]
maqpna dev timeline [--session S | --last] [-o json]
maqpna dev env | status | down

Description#

up starts maqpna-identity, maqpna-gateway and (unless --no-echo) mcp-echo from the installed binaries (next to maqpna or on PATH); in a source checkout with --from-source, or when they are missing, they are built with go build. run mints a session token from the local broker and runs CMD with the same environment the operator gives a sandbox (MAQPNA_GATEWAY_URL, MAQPNA_TOKEN, MAQPNA_SESSION, MAQPNA_AGENT, MAQPNA_TOOL_<NAME>_URL), then prints what the session did. Exit code: CMD's. up --llamay MODEL also serves MODEL with llamay as model route "llamay": each session gets its own llamay inference context, forked with the session, and llamay's request audit is anchored in the ledger (fail closed). up --kosa8 serves the gateway on this host's LAN address and cross-anchors the ledger with kosa8d's audit; run --kosa8-image then runs CMD in a kosa8 microVM that can reach only the gateway, and fork live-forks a kept sandbox into a governed child session with its own token. snapshot checkpoints a kept sandbox together with its llamay inference contexts; restore boots the checkpoint as a new session (its own token, the checkpointed session as parent) and resumes those contexts. attest prints the sandbox's measurements (kernel, rootfs, image digests) and proves its egress is the gateway only (exit code 3 when it is not).

Subcommands#

Examples#

# Start a local MAQPNA, run your agent under it, then see what it did
maqpna dev up
maqpna dev run -- python agent.py
maqpna dev timeline --last

# Use a model route backed by the scripted stub model
maqpna dev up --stub-llm
maqpna dev down

# Serve a local model with llamay; run the agent in a kosa8 microVM and fork it
maqpna dev up --llamay qwen2.5:0.5b --kosa8
maqpna dev run --kosa8-image python:3.12-alpine --kosa8-keep -- python /work/agent.py
maqpna dev fork --session dev-1a2b3c4d

# Checkpoint a kept sandbox with its model state, boot it as a new session, prove its egress
maqpna dev snapshot --session dev-1a2b3c4d
maqpna dev restore --checkpoint dev-1a2b3c4d-20261016T101500 --attach=false
maqpna dev attest --session dev-1a2b3c4d -o json

What happens when you run it#

  • Prints a table by default; -o json or -o yaml print the data, and --jq EXPR filters the JSON.

Exit codes#

CodeMeaning
0success
1error (the message says what failed, with a hint when there is one)
2usage error: unknown flag, missing argument or bad value; the synopsis is printed
3a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command)

Terminal demo#

maqpna dev.cast

Last updated