c5.9 Trace agent reasoning, memory, and tool chains
Capture the full decision chain (prompts, reasoning traces, memory events, tool invocations) so agent behavior is observable, auditable, and anomalies are detectable.
Implementation guidance
How to implement on AWS
Enable AgentCore Observability (CloudWatch Transaction Search) to trace input/output prompts, reasoning traces, and tool invocations. Configure AgentCore Memory to emit data-plane events (CreateEvent, DeleteEvent, RetrieveMemoryRecords) to CloudWatch, alarm on anomalous tool metrics, and aggregate all agent logs to the Log Archive account.
Acceptance criteria
Reasoning traces and tool invocations are captured; memory access events are logged and audited; agent logs are centralized with anomaly alarms.
Practical implementation
How this control is implemented in each reference architecture:
AgentCore Observability traces the full decision chain in the Generative AI account, memory events are logged, and all agent logs aggregate to the Log archive with anomaly alarms.
- Enable AgentCore Observability (CloudWatch Transaction Search) to trace input/output prompts, reasoning traces, and tool invocations.
- Configure AgentCore Memory to emit data-plane events (CreateEvent, DeleteEvent, RetrieveMemoryRecords) to CloudWatch and alarm on anomalous tool metrics.
- Aggregate all agent logs to the Log archive account for tamper-resistant retention.
How to validate: Reasoning traces and tool invocations are captured; memory access events are logged and audited; agent logs are centralized with anomaly alarms.
Avoid: Logging only the final answer. Without reasoning and memory-event traces you cannot reconstruct why an agent acted or detect manipulation.
AgentCore Observability tracing, memory-event logging, and centralized in-account logs with anomaly alarms make agent behavior auditable.
- Enable AgentCore Observability to trace prompts, reasoning, and tool invocations.
- Emit AgentCore Memory data-plane events to CloudWatch and alarm on anomalies.
- Aggregate agent logs to the in-account Object-Lock bucket.
How to validate: Reasoning traces and tool invocations are captured; memory events are logged; agent logs are centralized with anomaly alarms.
Avoid: No trace of the agent's decision chain. Capture reasoning and memory events so misbehavior is detectable and explainable.
Threats addressed
- Inability to reconstruct why an agent took an action.
- Undetected agent misbehavior or memory manipulation.
AWS services
Framework mappings
OWASP GenAI/LLM Top 10 (2026)
- LLM03 Excessive Agency
NIST AI Risk Management Framework (AI 100-1)
- MEASURE.3 Mechanisms for tracking AI risks are in place
- MANAGE.4 Risk treatments, monitoring and response are documented and applied
AWS Security Hub — AI Security Best Practices
- BedrockAgentCore.6 Bedrock AgentCore custom browsers should have session recording enabled
AWS Well-Architected Generative AI Lens (Security)
- GENSEC03-BP01 Implement control plane and data access monitoring
OWASP GenAI Top 10 for Agentic Applications (2025)
- ASI08 Cascading Failures
Watch
Learning resources
References
- AWS SRA for AI — Capability 5, Logging and monitoring
AI Security Maturity Model