---
title: How do you find AI agents using cloud audit logs?
url: https://opencontroller.lyzr.com/blog/find-ai-agents-with-cloud-audit-logs
published: 2026-11-14
updated: 2026-11-14
author: Lyzr
---

# How do you find AI agents using cloud audit logs?

**You find AI agents in cloud audit logs by querying for the specific API calls that create, deploy and invoke models and agents: in AWS CloudTrail, Amazon Bedrock events such as `InvokeModel`, `Converse` and `CreateAgent`; in the Azure Activity Log, `Microsoft.CognitiveServices` account and deployment writes; in Google Cloud Audit Logs, `aiplatform.googleapis.com` methods. The catch is that some of the most useful events, such as agent invocations, are data events or data-access logs that are off by default.**

Audit logs show who called what, from where, and when. That makes them one of the best sources for finding agents nobody registered, because every agent eventually has to call a model.

## Which audit log events reveal AI agents in AWS?

AWS CloudTrail records Amazon Bedrock activity, but splits it into two categories.

**Management events (logged by default):**

- Bedrock Runtime calls `InvokeModel`, `InvokeModelWithResponseStream`, `Converse` and `ConverseStream`. Each one tells you which principal called which model.
- Control-plane calls such as `CreateAgent`, `CreateAgentAlias` and other Bedrock and Agents for Bedrock operations.

**Data events (off by default, extra charges apply):**

- `InvokeAgent` (resource type `AWS::Bedrock::AgentAlias`)
- `InvokeInlineAgent` (`AWS::Bedrock::InlineAgent`)
- `Retrieve` and `RetrieveAndGenerate` (`AWS::Bedrock::KnowledgeBase`)
- `InvokeFlow` (`AWS::Bedrock::FlowAlias`)
- `ApplyGuardrail` (`AWS::Bedrock::Guardrail`)

So a default trail shows you that a role called Claude through `Converse`, but not which Bedrock Agent alias was invoked. Enable the data event selectors for the resource types you care about. One tip from the AWS docs: streaming calls also emit a completion event with `eventType` `AwsServiceEvent`, so filter on `AwsApiCall` when counting invocations. Amazon Bedrock AgentCore logs under its own service name; check its documentation for which runtime calls need data events.

## Which events reveal AI agents in Azure and Google Cloud?

**Azure.** The Activity Log records control-plane writes. Look for operations under `Microsoft.CognitiveServices`, such as `accounts/write` (a new Azure OpenAI or AI Foundry resource), `accounts/deployments/write` (a new model deployment) and `accounts/listKeys/action` (someone retrieved API keys). Invocations are not in the Activity Log. To see them, send the resource's diagnostic logs (categories such as Audit and RequestResponse) to a Log Analytics workspace through diagnostic settings, which you must configure per resource or by Azure Policy.

**Google Cloud.** Vertex AI writes to Cloud Audit Logs under the service name `aiplatform.googleapis.com`. Admin Activity logs are always on and capture creates and deploys, such as `google.cloud.aiplatform.v1.ReasoningEngineService.CreateReasoningEngine` (Agent Engine) and `EndpointService.DeployModel`. Model calls such as `PredictionService.GenerateContent` are Data Access logs, which are off by default and must be enabled per service.

## What should you query for?

Use this table as a starting set:

| Signal | AWS CloudTrail | Azure | Google Cloud |
|---|---|---|---|
| New agent or model endpoint | `CreateAgent`, `CreateAgentAlias` | `accounts/write`, `accounts/deployments/write` | `CreateReasoningEngine`, `DeployModel` |
| Model calls by a principal | `InvokeModel`, `Converse` (management) | Diagnostic RequestResponse logs | `GenerateContent` (Data Access) |
| Agent invocations | `InvokeAgent` (data event) | Diagnostic logs per resource | Agent Engine query methods (Data Access) |
| Credentials for AI use | IAM key creation; Bedrock API key creation | `accounts/listKeys/action` | Service account key creation |
| Knowledge-base access | `Retrieve`, `RetrieveAndGenerate` (data) | Search or storage diagnostics | Data Access logs on data services |

