Agents
Give each coding agent its own sandbox, a token scoped to it, and a signed record of what it did.
An agent works in a sandbox the way an engineer works in production: it deploys, signs in, reads mail, runs jobs and reads logs. It holds a sandbox token, which reaches one sandbox and nothing else, and every call it makes is recorded against the person it acts for.
Hand over a sandbox
Create the sandbox with your project token, then give the agent the sandbox token that parity up prints once:
parity up --sandbox fix-invite-expiry --ttl 4h
# → "token": "pst_t7acme-fix-invite-expiry_…"Start the agent with that token. With a sandbox token, every command targets its sandbox, and parity up updates it in place:
PARITY_API=https://api.parity.ninja PARITY_TOKEN=pst_t7acme-fix-invite-expiry_… claudeOr connect it over MCP, remote or local; see MCP:
claude mcp add parity -e PARITY_API=https://api.parity.ninja -e PARITY_TOKEN=pst_… -- parity mcpWhat the agent does
A typical loop, in CLI or MCP terms:
parity up/sandbox_syncafter each change, andsandbox_statusuntilready.- Drive the app through its public URL,
https://web--fix-invite-expiry--t7acme.env.parity.ninja. - Create users with
parity auth user create ana@acme.test --org acme --role admin, or through the app's own sign-up, and sign in with a one-time link fromparity signin ana@acme.test. - Wait for mail with
parity inbox wait --to bob@acme.testand follow its links and codes. - Run jobs with
parity run digest, and debug withparity logsandparity exec. - Attach evidence with
parity proof addand export a signed bundle withparity proof export.
Every command prints JSON. Over MCP, no call waits more than about 50 seconds; a tool still waiting returns a next hint.
What a sandbox token cannot do
| Action | Sandbox token |
|---|---|
| Use, update and destroy its own sandbox | Yes |
| Reach another sandbox | No: wrong_sandbox before any lookup |
| Create sandboxes | No |
| Promote, freeze, change members or domains | No |
| Reveal secret values, reach the production database, exec in production | No, whatever the person's role |
| Widen the egress allowlist | No: a host the promoted manifest doesn't list stays blocked |
parity exec | Only when sandbox.agent_exec is true (the default) |
An agent never has more access than the person it acts for. See Permissions.
Proof for reviewers
parity proof export writes a zip with the files the agent attached, every API call made against the sandbox and its result, and the person and agent behind them. Parity signs it; parity proof verify proof.zip checks the signature against the published keys (GET /v0/keys) and exits non-zero if any file changed.
parity proof add screenshots/ test-output.txt --note "Invite link expires after 7 days"
parity proof export --result pass --summary "Invites expire; expired links show the resend page" -o proof.zip