Optimizing agent system prompts with Amazon Bedrock AgentCore
Amazon Web Services Han Ding
AWS says it can now use real agent traces to rewrite system prompts and test the fix automatically. That matters because prompt tuning stops being guesswork and starts looking like an engineering loop.
Based on reporting by Amazon Web Services, Han Ding — read the original for the full story.
Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error
AWS is pushing Amazon Bedrock AgentCore’s prompt tuning toward something more like a controlled experiment than a cleanup job. The new optimization flow takes production traces, proposes changes, checks them with offline evaluation and live A/B tests, then promotes the winner if it survives the guardrails.
The core idea is simple enough: feed the system prompt optimizer real agent behavior, let it spot where successful runs diverge from failures, and return a revised system prompt with an explanation attached. Instead of shrinking or summarizing long traces to fit a model window, AgentCore puts the full trace corpus in a filesystem and gives the reflector shell access. It can list files, grep through them, read traces with cat, and compare outputs with diff. AWS is leaning into the mess rather than hiding it.
There are two versions of the reflector. The Single Agent Reflector examines the whole trace set in one pass and is already the one driving recommendations today. The Sub-Agent Reflector, now available as a preliminary release in the Strands open-source GitHub repository, breaks the job into smaller pieces: each sub-agent looks at one trace through a surface, turn, and cognitive lens, then an orchestrator merges the findings. That slower, more granular approach is meant to catch failure modes a single sweep can miss.
AWS is also putting guardrails around the whole thing. Candidates that grow the configuration by more than 20 percent get rejected, safety checks run before promotion, and exact phrases from the source traces are blocked so the optimizer doesn’t just memorize the training data. That matters because prompt optimization has a habit of becoming prompt bloat with a lab coat.
On two public benchmarks, AppWorld and WebShop, the trade-off split cleanly. The Single Agent Reflector was the fast option, hitting 81.55 percent on AppWorld in 6 minutes and 20 turns, and 78.31 percent on WebShop in 1 minute and 5 turns. The Sub-Agent Reflector aimed higher, reaching 95.83 percent on AppWorld and 79.15 percent on WebShop, at a higher optimization cost. AWS also compared both against GEPA and MIPROv2, and the new reflectors came out ahead on quality.
My take — AI-written commentary, not fact-checked reporting
This is the right direction: use traces, test the edits, keep the guardrails, and stop pretending prompt tweaking is mystical art. The interesting bit isn’t that AWS found another optimizer; it’s that it is treating agent improvement like a pipeline instead of a vibe. That alone will save a lot of teams from shipping fancier nonsense faster.
Read more about this at: Amazon Web Services