AWS published a detailed AgentCore Observability guide for agents that complete tasks correctly but become too slow or memory-heavy for production. The focus is important because error rates can stay green while latency, token use, and session state quietly degrade.
The two failure classes
Performance bottlenecks often come from slow tools, sequential calls, excessive output, or inefficient memory retrieval. Long-running sessions fail differently, raw history and memories accumulate until retrieval slows, context limits are reached, or state becomes unreliable.
| Signal | Likely question | Typical response |
|---|---|---|
| P95 latency rises | Which span consumes the time? | Trace model, memory, and tool operations separately |
| One tool dominates | Is it network, query, or cold-start time? | Profile, cache, pool connections, and set timeouts |
| Independent calls are sequential | Can they run concurrently? | Parallelize while preserving limits and ordering |
| Tokens grow every turn | Is context being consolidated? | Summarize, partition, expire, and cap memory |
AWS’s useful starting thresholds
The guide uses a three-second P95 latency alarm, a five-percent error-rate alarm, and token-usage monitoring as example production controls. It suggests memory retrieval under 200 milliseconds for interactive systems. These are starting points, not universal service objectives. A batch research agent and a live support agent have different budgets.
The highest-leverage fixes
- Run independent tool calls in parallel.
- Cache slow reads and improve database indexes.
- Partition memory by topic instead of one giant namespace.
- Summarize old conversations rather than storing every turn verbatim.
- Set event expiry and per-namespace size limits.
- Constrain routine answers and alert on output growth.
AWS illustrates three sequential calls totaling 4.5 seconds dropping toward two seconds when run in parallel. Real gains depend on dependency structure, rate limits, and whether parallel calls create new consistency problems.
What to put on the dashboard
Track invocations, error rate, P50/P95/P99 latency, tokens, active sessions, tool duration, memory size, and cost per session. Add product metrics too, completion rate, user abandonment, and human repair. A fast agent that returns unusable work is not healthy.
Bottom line
Agent observability needs traces and memory telemetry, not only application errors. Establish a task-specific performance budget, instrument every major span, and rehearse the runbook before a long-running session fails in front of a customer.