Skip to content

Build1 publisher2 min readPublished

AWS gives its system prompt optimizer a shell over a directory of scored traces

AWS's system prompt optimizer hands a reflector agent a shell tool and a directory of scored production traces, and offline batch evaluation plus a live-traffic A/B test decide which of its proposed edits reach the agent.

The Engineer · Build desk

Illustration accompanying AWS gives its system prompt optimizer a shell over a directory of scored traces

What happened

  • AWS says AgentCore optimization uses production traces to propose agent configuration changes, validates them through offline batch evaluation and online A/B testing on live traffic, and promotes the winners.
  • The process it replaces is manual: read long traces to find where the agent went wrong, tune prompts, tool descriptions and skills by hand, then rerun evaluations to see whether anything improved.
  • The Single Agent Reflector drives recommendations today, working through the full trace set in one pass and returning a single coherent set of edits to the agent configuration.
  • No proposed edit can be applied to the agent until it has passed through platform-level guardrails.
  • The post reports evaluation results for the Single Agent Reflector and for an experimental, open source Sub-Agent Reflector on two publicly available benchmarks, alongside GEPA and MIPROv2.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • constraint The optimizer reads recorded traces plus a reward signal, so a team has to instrument its traces and get an evaluator working before it has anything to feed in.
  • decision The human in the loop now approves or rejects a proposed prompt and its stated reasoning. That reviewer is making a promotion decision about live traffic on text they did not write.
  • cost Quality beyond the first pass is bought with evaluator runs and reflector reads of the entire corpus, once per epoch, and the customer pays for both.
  • exposure Production traces sit in a directory that a model searches with shell commands, so whatever those traces recorded is in scope for the reflector to read.

The context window forces the filesystem. AWS says agent traces run long enough that even a few dozen can exceed a model's context window, so passing every trace into the reflector's prompt is impractical [7]. The two obvious workarounds, truncation and pre-summarization, both decide in advance which parts of a trace matter. AWS skipped both and made the complete trace corpus available to the reflector through a filesystem [8].

AWS describes a minimal workflow. An evaluator scores a collection of traces and writes them to a directory; the reflector is given a shell tool, pointed at that directory, and instructed to propose configuration updates by examining patterns of success and failure [9]. From there it lists files, searches with grep, reads traces with cat and compares outputs with diff [10].

The reflector determines which evidence matters, what comparisons to make, and how to turn those findings into configuration changes; no fixed signal-extraction or trace-summarization pipeline is imposed [11]. I would make the same call for this failure mode. A platform-built summarizer has to guess which fields of a trace carry the failure, and it guesses once, for every customer. It costs reproducibility. A reflector that picks its own greps can pick different ones next time, and the guardrails screen the proposed edits while the search path that produced them goes unchecked [12].

Epochs multiply that. Each optimization epoch repeats the same cycle: score the traces, reflect, accept the edits that pass the guardrails [15]. Run three and the evaluator has scored the corpus three times and a reflector has read through it three times [1]. AWS puts the extra epochs as trading optimization time for further quality gains [15].

The customer owns the reward signal. The optimizer reads traces recorded in AgentCore Observability together with a reward signal to produce the improved prompt [3], and the revised prompt will chase whatever that scorer rewards. Observability supplies the behaviour and evaluations supply the quality signal [2].

The published benchmark comparisons are claims about the benchmark's agents. For the ranking to hold on yours, your traces would have to fail the way those traces fail, and your evaluator would have to score the way that benchmark's scorer scores.

For the market trends agent, the recommendation compares the existing system prompt with a revised version and explains the trace patterns that motivated the changes, according to AWS [4]. The interface includes an explanation of the proposed changes to review before deciding whether to test the recommendation [5]. AWS says recommendations should be reviewed and tested before use, and that the guardrails screen candidate updates before they can be promoted [13].

What to watch

  • Whether the experimental, open source Sub-Agent Reflector moves into the managed recommendation path that the Single Agent Reflector drives today.
  • Any detail on what the platform-level guardrails reject, since every proposed edit passes through them before it can be applied.
  • Whether the optimizer's remit widens from system prompts to the tool descriptions and skills AWS names as part of the manual tuning loop.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories