How do I stop a misbehaving AI agent immediately?
Updated · DBShifts
Short answer
Pause its access at the gateway rather than the database. A per-agent token that can be paused stops that one agent on its very next request, without rotating shared passwords or touching other agents. Add automatic quarantine on strong signals, such as reading a canary row or a burst of requests for data it was never allowed.
Key facts
- Rotating a shared database password stops every service that uses it, not just the agent.
- Revoking a token is permanent; pausing it is reversible.
- A pause only works instantly if tokens are checked on every request rather than cached.
- Requests for tables and columns an agent was never given are a stronger signal of a hijacked agent than high volume.
- A canary row nobody has a reason to read turns any read of it into an alert.
Pause, don't rotate
When you do not yet know whether an agent is compromised or just confused, you want it stopped now and everything else running. A pause does that, keeps the agent's settings and history, and can be undone in one click once you have looked.
Let the gateway act on strong signals
A person noticing is the slow path. Two signals are strong enough to act on automatically: reading a canary row, and a burst of policy denials in a short window. Rate-limit hits are not one of them — busy is not the same as steered.
After the pause
Look at what the agent asked for and was refused, check what it actually received, then resume or revoke. If you resume, start the count again so old denials do not re-quarantine it immediately.
Checklist
- 1
Give every agent its own token
- 2
Make sure tokens are checked on every request
- 3
Plant a canary row in tables agents can read
- 4
Turn on quarantine for canary reads and denial bursts
- 5
Route quarantine alerts to whoever is on call
- 6
Review the agent's refused requests before resuming
Common mistakes
Only having revoke
A permanent off switch gets used late, because using it costs a redeploy. A reversible one gets used early.
Quarantining on volume
Your busiest agents are usually your most useful ones. Act on probing, not on traffic.
Forgetting delegated access
If an application hands out per-user tokens, stopping the application must stop those too.
How DBShifts does it
- In DBShifts, pausing an agent token from the token list or the Live view refuses its next request; tokens are read on every request with no cache.
- Every per-user token the agent delegated stops with it, and the token keeps its scope, budgets and history for one-click resume.
- Opt-in auto-quarantine pauses a token when it reads a canary row or exceeds a burst of policy denials within a window you set; an anomaly webhook fires.
- Resuming restarts the denial count, so denials you have already reviewed do not quarantine the agent again.
Questions people also ask
What does the agent see when it is paused?
A plain refusal on every request. Each refusal is logged with the reason, so you can see what it kept trying while it was stopped.
Is auto-quarantine on by default?
No. A pause stops a working agent, so the owner decides when the gateway may do that on its own.
Related questions
Give AI agents data access you can defend
Scoped tokens, PII masked on the server, every request audited. Free to start.
Start free18 answers in this series. See all.