## How do you turn log hits into an agent inventory?

Raw events are noisy. A five-step pass turns them into candidates:

1. **Group by principal.** Collapse calls by IAM role, managed identity or service account. Each distinct principal calling a model is a candidate agent.
2. **Enrich with tags and owners.** Pull resource tags, account or subscription owner and the principal's creator.
3. **Match against your registry.** Anything not in your [agent registry](/blog/what-is-an-ai-agent-registry) is unregistered.
4. **Rank by risk.** Prioritise principals with write permissions, access to sensitive knowledge bases, or high call volume.
5. **Hand off.** Follow the playbook in [what to do with a shadow agent once you find it](/blog/what-to-do-with-a-shadow-ai-agent-once-you-find-it).

## What will audit logs miss?

Audit logs only see calls to your cloud providers' AI services. They miss agents calling third-party model APIs directly with an API key, agents inside SaaS platforms, and coding agents on laptops. Cover those with [network detection of LLM API traffic](/blog/detect-unapproved-llm-api-traffic), [API key discovery](/blog/find-leaked-and-unused-llm-api-keys) and SaaS connectors. The [shadow agents pillar](/blog/how-to-find-shadow-ai-agents) shows how the sources fit together, and [discovery permissions](/blog/ai-agent-discovery-permissions-aws-azure-google-cloud) lists the read access each cloud needs.

## How Opencontroller does this

Opencontroller auto-discovers agents, models and API keys across AWS, Azure and Google Cloud, and adds connectors to third-party agent platforms and Claude Enterprise and OpenAI Enterprise workspaces. Discovered assets land in a governed registry, and Posture flags risky permissions and configurations. Opencontroller Edge covers coding agents and local MCP servers on developer devices. [Book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Does CloudTrail log Amazon Bedrock model invocations by default?**
Yes for `InvokeModel`, `InvokeModelWithResponseStream`, `Converse` and `ConverseStream`, which are management events. Agent, knowledge-base, flow and guardrail calls are data events and must be enabled.

**Are Vertex AI model calls in Cloud Audit Logs by default?**
No. Admin Activity logs for creates and deploys are always on, but calls such as `GenerateContent` are Data Access logs, which are off by default.

**Can audit logs find every AI agent?**
No. They miss agents calling third-party model APIs directly, agents inside SaaS platforms and coding agents on laptops. Combine them with traffic, key and SaaS discovery.

## Key facts

Finding AI agents in cloud audit logs: AWS CloudTrail logs Bedrock InvokeModel, InvokeModelWithResponseStream, Converse, ConverseStream and CreateAgent as management events by default; InvokeAgent, InvokeInlineAgent, Retrieve, RetrieveAndGenerate, InvokeFlow and ApplyGuardrail are data events, off by default. Azure Activity Log shows Microsoft.CognitiveServices accounts/write, deployments/write, listKeys/action; invocations need diagnostic logs. Google Cloud aiplatform.googleapis.com Admin Activity logs are always on; GenerateContent is a Data Access log, off by default. Opencontroller auto-discovers agents, models and API keys across AWS, Azure and Google Cloud. Opencontroller pricing starts from $250K per deployment per year.

## Related

- [What permissions does AI agent discovery need in AWS, Azure and Google Cloud?](https://opencontroller.lyzr.com/blog/ai-agent-discovery-permissions-aws-azure-google-cloud.md)
- [How do you detect unapproved LLM API traffic on your network?](https://opencontroller.lyzr.com/blog/detect-unapproved-llm-api-traffic.md)
- [How do you find leaked or unused LLM API keys?](https://opencontroller.lyzr.com/blog/find-leaked-and-unused-llm-api-keys.md)
- [More on Discovery and shadow agents](https://opencontroller.lyzr.com/blog/cluster/discovery-and-shadow-agents)
