AI Engineer World's Fair 2025

Ship it! Building Production-Ready Agents

Loading slides…

Read the talk

Ship it! Building Production-Ready Agents

A tabletop RPG assistant shows what must move beyond the laptop: model access, instructions, the agent loop, execution history, and the tools that act on its decisions.

From a talk by Mike Chambers

Before you start: Basic Python knowledge and familiarity with language-model tool calling will help; AWS Lambda and Bedrock concepts are introduced as they appear.

Start with a die, not a weather forecast

How do you take a working Python agent and get it running at cloud scale? Mike Chambers frames the problem through tabletop role-playing games: a small assistant that can roll dice on a player’s behalf. The useful starting point is deliberately modest—a single Python file, with no agent framework, whose tool generates a random number. The demonstrations are prerecorded to avoid Wi-Fi problems, with execution shown in real time between playback advances.

VS Code showing main.py with random, re and ollama imports, a roll_dice function, and SimpleAgent initialization.Open full source frame
The Python example defines a dice-rolling tool and a SimpleAgent class.

The local model is Llama 3.1 8B, running through Ollama on Chambers’s laptop. His implementation includes a system prompt describing the available tools and examples showing how to invoke them. Those examples give the small model additional help translating a request into tool use. One such request involves a D20: a twenty-sided die.

1:502:01
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

1:50 · section reference included

Turn gameplay language into an action

Chambers starts the Python program in a terminal and enters “roll for initiative and add a dexterity modifier of five.” The user does not specify a function name or spell out the number of sides. The model uses its understanding of the game terminology to interpret the request, selects the dice tool, and has the program execute it.

In the local demonstration, the D20 roll returns 10; adding the modifier of 5 produces an initiative total of 15. That small interaction exposes the division of labor: the model interprets the request, executable code supplies the random result, and the agent incorporates that result into its answer. The behavior works on the laptop. The next problem is moving the machinery that produced it into a hosted environment.

Terminal output shows roll_dice(20), a tool result of 10, and an initiative total of 15, with 15 highlighted.Open full source frame
The local agent rolls 10 and adds a Dexterity modifier of 5 for a total of 15.
3:403:49
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:40 · section reference included

The loop needs history to keep working

Moving an agent means accounting for more than model inference. Chambers begins with the model, which supplies natural-language understanding, and the prompt, which establishes the agent’s purpose, capabilities, and personality. Both matter, but neither by itself executes a task.

The agentic loop connects interpretation to action. It processes the input, invokes a tool, examines the result, and decides whether another tool call is necessary. At the application level, this can be ordinary conditional and while logic moving strings between components. That control flow still needs somewhere to run when the application leaves the laptop.

History is working context for the current task, not just memory of yesterday’s conversation. After a tool executes, the next model step needs the original request and the relevant steps and results so far. In the initiative example, retaining the dice result lets the agent continue from the roll it already made. Without that context, the next step cannot reliably build on the previous one.

Finally, tools let the agent act outside the model. The dice function is a minimal example of that agency. Model, prompt, loop, history, and tools form Chambers’s minimum viable inventory—not an exhaustive taxonomy, but a concrete set of responsibilities to place in the cloud.

4:535:02
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

4:53 · section reference included

Assign those responsibilities to Bedrock and Lambda

Amazon Bedrock supplies access to models from providers including Amazon, Anthropic, Meta, Mistral, and AI21 Labs; Chambers also points to the Amazon Nova family. For the orchestration around those models, he chooses Amazon Bedrock Agents, a managed service configured with the agent’s behavior and tools. This is the historical service shown in the recording: current AWS documentation calls it Agents Classic and says it is closed to new customers, while existing customers can continue using it.

The configuration calls the agent’s behavioral text an instruction. It is not quite the complete prompt: the service combines it with a prompt template associated with the selected model. A default template is supplied, and developers can edit it. The service also takes responsibility for the loop and conversational history.

An action group is a collection of tools. An agent can have multiple groups, but this example needs only one, containing the dice roller. AWS Lambda provides the execution environment for that tool code. The resulting mapping is compact:

Agent responsibilityHosted component
Language understandingModel accessed through Bedrock
Purpose and behaviorInstruction plus prompt template
Loop and execution historyBedrock Agents orchestration
Tool definitionsAction group
Tool executionLambda function

Lambda handles scaling of the function execution; the action group tells the agent which functionality it can invoke.

A Lambda-backed tool can reach other AWS services or external systems and perform operations such as sending email. Chambers jokes about launching a rocket, then acknowledges that some use cases do not fit Lambda. The practical boundary is the code and integrations the function can actually execute. The dice roller keeps that boundary easy to inspect.

7:417:51
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

7:41 · section reference included

Create the agent and choose its role

The console makes the configuration visible, but Chambers explicitly rejects manual console operations as the production provisioning approach. He names Terraform, Pulumi, CloudFormation, SDKs, and SAM as routes for expressing the setup in code. The walkthrough uses the console so the audience can follow the settings.

The initial setup is straightforward:

  1. Open Agents in the Bedrock console and choose Create agent.
  2. Give the agent a name and a description that will remain recognizable months later.
  3. Describe its purpose as helping with tabletop RPGs.

