AI Engineer World's Fair 2026
Agent Speedrun — Elizabeth Fuentes Leone & Sandhya Subramani, AWS
Read the talk
Agent Speedrun
Elizabeth Fuentes Leone and Sandhya Subramani build a Strands customer service agent, add tools, hooks, skills and steering, then deploy it to Amazon Bedrock AgentCore. A live rate-limit test reveals why blocking an action and stopping an agent require different controls.
From a talk by Sandhya Subramani and Elizabeth Fuentes Leone
At a glance
Ideas worth remembering
Tools connect the model to customer records and actions; inspecting message history reveals which operations produced an answer.
The demonstrated hook limits tool executions per request. It leaves the model loop running; ending the turn requires a separate behavior.
Skills supply relevant procedures on demand, while steering handlers check workflow and response behavior at selected execution points.
AgentCore deployment uses an application entry point and generated infrastructure. The demonstrated observability setup additionally needs transaction search and the AWS OpenTelemetry dependency.
Start with a harness; choose where it runs
A customer service agent needs to look up an account, inspect orders and handle refunds. Elizabeth Fuentes Leone and Sandhya Subramani’s workshop builds toward that workflow in layers: first a small agent, then controls over its behavior, and finally a deployed service. Strands Agents, the AWS-maintained open-source harness used here, supplies the structure around the language model: tools, execution and places to customize the loop.
The model provider and the deployment service are separate choices. Strands supports different providers and locally hosted models; the workshop uses a Bedrock-hosted model. Amazon Bedrock AgentCore supplies the managed production environment. Its Runtime hosts the application without requiring the application to use Strands: LangChain and CrewAI are also named as possible frameworks.
Several AgentCore services address different problems:
- Runtime: Run the agent in a managed container with sessions and automatic scaling as session demand changes.
- Gateway: Expose tools and MCP servers through one endpoint, with semantic search to help find a relevant tool.
- Memory: Keep information beyond the current session using managed memory capabilities, including custom prompt-based memory behavior.
- Observability: Inspect token consumption, tool use and events inside the agent loop through CloudWatch, rather than only container resource use.
The hands-on environment uses precreated AWS accounts and Jupyter notebooks, so attendees can run and download the supplied code without setting up billing. Conference Wi-Fi delays the start—“may the Wi-Fi gods be with us”—and the presenters continue with the onstage walkthrough. Each notebook module needs its Python kernel selected; the demonstrated environment uses /usr/bin/python3.13.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Give the model customer data through three tools
The agent loop starts with a user request and context. The model chooses a tool, the application executes it, and the tool result supplies information for the next decision or final response. This is how an order answer gets grounded in customer records rather than the model’s general knowledge. Strands also lets the application change its model configuration while keeping the surrounding tool architecture, making the same application a starting point for comparing providers.
The first notebook installs its requirements and defines dictionary-based mock records for two customers and their orders. Three functions become agent tools through the @tool decorator:
- Look up customer: Retrieve a customer record using a customer identifier.
- Get order history: Retrieve the customer’s orders and their statuses.
- Process refund: Give the agent an action it can call for a refund request.
The agent receives those tools and a system prompt. The prompt tells it to look up the customer before taking action, answer from tool data and avoid asking for information it already has. The notebook uses the default Bedrock model rather than specifying a separate model configuration.
For a request to check recent orders, the observed sequence is customer lookup, order-history lookup, then an order summary. How can a developer distinguish that sequence from a plausible answer generated without the records? Inspect the agent’s message history. The walkthrough exposes the user message, assistant activity, tool calls and final response, along with token metrics. That history connects the answer to the operations that produced it.
A chat.py file turns the same underlying agent and tools into a multi-turn terminal conversation. Each module includes this conversational version, so later controls can be tried through an extended exchange as well as notebook calls. The presenters describe the basic version as fewer than 60 lines of code: enough to make the first interaction work, before introducing stricter behavior.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Use hooks to enforce a tool-call budget
A prompt can request good behavior, but the application also needs places where code decides whether execution may proceed. Hooks provide those intervention points: before invocation, after a model call, before a tool call and after tool execution are examples discussed in the workshop. A callback can check the user or request, approve an operation, cancel it or inspect an outgoing answer.
The spoken explanation describes a per-request tool-call limit, initially set to three; the visible notebook counts calls per tool within each request and offers total counting across all tools as a separate exercise. The implementation imports HookProvider and HookRegistry from strands.hooks and registers callbacks at two points. Before invocation, a callback resets the counter to zero so a new user request gets a fresh budget. Before each tool call, a check counts calls against the configured maximum and blocks calls beyond it. The agent receives the limiter through its hooks configuration. Despite the name “rate limiter,” the demonstrated budget is a count per request, with no time interval described.
The initial run makes two tool calls and returns a summary under the three-call budget. To make the restriction observable, the presenter lowers max_calls to two and runs the test again. The resulting execution attempts additional calls and reports a blocked lookup after the limit is exceeded. The useful comparison is the permitted activity versus the blocked attempt; the walkthrough does not establish why that run attempts more calls than the initial one.
“The prompt is like a suggestion,” Fuentes Leone says, explaining why a code check belongs inside the loop. A hook can reject information before it reaches the model—for example, information identified as a credit card number—so that blocked request need not incur another model invocation. A later hook can stop an unsuitable answer from reaching the customer. These are different checks at different stages: input filtering protects what the model receives, while output filtering controls what the customer receives.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Blocking a tool does not end the agent’s turn
An audience member spots the consequential limitation: the hook blocks tool execution, but the agent keeps running. Could it keep looping and repeatedly asking for a forbidden call? Subramani confirms that the demonstration leaves the model loop active. Each attempted tool call reaches the before-tool hook and is stopped, while the model continues until the turn ends.
What does the limit actually stop? The distinction below separates the demonstrated behavior from the proposed stronger control. Preventing another tool execution does not itself cap model iterations or their token cost. Subramani explains that a hook can instead end the agent’s turn when the condition is met, but that terminating version is not demonstrated here. A production limit therefore needs a precise consequence: deny this action, or end this turn.
A denied tool call can leave the model loop running
Read the diagram as text
- Model attempts a tool call. The agent loop reaches the before-tool callback.
- Check the request’s tool budget. Compare tool-call activity with the configured maximum.
- Permit tool execution. demo — Calls within the budget proceed.
- Cancel excess tool execution. demo — The demo blocks the call while the model loop remains active.
- End the agent’s turn. alternative — An alternative hook behavior described, rather than demonstrated.
- Model attempts a tool call → Check the request’s tool budget: Before-tool callback.
- Check the request’s tool budget → Permit tool execution: Within budget.
- Check the request’s tool budget → Cancel excess tool execution: Over budget: demo.
- Cancel excess tool execution → Model attempts a tool call: Model may attempt another call.
- Check the request’s tool budget → End the agent’s turn: Over budget: alternative behavior.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Load procedures when the question needs them
Tools expose records and actions; skills provide instructions for handling a particular kind of problem. The third module creates Markdown skills for refund processing, order tracking and account troubleshooting. A skills plugin points the agent to the skills folder so it can find and use relevant procedural context.
What belongs in an account-troubleshooting skill? The example covers password-reset requirements and what to do when an account is locked. Order tracking has its own steps. Keeping these procedures in separate files lets the agent obtain context relevant to the current question instead of carrying every procedure in the system prompt on every invocation. The intended saving is unnecessary input tokens.
The test request asks for a refund for wireless headphones. The agent calls a skill as a tool, then proceeds with account information and the relevant procedure. This adds guidance at the point of need. It does not turn Markdown instructions into a hard execution check: the earlier hooks remain the mechanism for programmatically permitting or blocking an operation.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Check workflow order and response tone before delivery
Knowing the refund procedure still leaves another problem: the agent may answer in the wrong format, produce too much text or use an unwanted style. Subramani’s example is familiar: “stop using em dashes.” Steering adds a check that can guide the agent back toward the required behavior, described initially as a “buddy agent” reviewing and correcting its work.
Steering handlers attach at points in the execution flow, much like hooks. A handler can check a proposed tool action or inspect a model response before delivery. Its implementation can use a hard-coded function or another agent; type enforcement is one suggested use. The two customer service handlers address separate concerns:
- Refund workflow: Guide the agent to perform a required lookup before giving a refund.
- Tone guardrail: Check for overpromising, specific timeline guarantees, blaming the customer and failure to acknowledge frustration.
Both handlers are supplied to the agent alongside the skills plugin. In the demonstrated run, response evaluation appears in addition to customer and order lookups.
The implementation choice matters. A hard-coded predicate can make its particular check deterministic; another model’s assessment remains a model judgment. The run demonstrates an additional evaluation step, without establishing that every required format or tone will always pass correctly. The value is an explicit opportunity to detect and correct a response before it reaches the customer.
Fuentes Leone extends the idea with Agent Control, an open-source library described as supporting steering rules. Consider a hotel room with a five-person limit. A hook can reject a request for six people; a steering rule can redirect that request toward two rooms. The second response preserves the customer’s goal while changing the proposed action to fit the constraint. This is a separate travel-agent example, not a demonstrated customer service refund result.
Those rules can live in a database. The application retrieves them when invoked, so a rule update can change steering behavior without editing the agent’s code. That separates policy changes from application changes, while leaving the agent responsible for knowing where to retrieve the rules. The workshop then moves to deployment, leaving the separate session-manager module unexplored.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Give AgentCore an application entry point
Deployment carries forward the customer service code, tools and skills, but moves the work from notebooks to the terminal. AgentCore packages and runs the application in its managed environment. The central code change highlighted in the walkthrough is @app.entrypoint: it marks the function that Runtime executes when the deployed application is invoked.
The decorator identifies where an invocation enters the application; deployment still requires the surrounding environment, dependencies and configuration. Fuentes Leone installs the CLI tooling and explains that the agent can also be tested locally before sending it to AWS. The next step makes one of those configuration requirements concrete: observability needs to be enabled.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Enable the path from agent activity to traces
What makes agent activity appear in the observability view? In the console, the walkthrough opens AgentCore’s configuration and enables transaction search. Fuentes Leone identifies this as a prerequisite for the demonstrated CloudWatch agentic observability: without it, the expected information will not appear. “Built in” still has a setup step.
The application requirements also include the AWS OpenTelemetry distro. For the Strands application, the presenter describes the integration as requiring no further application changes beyond the supplied setup. Other frameworks can participate in observability, but may require framework-specific instrumentation and modifications. Hosting an application and instrumenting its internal behavior are related, distinct tasks.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Initialize, test locally, deploy and invoke
The CLI creates a project folder and supporting environment. Because the customer service agent already exists, Fuentes Leone skips generating a starter agent and chooses to bring her own code. While setup runs, she switches to a local copy to show the development environment: the same agent can be exercised locally, with sessions and token counts available for inspection.
Local execution still uses remote credentials when it calls a remote provider. This example uses Amazon Bedrock, so the local machine needs AWS credentials; AgentCore operations also require them. The workshop accounts provide the prepared environment, sparing attendees that credential setup during the session.
Back in the deployment project, the CLI offers direct code deployment or a container option. The configuration also permits other model providers through their API keys; this run keeps Amazon Bedrock. The presenter copies the existing application code into the prepared project, then starts deployment. The operation validates the application and checks credentials before provisioning the supporting resources.
The generated infrastructure handles policies, permissions and service connections that would otherwise need manual setup for this path. It also exposes infrastructure code using CDK and CloudFormation, giving the developer something to inspect rather than hiding all provisioning behind the CLI. The presenter describes using familiar programming languages such as Python or TypeScript to express that infrastructure.
The runtime does not appear immediately in the console. After a brief check—including an unsuccessful attempt to inspect the stack in the workshop account—the deployed agent appears and is invoked successfully. For application integration, the presenter points to Boto3 invocation code in the repository and identifies the agent’s ARN as the runtime identifier needed to address it. The live result establishes that the deployed agent can answer an invocation; it does not exercise every earlier guardrail in production.
The final stop is the Runtime observability dashboard: sessions, traces and runtime/session counts are the inspection points. Fuentes Leone warns that the information can take one to two minutes to appear. This completes the path begun with notebook message inspection: once the agent runs as a service, developers still need to connect a response to its session, tool activity and token use. A successful answer is the beginning of that inspection.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
Related talks
- Beating RL With Reflection: GEPA and Optimize Anything
Extends the discussion of agent skills and traces by explaining how execution feedback can improve instructions, repository skills and agent programs.
Read the transcript and explore slides
Loading transcript and slides…