Observe and enforce
Run an agent in observe to see what Thoth would decide, then enforce when you're ready.
Each agent runs in one of two modes:
- Observe: Thoth evaluates every action exactly as it would when enforcing, records the decision it would have made, and lets the action run. Nothing is denied or held.
- Enforce: decisions apply. Denied actions don't run, held actions wait for a person to approve them, and allowed actions run.
An agent with no mode set enforces: every default policy and profile does.
Decisions
Thoth's decisions are the five of the AARM specification:
| Decision | While enforcing |
|---|---|
ALLOW | The action runs as requested. |
DENY | The action does not run. Older APIs and SDKs call this BLOCK; both names are accepted. |
STEP_UP | The action waits for a person to approve it. If nobody does before the hold expires, it is denied. |
MODIFY | A changed version of the action runs, for example with a credential removed. |
DEFER | The action waits for more context. The built-in profiles don't produce it yet. |
In observe, each of these is recorded as what enforcing would have done, and the action runs.
What enforcing would change
For an agent in observe, the observe summary counts what enforcing would have denied, held, modified or deferred over the last 7 days (up to 30), with the rules that matched most and recent examples you can open in Activity.
Changing the mode
Changing an agent's mode needs an admin with a recent second factor. A signed-in thothctl
session confirms it in the browser; an API key used by Terraform does not need to.
Destroying the Terraform resource returns the agent to enforce. In Pulumi the resource is
thoth.governance.AgentEnforcement. The thothctl commands need thothctl 0.3.12 or later, and the
Terraform resource provider 0.1.22 or later.
From an MCP client connected to the configuration server, ask for
preview_enforcement_mode. The preview states what changes for the agent; committing it while
signed in returns an approval link you confirm in the browser with MFA. The agent must be
registered first.
When a risk score is high
Rules decide every action. Where a model risk score is available, it can only make a decision
stricter, never allow something the rules would not. While enforcing, high_risk_action says what
a high score does: hold the action for approval (the default) or deny it.
When a person declines a held action
A declined action doesn't run, and the decline has a consequence, so the agent can't simply try
another way to the same goal. after_decline sets it:
after_decline | What happens next |
|---|---|
raise (default) | The agent's next actions of the same kind need a person's approval for after_decline_minutes (30), in every session. |
stop | The session the declined action was in is isolated: every later action in it is denied until a person releases it. |
quarantine | The agent is quarantined. |
A raised action is held with the reason "After a person declined one of this agent's actions". A policy deny already quarantines the agent, whatever this says. Observe mode never holds, so it never applies.
From an MCP client, preview_enforcement_mode takes after_decline and after_decline_minutes.
Leaving them out keeps the current setting.
Older mode names
Earlier versions used other names. They are still accepted and stored as the two modes:
monitor and shadow are observe; review, step_up and progressive are enforce; block is
enforce with high_risk_action = deny.
Quarantine
A quarantined agent's actions are all denied, whatever its mode. A policy can quarantine an agent
after a denial (the trial demo policy does this for shell.exec), and an administrator can
quarantine an agent or lift it:
From an MCP client, use preview_agent_quarantine and commit the preview. A quarantine is an
incident action, so it has no Terraform resource. The thothctl command needs thothctl 0.3.13 or
later.