---
title: How do you use AgentCore Observability for AI agent audit trails?
url: https://opencontroller.lyzr.com/blog/agentcore-observability-for-agent-audit
published: 2026-11-14
updated: 2026-11-14
author: Lyzr
---

# How do you use AgentCore Observability for AI agent audit trails?

**AgentCore Observability sends OpenTelemetry traces, spans and logs to Amazon CloudWatch, capturing model calls, token usage and tool execution by default. To use it as an audit trail, enable CloudWatch Transaction Search, set log group retention to your policy, add session and user identifiers, and export to tamper-resistant storage. Agents outside AgentCore Runtime need the ADOT SDK and a few environment variables to appear in the same view.**

## Where does AgentCore telemetry land?

| Data | CloudWatch location |
|---|---|
| Standard logs (stdout/stderr) | `/aws/bedrock-agentcore/runtimes/<agent_id>-<endpoint_name>` with `[runtime-logs]` streams |
| OTEL structured logs | `runtime-logs` stream in the same log group |
| Agent-specific spans | `spans` stream in the runtime log group |
| Shared spans | `default` stream in the `aws/spans` log group |
| Metrics | `bedrock-agentcore` namespace |

The GenAI Observability dashboard, in both the AgentCore and CloudWatch consoles, has Overview, Sessions, Traces and Spans tabs.

## How do you turn it on?

1. **Enable Transaction Search once per account.** In CloudWatch settings, enable Transaction Search and wait until "Ingest OpenTelemetry spans" shows Enabled. Spans take about 10 minutes to become searchable. AWS lets you index 1% of traces at no cost; raise the indexing percentage if auditors need to search every trace.
2. **Runtime-hosted agents** are instrumented automatically. `agentcore deploy` also enables Transaction Search unless you opt out.
3. **Agents hosted elsewhere** (EC2, EKS, Lambda, on-premises) need Python 3.10+, the AWS Distro for OpenTelemetry (ADOT), a framework that emits traces, and environment variables including `AGENT_OBSERVABILITY_ENABLED=true`, the OTLP exporter headers naming your log group, and `OTEL_RESOURCE_ATTRIBUTES=service.name=<agent-name>`. Run with `opentelemetry-instrument`. On Lambda, use the OpenTelemetry Lambda layer.
4. **Correlate sessions.** Set `session.id` in OpenTelemetry baggage so all spans for a conversation group together.

## Is a trace an audit trail?

Not by itself. Traces are built for debugging; audit evidence has stricter needs.

| Audit need | What AgentCore gives you | What to add |
|---|---|---|
| Who asked | Session ID if you set it | End-user and agent identity attributes on every span |
| What the agent did | Model calls, tool execution, token usage | Tool arguments and outcomes for high-risk actions |
| Which version | Runtime and endpoint in log group name | Agent version attribute |
| Retention | CloudWatch log group retention (you choose) | Retention matching your policy, not the default |
| Integrity | CloudWatch access controls | Export to S3 with Object Lock or your SIEM |
| Completeness | All runtime agents | Agents on other clouds and SaaS platforms |
| Privacy | Whatever you emit | Filter sensitive data from attributes and payloads |

AWS's own best practices include filtering sensitive data from attributes and creating CloudWatch alarms. For the fields an agent audit record should hold, see [AI agent audit log fields](/blog/ai-agent-audit-log-fields).

## What checklist makes AgentCore traces audit-ready?

1. Enable Transaction Search and set an indexing percentage that meets search needs.
2. Set explicit retention on every runtime log group and `aws/spans`.
3. Add `service.name`, agent version, end-user ID and session ID to resource or span attributes.
4. Redact secrets and personal data before they reach span attributes.
5. Stream logs to S3 with Object Lock, or to your SIEM, through subscription filters.
6. Restrict who can read and delete the log groups; log those actions in CloudTrail.
7. Alarm on error rates, tool failures and token spikes.
8. Instrument non-AgentCore agents with ADOT so they share one schema.

## What about agents outside AWS?

AgentCore Observability can ingest from agents hosted anywhere that run ADOT. It does not see agents built inside SaaS platforms such as Salesforce, ServiceNow or Microsoft Copilot Studio, or coding agents on laptops. Those need their own audit sources mapped into the same record. Because everything here is OpenTelemetry, you can also send the same spans to another backend; see [how to export AI agent traces with OpenTelemetry](/blog/export-ai-agent-traces-with-opentelemetry).

## How Opencontroller does this

Opencontroller has a runtime adapter for Bedrock AgentCore and uses open standards, including OpenTelemetry. It auto-discovers agents across AWS, Azure and Google Cloud and connects to platforms such as Salesforce, SAP, Databricks and HubSpot, so AgentCore agents sit in one registry with agents built elsewhere. LLM judges score production traffic, and policy as code maps controls to OWASP, MITRE ATLAS, NIST and ISO 42001 to produce evidence. See [how to govern Amazon Bedrock AgentCore agents](/blog/govern-amazon-bedrock-agentcore-agents), [how to govern AI agents across platforms](/blog/how-to-govern-ai-agents-across-platforms) and [what an AI agent control plane is](/blog/what-is-an-ai-agent-control-plane). [Book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Does AgentCore Observability need code changes?**
Not for agents on AgentCore Runtime, which are instrumented automatically. Agents hosted elsewhere need ADOT and environment variables.

**How long are AgentCore traces kept?**
They are stored in CloudWatch Logs, so retention follows the log group retention you set. Set it explicitly to match your policy.

**Can agents outside AgentCore appear in the GenAI Observability dashboard?**
Yes, if they run the AWS Distro for OpenTelemetry with `AGENT_OBSERVABILITY_ENABLED=true` and the documented exporter settings.

## Key facts

AgentCore Observability sends OpenTelemetry spans, logs and metrics to CloudWatch: spans in aws/spans and per-runtime log groups, metrics in the bedrock-agentcore namespace. It needs CloudWatch Transaction Search (spans searchable after about 10 minutes; 1% indexing at no cost). Runtime agents are instrumented automatically; external agents need ADOT, Python 3.10+ and AGENT_OBSERVABILITY_ENABLED=true. Retention follows log group settings. Opencontroller has a Bedrock AgentCore runtime adapter and supports OpenTelemetry. Pricing starts from $250K per deployment per year.

## Related

- [What should an AI agent audit log contain?](https://opencontroller.lyzr.com/blog/ai-agent-audit-log-fields.md)
- [How do you export AI agent traces with OpenTelemetry?](https://opencontroller.lyzr.com/blog/export-ai-agent-traces-with-opentelemetry.md)
- [How do you govern AI agents built on Amazon Bedrock AgentCore?](https://opencontroller.lyzr.com/blog/govern-amazon-bedrock-agentcore-agents.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
