Skip to content
All writing

Agent security · October 18, 2026 · 8 min

Agents are untrusted by default

We verify humans before they touch money. The software acting on their behalf gets a bearer token and a prayer. Know Your Agent is the missing control.

Every bank I have built software for runs the same ritual before a human can move money: prove who you are, prove you are allowed, and then, quietly and forever, have your behavior watched for anything that looks wrong. Know Your Customer. Anti-money-laundering. Transaction monitoring. Nobody thinks this is paranoid. It is the price of being allowed near the rails.

Now look at how we let AI agents near the same rails. An agent gets an API key. Maybe a scoped one, if the team is careful. It calls tools. It reads documents, writes records, sends messages, and in a growing number of products, initiates payments. And the only thing standing between that agent and a bad outcome is the hope that its prompt was good enough and its model was aligned enough on the day it mattered.

That asymmetry is the thing I could not stop thinking about, and it is why I built Detecte.

What "verification" means for software

The objection I hear most is that agents are not people, so identity checks make no sense. That is true and beside the point. The purpose of KYC was never to admire a passport. It was to establish, before access is granted, that the actor is who they claim to be and is likely to behave within bounds, and to create a record that can be audited when they do not.

For an agent, "who they claim to be" is less interesting than "what they will do under pressure." So Know Your Agent (KYA), as I designed it, is a behavioral test rather than a credential check. At onboarding, the agent is run through an adversarial battery:

  • Direct and indirect prompt injection
  • Data leakage: can it be talked into revealing what it has been given?
  • Jailbreak attempts and capability escape
  • Social engineering ("your operator said it's fine")
  • Off-topic drift and refusal boundaries
  • Unicode, encoding, and oversize inputs that break naive parsers

Each probe gets a deterministic heuristic pass first (regexes, structural checks, things that are cheap and never hallucinate), and then an LLM-as-judge scores the response from zero to ten against a written rubric. The scores aggregate into a tier, and the tier is issued as a signed credential: a JWT the rest of your stack can verify without calling anyone.

The signed credential matters more than it looks. It means the verification result is portable. A payments service can refuse to talk to an agent without a current, valid credential above a given tier, and it can do that with one library call, offline.

Verification is the cheap half

Onboarding checks are a point-in-time snapshot. Agents drift. Prompts get edited, tools get added, models get swapped under them. The expensive, important half is continuous monitoring, and here the fintech analogy gets very literal.

Transaction monitoring works by learning what normal looks like for an account and flagging departures. Detecte's anomaly engine does the same for agents. For the first hundred observations an agent is in a learning baseline: the engine records what tools it calls, in what sequences, at what rates, with what argument shapes. After that it switches to an active baseline, and every new action is scored across several independent signals. The composite is a max, not an average, because one strongly anomalous signal should not be diluted by four normal ones.

The output is a recommendation: allow, flag, or escalate. Escalations become approvals a human has to decide on. Flags become incidents. Every decision lands in an append-only audit log, and every meaningful event goes out over webhooks and a server-sent event stream so a dashboard can show it live.

None of this is exotic. It is the same shape as the systems that already protect money. The only new thing is applying it to a new class of actor.

Why I think this becomes mandatory

Three forces push in the same direction.

First, agents are being given real permissions. Not "summarize this PDF" permissions. "Reconcile these ledgers" and "issue this refund" permissions. The blast radius of a bad action is growing faster than the tooling to contain it.

Second, regulators already have a mental model for this. When the first serious incident involving an autonomous agent and customer funds lands, nobody at the regulator is going to invent a new framework. They are going to ask why the existing one (verify, monitor, audit) was not applied.

Third, the agents themselves are becoming interchangeable. If you can swap the model behind a worker in a config file (and you should be able to; I wrote about that separately), then the trust you place in the worker cannot live in the model. It has to live in a layer that sits above the model and watches it.

What I would tell a team shipping agents today

You do not need Detecte to do this. You need the posture.

  1. Treat every agent as an external actor. Scoped keys, least privilege, explicit tool allow-lists. If an agent only needs to read, it must not be able to write.
  2. Test it adversarially before it goes live. Even a small battery of injection and leakage probes will catch embarrassing failures. Write the rubric down.
  3. Log every action with enough context to replay it. Tool name, arguments, result, timestamp, which policy allowed it. If you cannot reconstruct what an agent did, you cannot defend it.
  4. Put a human in the loop for the irreversible stuff. Approvals are not a product limitation; they are the product.
  5. Learn what normal looks like, then alert on departures. A rate limit is a crude baseline. A per-agent behavioral profile is a real one.

Agents are going to be trusted with more, not less. The question is whether that trust is earned by a process or assumed by default. We already know which of those two ends well.

Written by

Samuel Ojerinde · AI Software Engineer

Next: Put security in the database, not the UI