The resulting builder shows game_master_agent, its description, resource-role settings, and the test panel. At this point, the agent’s basic identity exists; its model and behavior still need configuration.

Amazon Bedrock agent builder displaying the game_master_agent name, its tabletop RPG description, resource-role options, and an empty Test Agent panel.Open full source frame
The newly created game_master_agent appears in Amazon Bedrock’s agent builder.

Chambers selects Anthropic Claude 3.5 Haiku, describing it as small, capable, and fast—and more than this simple task requires. He then supplies the games-master instruction: help the user play tabletop RPG games. This is the behavioral text that will be combined with the service’s prompt template.

10:5111:00
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

10:51 · section reference included

Make the tool understandable to the model

After saving the agent, Chambers adds an action group with a name and description. Here, descriptions have an operational role: the model reads them to decide whether the group contains functionality relevant to the request. Natural-language descriptions become part of the programming interface.

He selects the Lambda quick start, which creates a function, configures the permissions, and connects it to the agent. Within that group, he defines the Roll Dice tool and describes it as rolling a die with a specified number of sides. The tool description explains when to use the function; its parameter definition explains how to call it.

The number-of-sides parameter receives a name, a natural-language description, the type integer, and a required flag. Together, those settings tell the model that a tool call must include an integer specifying the die’s sides. Chambers clicks Create, saves the configuration, and reopens the action group to follow the link to its generated Lambda function. The connection exists, but the generated function still needs the dice logic.

12:5113:07
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

12:51 · section reference included

Put the dice logic inside the Lambda contract

Inside the Lambda console, Chambers edits the generated Python boilerplate directly. Amazon Q Developer is integrated into the editor and suggests code as he works. The function imports random, reads the incoming event to identify the requested function and its parameters, then dispatches to the dice operation. That operation extracts the number of sides and generates a random result.

The response must fit the surrounding integration, not merely return a Python integer. In the documented function-details Lambda contract, parameter values arrive as strings even when the tool schema declares an integer. A handler therefore converts and validates the value, then wraps the result in the Bedrock response envelope. Using roll_dice and sides as the configured identifiers, the implementation can take this form:

python

import random


def lambda_handler(event, context):
    function = event["function"]
    parameters = {
        item["name"]: item["value"]
        for item in event.get("parameters", [])
    }
    response_state = None

    try:
        if function != "roll_dice":
            raise ValueError("Unknown function")

        sides = int(parameters["sides"])
        if sides < 1:
            raise ValueError("sides must be a positive integer")

        roll = random.randint(1, sides)
        body = f"Rolled a D{sides}: {roll}"
    except (KeyError, TypeError, ValueError) as error:
        body = f"Invalid tool request: {error}"
        response_state = "REPROMPT"

    function_response = {
        "responseBody": {"TEXT": {"body": body}}
    }
    if response_state is not None:
        function_response["responseState"] = response_state

    return {
        "messageVersion": "1.0",
        "response": {
            "actionGroup": event["actionGroup"],
            "function": function,
            "functionResponse": function_response,
        },
    }

The tool returns the roll itself. The agent can then use that result to answer the larger gameplay request, including its modifier. In the recording, Chambers formats the generated number into the response body, accepts Q Developer’s suggested response code, and adjusts the indentation to fit the boilerplate.

Clicking Deploy saves the edited function into the Lambda environment. This deploys the executable tool; the next step is to return to the agent and prepare its configuration for testing.

15:3415:42
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

15:34 · section reference included

Prepare the agent, then test the hosted flow

Back in Bedrock, Chambers prepares the agent and points out alias IDs as part of the software development lifecycle. The deployment lifecycle distinguishes preparing and testing the mutable DRAFT from publishing an immutable version through a deployment alias. The walkthrough shows preparation and testing; it does not establish that a production alias was created.

He submits a more elaborate initiative request in the right-hand test pane. The hosted demonstration returns an initiative total of 15. The individual roll and modifier for this second run are not specified. What has changed is where the work happens: managed orchestration now coordinates the model and the Lambda tool. Chambers describes that environment as fully hosted and ready for cloud scale; the demonstrated result is a functional test, with no load or latency measurements supplied.

17:3717:47
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

17:37 · section reference included

Beyond the dice demonstration

Chambers closes by returning to DeepLearning.AI training, offering courses that, at the time of the talk, were free and included an AWS environment for experimenting with Bedrock Agents. The invitation extends the walkthrough into hands-on practice rather than adding another deployment step.

Two further technical topics remain outside the demonstration: hosting MCP servers at cloud scale and a new open-source SDK for developing model-first agents. Chambers does not name the SDK here or demonstrate either topic. He invites those conversations at the AWS stand, where the virtual dice example also has a physical counterpart: a D20 to take away.

Mike’s prompt-template slide lists discussion topics, highlights open source SDKs for developing model-first agents, and shows a QR code and jar of dice.Open full source frame
Follow-up topics include cloud-scale MCP servers and open source SDKs for model-first agents.
18:3418:44
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

18:34 · section reference included

Resources

From the talk

Updates since the talk

Transcript download
Full transcript

Loading transcript…