# agents/control

https://toip.tools/spec/agents/control/0.1

The principal controls an agent: pause, resume or stop it, ask it to disclose its audit trail, or revoke a mandate the agent issued to a sub-agent.

- **Sent**: principal → agent
- **Kind**: One-way. No response is expected; any answer is a separate message.
- **Envelope**: Signed by the issuer, addressed to one recipient, timestamped, and encrypted in a TSP Direct message. The signature and recipient binding prevent its use as a bearer token.
- **Defined in**: [`projects/agents/src/protocol/tasks.ts:12`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/agents/src/protocol/tasks.ts#L12) as `CONTROL`
- **Handled in**: [`projects/agents/src/guard/guard.ts`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/agents/src/guard/guard.ts), [`projects/agents/src/roles/principal.ts`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/agents/src/roles/principal.ts)
- **Design**: [10.1 Types](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/agents/docs/design.md#101-types) in `projects/agents/docs/design.md`

## Payload

projects/agents/src/protocol/tasks.ts:77:

```ts
export interface Control {
  op: ControlOp;
  /** For "revoke": a mandate this agent issued. */
  mandate?: string;
}
```

## Notes

revoke is our addition to the design's table: only the agent that issued a mandate signs its status list, so the principal asks that agent to revoke it.

## Document envelope

Every Trust Task uses this envelope. Replace `payload` with the structure shown above.

Shape of a document of this type:

```json
{
  "id": "urn:uuid:…",
  "type": "https://toip.tools/spec/agents/control/0.1",
  "issuer": "did:key:… (the sender)",
  "recipient": "did:key:… (the receiver)",
  "issuedAt": "2026-11-06T18:00:00.000Z",
  "payload": { … },
  "proof": {
    "type": "DataIntegrityProof",
    "cryptosuite": "eddsa-jcs-2022",
    "verificationMethod": "did:key:…#…",
    "proofPurpose": "assertionMethod",
    "proofValue": "z…"
  }
}
```

---

This is the Markdown version of https://toip.tools/spec/agents/control/0.1/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
