← All posts

July 15, 2026 · Nick Krykunov

How to monitor AI agent behavior in your cloud

To monitor an AI agent, give each agent its own identity, log every action it takes, and watch for behavior that’s unusual for that agent. Agents act at machine speed and can do a lot in a few seconds, so monitoring has to do two things: keep a record you can reconstruct later, and catch a destructive session while it’s still running.

Why monitoring an agent is different

A human doing something destructive usually pauses, hesitates, or makes a typo first. An agent doesn’t. It reasons its way to an action and executes it immediately, and it can chain dozens of calls in the time a person reads one line. That means the window between “something’s wrong” and “production is gone” is much shorter, and monitoring built around daily log reviews won’t catch it in time.

It also means you can’t rely on predicting the bad action in advance. You’re watching for the session that goes wrong, not matching against a list of known-bad commands.

What to log

Log every action an agent takes, tied to that agent’s own identity, not a shared human key. For each action you want the identity, the timestamp, the resource it touched, what it did, and whether it succeeded. That’s the trail you’ll need to reconstruct an incident.

Store that audit log somewhere append-only. If a compromised agent can edit or delete the record of what it did, the record is worthless. A write-once bucket or a central log store the agent can’t reach is enough for a small team.

What anomalies to watch for

Monitoring is comparing what an agent does now against what it normally does. A few patterns are worth alerting on:

Sudden spikes in reads, like an agent pulling far more data than it ever has. Unusual destinations, such as outbound calls to domains or buckets it doesn’t normally touch, which can signal data leaving. Reaching outside its scope, an agent trying to access resources it has no reason to. And bursts of destructive actions, several deletes or drops in a short window, which is the pattern that precedes real damage.

For a small team, you don’t need a security platform to start. Cloud audit logs filtered to your agent identities, plus a simple rule like “more than a few destructive actions in five minutes sends a Slack alert,” covers a lot.

The gap in logging alone

Cloud audit logs like CloudTrail record what happened, but they record it after it happened. By the time an alert fires, the DROP TABLE has already run. Logs are how you understand an incident. They’re not how you prevent one.

Monitoring that actually protects you needs the record and a way to intervene while the session is live. That’s the difference between knowing your database is gone and stopping the session that was about to delete it.

Where Korvalis fits

Korvalis watches live sessions inside your own cloud account, including agent sessions, and reads what a session is actually doing rather than matching commands to a list. When a session turns destructive it cuts it off before the command finishes, whether it’s an engineer, a stolen key, a contractor, or an AI agent. You get the audit trail and the real-time stop in one place, which is what monitoring an agent actually requires. It pairs with guardrails on the actions themselves and installs with no proxy for your agents or engineers to route around.

Frequently asked questions

How do you monitor an AI agent? Give it its own identity, log every action, and watch for behavior that’s unusual for that agent, aiming to both reconstruct incidents and catch a bad session live.

What should you log? Per action: the agent identity, timestamp, resource, what it did, and the outcome, stored somewhere append-only.

Is CloudTrail enough? It’s a good foundation, but it tells you what happened after the fact. It doesn’t stop a destructive action mid-session on its own.

If watching agent sessions in real time is what you need, see how Korvalis works or join the waitlist.