> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Review and stop an AI agent

> Check what an AI agent did with your accounts and remove its access.

Every connection an AI agent makes is a normal PAM [session](https://infisical.com/docs/documentation/platform/pam/sessions/overview), so you review and stop an agent's sessions the same way you review and stop a person's.

## Review what the agent did

To review the agent's work, open its [sessions](https://infisical.com/docs/documentation/platform/pam/sessions/overview) and check the queries or commands in each [recording](https://infisical.com/docs/documentation/platform/pam/sessions/session-recording.md). Sessions show whoever the run authenticated as. If that's a machine identity, its sessions and [audit log](https://infisical.com/docs/documentation/platform/pam/auditing.md) events show **Machine Identity** where a person's email would appear.

## Stop an agent

To remove an agent's access right away:

**Step 1**

Remove the role that the run's user or machine identity has on the folder or account, so the agent can't open new sessions.

**Step 2**

[Terminate](https://infisical.com/docs/documentation/platform/pam/sessions/overview) the agent's active sessions on the **Sessions** page.

If the account requires approval, [revoking the request](https://infisical.com/docs/documentation/platform/pam/access-requests/overview.md#revoke-access) also ends its sessions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.