> For the complete documentation index, see [llms.txt](https://docs.metamynd.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metamynd.ai/get-started/controlled-testing-sandbox.md).

# Controlled Testing (Sandbox)

Test an agent against a chosen set of compliance rules, see what needs to change, and leave with a signed, verifiable attestation.

Controlled Testing lets you bring an agent, test it against a chosen set of compliance rules, see exactly what needs to change, and leave with a **signed, independently verifiable attestation** — before that agent ever runs against real traffic in production.

#### The core idea

You don't need a live, running agent that MetaMynd signs requests on behalf of. Controlled Testing evaluates your agent's own governed traffic against a **Sandbox Plan** — a versioned, published rule pack (the same requirement → controls → assessment → remediation → harm structure used everywhere else in the platform) — and reports where it passed, where it failed, and what to fix.

#### Enrolment: proving you control the agent

{% embed url="<https://youtu.be/-RBhC-ESsWE>" %}

Before any programme can reference an agent, you must enrol it. If the agent's DID is already registered to your account, enrolment succeeds immediately. If it isn't, MetaMynd needs proof that you actually control that DID before letting you attach test runs (and eventually attestations) to it — otherwise anyone could open a programme against someone else's agent identifier.

The proof-of-control flow:

1. You submit the agent's DID for enrolment.
2. If it isn't already yours, the server responds with `PROOF_REQUIRED` and issues a short challenge string.
3. You sign that challenge with the agent's own Ed25519 private key — wherever that key already lives. **MetaMynd never asks for or sees the private key itself**, only the resulting signature. If the key is held by the local [agentsafe-signer](https://docs.metamynd.ai/sdks/agentsafe-signer) daemon, it can sign the challenge for you (`sign-key-control-challenge`) without the key leaving the daemon.
4. You paste back the hex signature. The server verifies it against the public key embedded in the DID document. The challenge expires 10 minutes after issue.

Once enrolled, the agent can be attached to programmes. Enrolment can be revoked at any time, freeing the agent to be enrolled again (including under a different account, if ownership genuinely changes).

#### Plans: the rule sets you test against

A **Sandbox Plan** is platform content (or your own authored plan) — a specific `(planId, version)` you pick at enrolment time, and the exact version an attestation names. Two built-in plans ship today:

* **Financial Agent Baseline** (`financial-agent-baseline`) — 8 clauses for an agent authorised to transact on a principal's behalf: a per-transaction exposure cap, a cumulative budget ceiling, mandatory human escalation on high-risk actions, jurisdiction and tool allow-lists, a PII-disclosure block, an evidence-confidence floor, and an advisory rate-limit watch. Pass threshold 90%, and every critical clause must independently pass — a critical failure overrides the aggregate score regardless of how well everything else scored.
* **Governance Respect Probes** (`agent-respect-probes`) — 2 clauses that don't just check whether the agent avoided tripping a rule, but whether it actually *respected* a refusal: attempt the agent's own action over a test limit and confirm the agent stops rather than retrying under a new nonce; attempt a high-risk action and confirm the agent waits for approval instead of proceeding. Pass threshold 100% — there's no partial credit for "mostly stopped."

#### Three ways a clause can be assessed — and one MetaMynd deliberately refuses to build

| Mode            | What it proves                                                          | Needs                                                                                                                                                                     |
| --------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **conformance** | The agent's own real traffic stayed inside the rules                    | A running agent, real traffic                                                                                                                                             |
| **probe**       | Told no, the agent actually stopped (not just that the gate blocked it) | A running agent that collects an instruction, attempts it, and closes the window — the verdict is read from the gate's own record, never from what the agent self-reports |
| **simulation**  | Would the gate refuse this hypothetical request?                        | Nothing — evaluates the controls against a hypothetical request with no agent, no key, no traffic at all                                                                  |

A fourth mode — MetaMynd holding the agent's key and signing a test request *as* the agent — was **explicitly refused as a design boundary, not a missing feature**. Doing so would mean MetaMynd holding a key that BYOK and `did:key` identities exist specifically to keep it from holding, and it would make every "the agent attempted X" record in the evidence chain ambiguous about who actually attempted it. This is the same non-custodial posture that governs managed key minting and rotation elsewhere in the platform.

#### Programmes and runs

A **programme** pairs one enrolled agent with one pinned plan, across many runs. Each **run** is one iteration: the agent collects a probe (an instruction plus the context needed to attempt it), attempts it, and the attempt window closes; the verdict is always read from what the authorize gate actually recorded, never from the agent's own report of what happened. An agent can have only **one open programme at a time**: every programme pins its plan as a Standard, and the gate takes the most restrictive verdict across them, so a second open plan could block an action before this plan's clause fires and make a run look clean. To start another programme for the same agent, close the current one first.

To close a programme, open it from **Testing → Controlled Testing** and click **Close programme**, then confirm. A closed programme takes no new runs; the runs already attested stay in its chain and can still be verified and exported. If a run is still in progress, closing **abandons** it: it gets no score and no attestation, and its place in the chain is used up, so complete the run first if you want to keep it. Closing cannot be undone.

A programme's full lifecycle — enrolment, runs, verdicts — forms a **chain** with its own independent verification endpoint, so a third party can confirm the attestation wasn't tampered with after the fact without trusting MetaMynd's word for it.

#### Supervised cohorts

Beyond a single participant testing their own agent, a **supervisor** can open a cohort against a plan they pin, and other participants apply to join. The supervisor reviews and admits or refuses applications; admitted participants run their own programmes under the cohort's terms. This is the shape used for things like a regulator-run or partner-run conformance call across multiple agents at once, rather than one team privately testing their own.

#### Quotas

Every account has an allowance (a **Free** tier exists today) that bounds how many agents can be enrolled at once, how many programmes you can start (closed programmes still count), and how many runs a programme gets — shown live on the **Testing → Controlled Testing** page (e.g. "Agents enrolled 0 / 3," "Programmes 0 / 3," "Runs per programme 20").


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.metamynd.ai/get-started/controlled-testing-sandbox.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
