Your Newest Employee Never Sleeps, Reads Everything, and Can Be Talked Into Anything
AI agents raised productivity and moved the attack surface with it. Where it moved, which controls reduce the loss, how to see in near real time when an agent goes wrong, and what building these controls taught me.
AI has changed how fast we work. It has changed how fast we can be attacked just as much. Both shifts come from one decision: we now let software read untrusted input and act on it with real credentials.
Think of an agent as a new employee. It never sleeps, reads every document and ticket it is handed, and holds keys to systems that took years to secure. It also follows instructions from anyone who can put text in front of it. That is indirect prompt injection. No current model reliably resists it, so defenses have to sit outside the model.
That is not an argument for slowing down. It is an argument for governing agents the way we govern production infrastructure, because that is what they have become.
Where the attack surface moved
- From people to agents. Agents are non-human identities that read content anyone can write and act with access only a few people should have. A legitimate agent steered into misusing its own access is a confused deputy.
- From one system to the connections between them. An agent that can reach one internal or external tool can often reach the next. Lateral movement no longer needs a compromised host: a redirected agent can use the access it already holds to cross into the next system.
- From human speed to machine speed. Attackers use agents too. Automation compresses reconnaissance and follow-on actions from weeks toward hours.
- From data to keys. AI provider keys and agent credentials are valuable in their own right, and they often sit in the same environment variables as everything else.
- From your code to someone else's tools. Every third-party MCP server or plugin brings tool descriptions and results you did not write, and local servers run code with your agent's access. Pin and review tool definitions, watch for definitions that change after approval, and never pass a client's token through to an upstream API. That is a supply chain.
- From one run to the next. Memory, retrieved content and messages from other agents can carry injected instructions forward. Treat them as untrusted, isolate code execution, and restrict outbound network access to approved destinations.
What each control buys
Security spending is easier to defend when each control maps to a specific reduction in loss. These are the controls I would put around every agent, and what each one buys.
- Task-scoped credential release. A credential is released only for one verified operation, so repeating a misuse needs a fresh, valid clearance. Where the target supports it, issue short-lived, narrowly scoped tokens as well, so a leaked one expires in minutes instead of working for months. That is the difference between an incident and a breach.
- Credentials kept out of the agent's context. Injection can still steer the agent within its task's scope, but the target credential is not in its context to exfiltrate. Data the agent can read still is, so scope reads as tightly as writes.
- A policy enforcement point in the tool-call path. Route every tool path through a gateway, block direct network routes to targets, and test that bypass fails. That gives one place to enforce, audit and revoke, instead of trusting every agent and every tool to behave.
- Least agency and human approval. Remove tools the task does not need, validate model-generated arguments before any system acts on them, and require human approval for irreversible or high-impact actions, with the action and target shown to the approver.
- A tamper-evident trace. With signed, hash-chained entries, scoping an incident becomes a query over who asked, on what authority and with what outcome, instead of a forensic reconstruction.
- Canary credentials. They cost almost nothing and, placed where no legitimate job touches them, any use warrants immediate investigation, before damage.
- Per-task revocation. Revoking one task or one agent stops its next call without taking the business down with it.
For scale, IBM's 2026 Cost of a Data Breach Report puts the global average breach at $4.99 million, and AI-enabled malicious breaches at about $6 million. Checking authority adds well under a millisecond per call; the measured numbers are in the next section.
What building it taught me
I have spent this year building these controls in the open. Agent Guard is a policy gate at the tool-call boundary that evaluates the action, never the model's explanation of it. Warrant is a signed, scoped, expiring grant bound to its holder's key, so an agent can prove delegated authority to a system that shares no infrastructure with it. Bailiff, still in progress, splits the decision from the secret: a decision service issues a signed clearance, and a separate custodian verifies it independently before it releases a credential for that one operation.
- The agent reads untrusted input and issues a tool call.
- The gateway, as policy enforcement point, sends the call to the decision service.
- The decision service checks policy, verifies the delegation chain, reserves the operation and signs a clearance.
- The custodian verifies the clearance and chain itself, checks canaries, decrypts and releases the credential for that one operation.
- The gateway forwards the call only after release. Allows, releases and refusals go to the trace; an operator can revoke or suspend.
In local microbenchmarks of Warrant on one Apple silicon machine, verifying a depth-three delegation chain took a median of about 0.8 ms per call, and reserving an operation in the task ledger about 0.4 ms. That is small next to the time a model spends deciding what to call next.
- A prompt is never a security boundary. Any control written as an instruction is compromised the moment the instructions are. Enforcement has to sit in the execution path.
- Authority belongs to the task, not the agent. An agent fixing a deploy does not need standing access to payroll. Grant per task, narrow on every delegation and let the grant expire.
- Credentials should be released only at the moment of use. Keep them outside the agent, release them for one verified operation, and prefer short-lived, target-scoped tokens where the target allows it.
- The order of checks is a security property. Independent review of the Bailiff custodian found the task rate limit evaluated before the canary check: a caller with a valid clearance could exhaust the budget and then probe a canary without a deny or an alert being recorded. A later fix for a different issue let a replayed clearance trigger a decrypt and an audit write on every call. That is now fixed: a replay is refused before any decrypt, and the repeated refusal is not audited again on every call. Neither was a missing control. Both were the right controls in the wrong order. Every fix now gets its own review.
Blocking is not enough: the feedback layer
We will not know every attack vector in advance, and guardrails should assume that. Network segmentation never guaranteed an attacker would not get a foothold. It stopped a foothold from becoming the whole estate, and detection told us it had happened. Agents need the same two layers: boundaries that limit what a compromised agent can do, and feedback that tells us, in near real time, that it is trying.
Feedback starts with treating every tool call as an event, not only the ones we block. For each call, record who asked, under which task and authority, which tool and target, a digest of the arguments, the decision, and what the API actually returned: status code, response size and latency. Then watch for behaviour that departs from the agent's own baseline.
- Refusals. A spike in out-of-scope or denied calls means an agent is probing its boundary. The boundary is the cheapest sensor we have.
- First use. A tool, target or API endpoint this agent or task has never called before.
- Velocity. Call rate, data volume or spend far above the agent's own baseline.
- Canary access. Any use is an alert, never a metric.
- Response anomalies. Unexpected error rates, unusually large responses that suggest bulk reads, or destinations not seen before.
- Outcome mismatch. What the agent reports it did differs from what the API record says happened.
The response should match the confidence of the signal. Canary access can suspend the task automatically once that path is tested. Outcome mismatches and softer signals page a human with the trace attached, so the first question is answered before anyone opens a console. Every finding then feeds back into policy, so the next task starts with a narrower scope.
- The agent calls a tool through the gateway, which records allow or refuse.
- The target API's status, response size and latency are recorded with the decision.
- Detection compares each event with the agent's baseline, rules and canaries.
- High-confidence signals suspend the task; others alert on-call with the trace attached.
- Findings update policy, and the gateway enforces the narrower scope on the next call.
Parts of this exist in our work today. Agent Guard ships detection rules with an alert sink. Vigilo collects host-level signals with a fast per-event alert path. Agent Witness reconciles an agent's account of its actions with the execution record. Bailiff, still pre-release, is designed so its trace records every allow, release and refusal. Measuring detection latency and accuracy end to end is the next step, and I will publish those numbers when I have them.
Seven questions for your next architecture review
- Which agents and third-party tools do we run, who owns each one, and what can each one reach?
- Is access granted per task, or does each agent hold standing, broad access?
- Are credentials kept out of the agent's context and issued at the moment of use?
- Is every action enforced at a point the agent cannot bypass?
- Can we trace any action back to who asked for it and on what authority?
- Can we revoke a single agent or task immediately without stopping the business?
- Would we know within minutes if an agent started behaving differently, and could we see exactly what it did?
Productivity and security can grow together, but only if we design for both from the start. Agents, and every system we connect them to, deserve the rigour we already apply to production: least privilege, short-lived credentials, clear ownership, an audit trail, near-real-time feedback and a way to stop them.
IBM 2026 Cost of a Data Breach (opens in a new tab)Agent Guard (opens in a new tab)Warrant (opens in a new tab)Bailiff (in progress) (opens in a new tab)