AgentsApplications 🇺🇸 01.08.2026 08:02

Optimizing production agents with Amazon Bedrock AgentCore Observability

Amazon/AWSAmazon/AWS
This post from the AWS ML blog addresses performance and memory issues in AI agents after they move to production. It provides guidance on using Amazon Bedrock AgentCore Observability with Amazon CloudWatch to identify bottlenecks and memory leaks, and offers best practices for monitoring and optimization.
The post is Part 2 of a series on debugging AI agents, focusing on agents that work correctly but perform poorly. Scenario 3 covers performance bottlenecks: symptoms include gradual latency increases, P95 response times exceeding thresholds, but low error rates. To diagnose, query CloudWatch for high-latency invocations, analyze the request timeline via OpenTelemetry traces, and check memory retrieval latency (should be under 200ms) and tool invocation latency. Root causes include slow tool execution, excessive token generation, and sequential processing. Fixes include caching, connection pooling, database indexing, optimizing prompts for brevity, and running independent tool calls in parallel. Scenario 4 addresses memory issues in long-running sessions, where memory usage grows unbounded, leading to token limits and session failures. To identify, query for long sessions with high memory usage, examine memory extraction patterns, and check for extraction failures. Root causes include misconfigured settings; fixes involve memory consolidation, namespace templates, and setting eventExpiryDuration. The post concludes with production best practices: comprehensive instrumentation, CloudWatch alarms, dashboards, and using AgentCore Evaluators and Insights for proactive monitoring.
Сокращения
P95 = 95th percentile — 95-й перцентиль
P50 = 50th percentile — 50-й перцентиль
P99 = 99th percentile — 99-й перцентиль
Source: AWS ML blog — original
Our earlier posts on this topic ↓
Fresh news