Open Reader

Agent Speedrun — Elizabeth Fuentes Leone & Sandhya Subramani, AWS

completed 59:55 Oct 11, 2026 Watch on YouTube

Current Status

completed

Video ID

YXiLj4tJt5A

RAG / Chat

Enabled
Agent Speedrun — Elizabeth Fuentes Leone & Sandhya Subramani, AWS
Description

A customer service agent looks up an account, checks an order, and handles a refund. The harder part is controlling what happens between those steps and keeping that control when the agent reaches production. Elizabeth Fuentes Leone and Sandhya Subramani build the workflow with Strands Agents, starting with a system prompt and three tools backed by mock customer data. They inspect messages and tool calls, add a conversational interface, then introduce a hook that limits tool invocations. Lowering the limit makes the constraint visible in a live test. An audience question separates blocking another tool call from ending the agent's turn, showing why a control needs a precise definition. The next modules add skills and steering. Markdown instructions provide account troubleshooting, order tracking, and refund procedures when they are needed, while steering handlers check workflow order and response tone. The presenters compare programmatic checks with instructions left to a probabilistic model, then move the same customer service code into Amazon Bedrock AgentCore. The deployment walkthrough covers the application entry point, local testing, runtime setup, generated infrastructure, and a successful invocation. It also shows the observability configuration needed to inspect sessions, traces, and token use. The result is a path from a small notebook agent to a deployed service, with explicit places to add context, enforce constraints, and examine behavior. Speaker info: - https://www.linkedin.com/in/lizfue/ - https://www.linkedin.com/in/sandhyasubramani/ - https://github.com/strands-agents/harness-sdk - https://github.com/awslabs/agentcore-samples Timestamps: 0:00 - Workshop introduction 1:10 - Strands Agents overview 2:36 - AgentCore runtime and services 7:30 - Workshop plan 9:05 - Workshop environment and notebooks 14:06 - Open the code editor 16:12 - Build a customer service agent 19:38 - Mock data and tool definitions 21:16 - System prompt and agent configuratio

Summary

Generated by gpt-5.6-terra

At-a-Glance

  • Verdict: Skim
  • Core thesis: AWS presents Strands Agents plus Amazon Bedrock AgentCore as a low-code path from a basic tool-using agent to a controlled, observable, deployable production service.
  • Why it matters: The workshop contains reusable control-plane patterns—deterministic hooks, just-in-time skills, response steering, session/memory, and agent-level observability—but its implementation is AWS- and Strands-specific and delivered at introductory depth.
  • Best use: Skim the architecture and control-pattern segments for design ideas, then consult the repository/docs only if evaluating Strands or AgentCore as an AWS-native deployment layer.

Executive Summary

This is a hands-on AWS workshop that incrementally builds a customer-service agent in Strands Agents, an open-source agent harness maintained by AWS. The base pattern is conventional but useful: provide an LLM, a system prompt, and tool functions for customer lookup, order-history retrieval, and refund processing; let the model select tools inside an agent loop; then inspect the resulting messages and token usage.

The strongest argument is that production agent reliability cannot rest on prompts alone. The speakers distinguish probabilistic model instructions from deterministic programmatic enforcement: hooks can intervene before invocation, before tools, and after execution to validate requests, block sensitive inputs, cap tool calls, or terminate an unsafe turn. Their rate-limit example caps tool calls per user request, intended to stop runaway loops and unnecessary token expense.

They then layer in skills and steering. Skills are modular Markdown-based operational instructions loaded only when relevant—such as refund, order-tracking, and account-recovery procedures—rather than placing all policy knowledge in the system prompt. Steering adds deterministic checks or a secondary 'buddy' agent at selected points in the loop to correct workflow, output format, tone, or type before a response reaches the user.

The final segment sells AgentCore as the production substrate: package existing code with an entry-point decorator, deploy it through the CLI into a managed runtime, obtain managed session duration and scaling, add longer-lived memory separately, and inspect agent-specific traces, tools, and token consumption in CloudWatch. The source is repetitive due to live workshop logistics and transcript duplication, so it is more valuable as an overview and implementation demo than as a rigorous technical evaluation.

Key Takeaways

  • Claim: Strands is positioned as a portable, open-source agent harness rather than a model-specific agent product. | Evidence: The presenters say Strands supports bring-your-own LLMs and providers, including Bedrock-hosted models, OpenAI, Hugging Face, locally hosted Llama models, MCP, and A2A; in the workshop, changing models requires defining the provider/model while keeping the agent structure intact. | Implication: Treat the harness abstraction as a way to benchmark or route among models under a common tool/prompt architecture, while evaluating AWS lock-in separately at the runtime and operations layers. | Caveat: Although framed as provider-flexible, the production workflow, observability, identity, memory, and deployment demonstration are centered on AWS Bedrock AgentCore.
  • Claim: A minimal useful agent is an LLM-driven loop with explicit tools grounded in source-of-truth data, not an LLM answering solely from model knowledge. | Evidence: The customer-service example uses three Python tools—customer lookup, order history, and refund processing—with instructions to verify the customer before acting and use tool data to answer. The agent first invokes lookup and order-history tools, then returns an order summary; the speakers state the example is under 60 lines of code. | Implication: For operational agents, expose authoritative systems through narrow tools and encode verification/order-of-operations requirements explicitly instead of relying on the base model's factual recall. | Caveat: The demo uses mock dictionaries for two customers and does not demonstrate real authorization, transactional refund safety, or external-system failure handling.
  • Claim: Hooks are the workshop's primary deterministic guardrail mechanism and should enforce controls that prompts cannot reliably guarantee. | Evidence: Hooks can run before agent invocation, after an LLM call, before a tool call, and after tool execution. The live example resets a per-request counter and blocks calls after a configurable maximum; lowering the limit to two visibly prevents subsequent tool calls. Suggested applications include blocking an IP, credit-card data, unwanted questions, or unsuitable final answers. | Implication: Implement hard execution budgets, data filters, authorization checks, and termination behavior in code at loop boundaries; do not label a system safe merely because its system prompt asks it to behave safely. | Caveat: Blocking an individual tool call does not inherently stop the LLM loop; an audience question surfaced that the model can continue attempting calls unless the hook is explicitly designed to end the turn.
  • Claim: Skills provide selective, task-specific context injection that reduces prompt bloat and makes workflows more structured. | Evidence: The workshop stores refund processing, order tracking, and account troubleshooting procedures as Markdown files in a skills folder. The skills plugin selects and invokes relevant instructions—e.g., for a wireless-headphones refund—rather than attaching all procedures to each system prompt. | Implication: Externalize SOPs and domain procedures into versioned, scoped artifacts that are retrieved only for the applicable task, instead of maintaining one ever-growing prompt. | Caveat: The transcript does not quantify retrieval accuracy, token savings, or behavior under overlapping/conflicting skills.
  • Claim: Steering is presented as a second layer of control for response/workflow correction, combining hard-coded rules with a secondary evaluative agent. | Evidence: The presenters describe a 'buddy agent' that reviews generated output and course-corrects it. Examples include enforcing structured/type-constrained output; ensuring customer responses do not overpromise timelines or blame customers; requiring acknowledgment of frustration; and requiring a customer lookup before issuing a refund. | Implication: Use deterministic validators for non-negotiable policy and schema requirements; reserve model-based steering for nuanced tone, completeness, and context-sensitive remediation where a hard rule is insufficient. | Caveat: The claim that steering enables responses 'with full confidence' is overstated: a model-based buddy agent remains probabilistic unless the relevant condition is checked by deterministic code, and it adds latency/cost.
  • Claim: AgentCore is pitched as a managed production runtime that removes much of the container, session, scaling, IAM, and observability setup burden. | Evidence: The speakers say existing agent code needs an entry-point decorator for the runtime, after which CLI deployment creates managed infrastructure through CloudFormation/CDK. They demonstrate local testing, deployment, invoking via the agent ARN/Boto3, automatic scaling, sessions stated as lasting from 15 minutes to 8 hours, and CloudWatch views of traces, tools, sessions, and token usage. | Implication: AgentCore may accelerate AWS-native pilots, but production adoption should validate observability configuration, IAM boundaries, cost under concurrent sessions, and the portability of runtime-specific entry points and integrations. | Caveat: Built-in observability is not entirely zero-config: the presenter explicitly enables transaction search in the console and adds the AWS OpenTelemetry distribution to requirements; other frameworks require additional modification.

Detailed Brief

AgentCore service model and state management

  • Claims: AgentCore Runtime is described as framework-agnostic at the container level: LangChain, CrewAI, or other agentic applications can be placed in the runtime, not just Strands.; Short-term state is associated with runtime sessions, while AgentCore Memory is presented as the solution for memory lasting beyond the runtime/session window.; AgentCore Gateway is intended to consolidate a large tool/MCP estate behind one endpoint and semantically identify the most relevant tool for an agent loop.
  • Evidence: The speakers describe runtime sessions as spanning from 15 minutes to 8 hours.; AgentCore Memory is described as supporting semantic memory, three supplied prompt-driven memory types, and custom memory built with a custom prompt.; Gateway is described as performing semantic search across MCP servers and tools, returning the best candidate through a single endpoint.
  • Caveats: The workshop does not demonstrate memory retrieval quality, memory governance, semantic tool-search precision, or how Gateway handles ambiguous/conflicting tool definitions.; The transcript's security characterization is broad: running in AWS and retaining data in the customer's account does not substitute for correct identity, permissions, key handling, and tool-level authorization design.
  • Implications: Separate transient conversational state from durable organizational/user memory, with explicit retention and access policies.; A semantic tool gateway can reduce tool-description overload in agent prompts, but it becomes a high-leverage routing and authorization boundary that needs evaluation.

Rule management without code redeployment

  • Claims: The presenters mention an open-source 'agent control' library that can attach steering rules to a Strands agent.; Rules can be stored in a database and fetched at invocation time, allowing behavior changes without changing or redeploying agent code.
  • Evidence: Their travel example contrasts a hook that blocks booking a room for more than five people with steering that redirects six people to two rooms.; The stated operational model is that the agent knows a rules-database endpoint and new rules are applied by editing data rather than code.
  • Caveats: No versioning, approval workflow, caching, availability, rollback, or audit model for dynamically loaded rules is shown.
  • Implications: Centralized policy/rule configuration can separate operational policy from agent implementation, but it should be treated as a governed control-plane service rather than an unreviewed database table.

Notable Concepts & Terms

  • Strands Agents: AWS-maintained open-source agent harness used to compose a model, system prompt, tools, hooks, skills, and steering under a common loop.
  • Agentic reasoning loop: The recurring path of user input to model reasoning, tool selection/execution, tool result, and final response; it is the core surface for control and observability.
  • Hooks: Programmatic lifecycle interceptors used to enforce deterministic checks before/after model and tool stages, including rate limits, filtering, and hard stops.
  • Skills: Modular Markdown-based task instructions retrieved when relevant, intended to supply just-in-time operational context without overloading the system prompt.
  • Steering: A response/workflow correction mechanism that can use hard-coded handlers or a secondary evaluative agent to enforce format, tone, and process expectations.
  • Amazon Bedrock AgentCore: AWS's managed agent-production suite, including Runtime, Gateway, Memory, Identity, and agent-focused observability.
  • AgentCore Gateway: A proposed single endpoint over multiple tools and MCP servers that uses semantic search to surface an appropriate tool to the agent.
  • AWS OpenTelemetry Distro / transaction search: The stated observability prerequisites for emitting and viewing agent traces and token/tool behavior in CloudWatch.

Operator Notes / Why Ken Should Care

  • Adopt a control taxonomy for agents: hard authorization, PII filtering, budget limits, and turn termination belong in deterministic hooks; style and nuanced conversational repair can sit in model-based steering.
  • Require every blocked-tool policy to specify the terminal behavior: retry with remediation, escalate, or end the turn. A blocked call without loop termination can create repeated model attempts and avoidable spend.
  • Prototype SOP retrieval as scoped skills rather than adding policies to a global prompt; evaluate conflict resolution, retrieval precision, and version ownership before scaling the skill catalog.
  • If evaluating AgentCore, run a proof of concept that measures deployment portability, IAM/tool authorization, concurrent-session costs, trace completeness, long-term-memory access controls, and rollback behavior for dynamically loaded rules.
  • Do not rely on the workshop's broad AWS-security assurance; apply standard secrets management, least privilege, tenant isolation, input/output validation, and transaction approval controls around consequential tools.

Source/Metadata

  • Title: Agent Speedrun — Elizabeth Fuentes Leone & Sandhya Subramani, AWS
  • Transcript words: 14015
  • Duration seconds: 3595
  • Timestamp note: No usable timestamps or chapter markers were present in the supplied transcript; the transcript also contains substantial repeated workshop segments.

Transcript

9344 words en Processed in 985.7s

My name is Sandy and this is Elizabeth and we have Mike and we have more people helping us today in case any of you have questions with setting up your workshop environments and running. Everyone is an expert, everyone helping us. We're very excited to get started. Today we want to get all of you on board, right from ideating an agent, building it, adding a lot of customization and then deploying it. So we want to start with the simplest form of an agent and for this we're using Stran's Agents which is an open source agentic harness and this was actually built by AWS but this is fully open source and so let's walk quickly through it. I'm going to give you a quick introduction on what we're going to be doing and then we can drive straight into the code and all of you will have code that you can run, take home with you and you can run for two days after this, right? So let's get started. What is Stran's Agents? Stran's Agents is an open source agent harness which means you can bring your own LLM, you can use any LLM provider, model provider and you can build an agent harness around it and you can control it end to end, you can customize it, you can add your own tools to it. This is fully open source so there's community supporting this on GitHub and AWS maintains this and it supports MCP protocol, it supports A2A, it's fully open source. It's fully open and flexible and you can deploy it on any managed service, you can do it locally, you can host it anywhere. Now I said, you can use it with any model. It works natively with in production with AWS but you can bring any model you want and you can run it. It's also got guardrails and observability built in. Now, when I say you can run it on Amazon Bedrock, you can, with AgentCo, you can also use any of the other services but you can also use a different provider, you can also use your own homegrown hosted model if you want. And because in this workshop you are going to put this agent that we are going to build in production, we are going to use AgentCo, and AgentCo is a service, Amazon Bedrock AgentCo, is a service dedicated only to put agents in production. So, inside AgentCo, we have AgentCo, that is the runtime, the container where you are going to put this agent and it doesn't matter if it's the framework, if the Langchain, if the crew AI, it doesn't matter the framework that you're using, you can put this agentic application inside the runtime, the container, and you are going to deploy this agent in one single line on the CLI. And when you are using runtime, this runtime has sessions, and the session can run up to 15 minutes up to 8 hours. So, you can have a session built in inside this container without any configuration because it's inside there. And you have observability built in too. So, you only have the code, you install this code, put this code inside this container, and you are going to have memory and observability. And when I say observability, it's not observability about the RAM or what is the behavior for this container, it's about agentic observability. How many tokens am I spending in this application? What tool is using this agent? What happened inside my agent loop? You are going to be able to see all of that inside the agent observability inside CloudWatch in AWS. And we have agent core gateway. So, sometimes we are having a lot of tools, a lot of MCP for our agentic application. So, you can put all of this tool behind agent core gateway. And agent core is going to deliver an endpoint that you can invoke inside your agent loop. And this endpoint is going to be able to do a semantic search for all your tools, for all your MCP. So, only one endpoint for all your MCP, for all your tools. And it has semantic search. So, it helps you to deliver the best tool for your agent loop. And we have agent core memory because when we create an agent, we have short term memory. The short term memory is built in the runtime. You already know that. But what happens when you want long term memory? You know, a memory that can last more than eight hours. So, you can create an agent core memory. So, when you create an agent core memory, you are going to have semantic memory too. So, you are going to have three different prompts capable to build three different memories. So, every time that you retrieve, you are in a gentle loop, you can retrieve this memory inside the agent core memory. That is completely built in. You don't have to build anything. You only have to say, hey, agent core, I want agent core memory. So, it's deployed for you the memory, the three different types of memory, custom three memory, and built in memory, and you can create your own custom memory. You can put your custom prompt to build your own memory. So, every time that you retrieve the information for this agent, you are going to have your custom memory. And there is agent core identity, and a bunch of more agent core, but we only have one hour. And in this workshop, you are going to deploy your agent core runtime. And I will say that. And, yes. So, agent core runtime have, give you all the, you can put your code and deploy it into production. You have the enterprise-grade security, of course, because it's running on AWS, so it's completely secure. Of course, if you are doing a good deployment, if you don't share your keys, everything, because it's inside AWS, and we don't use your data to train models. So, it's in your account, and it's only you see it there. And it's scaled automatically. So, you have your container, and you don't have to manage the scaling, because runtime can scale automatically up, if you have a lot of sessions. If you have a recession, it's scaled down. Thank you. So, today, this is what we're going to be doing. We're going to be starting with a basic agent. What is an agent loop? How can we build an actual system with it? And some ideas, deeper dive ideas about what actually makes a good agent, right? So, talk about hooks, talk about skills, stirrings, and then Ellie's going to be talking about session management, and she's going to be covering how to actually deploy to agent core. We also have evals and multi-agentic frameworks as part of the workshop. If we have time, we will do it, but because we want to take it slow, we want to take it easy, we want to make sure everyone understands the basics before we get into the advanced concepts. But, if we don't have time, you can still use this link. This is still valid for two more days. So, you can still use it, go back home, run it, complete all of the modules, and ask us, ask any of us questions if you have any, and we'll be there to support you. So, first thing is, go to this workshop link. So, this is enabled for about 250 participants. If we have more and some of you run into problems, we have a backup workshop link. But for now, log into this website, and it should take you to a link. Ellie can also walk you through the steps if necessary. So, this is going to take you to an account. Does everyone have the previous link? Do you want me to wait a couple of seconds? It's also there on the next few slides, I think. So, what are we going to be doing today? We're going to go to this workshop studio account. You don't have to create your own AWS account. These accounts are already created for you, and there is going to be a Jupyter notebook format. Most of the code is already in there. We can customize it. You can run it. You can download it. You can run it in your own environments. But for this session, it's all there for you. So, you can directly use and run it from there. This is free of charge. You will not be using any of your accounts. It's not going to ask for any credit card. So, just go walk with us and do it step by step. If you have any questions, all of us are here to support you. So, first thing, join this workshop link. So, when you go to this link, this link is going to give you a website. The first thing that you need to do is put your email. Email, one-time password, OTP. So, then it's going to send you an email. You need to enter your email. And then you are going to receive the one-time password. And you need to put that password inside the window that's similar to that. And if any of you have questions, please raise your hand and one of us will come find you. We'll work with you. This is free of charge. You will not be using any of your accounts. It's not going to ask for any credit card. So, just go walk with us and do it step by step. If you have any questions, all of us are here to support you. So, as I said, first thing, join this workshop link. So, when you go to this link, this link is going to give you a website. The first thing that you need to do is put your email. Email, one-time password, OTP. So, then it's going to send you an email. I don't remember how many numbers. It's that, yeah, you need to enter your email. And then you are going to receive the one-time password. And you need to put that password inside the window that's similar to that. And if any of you have questions, please raise your hand and one of us will come find you. We'll work with you. And in this workshop, when you start to be there, you are going to be able to use Anthropic models through the Amazon Bedrock API. And I think, I'm not sure, I think that you are going to be able to use the new OpenAI models too. And of course, all the Amazon models that we have that you can access through Amazon Bedrock API. And you are going to be able to use Amazon Bedrock Agent Core for free. It's not so expensive, okay? I know that people are having problems sometimes to use the new service because, yeah, it's normal to have concerns about money. But if you try Amazon Bedrock Agent Core in your account, you are going to see that it's not so expensive. And then you need to approve the next window. The next window is... Is everyone with us right now? Anyone struggling at any step so far? Do you need help? Sorry. Are you having trouble signing in? So you've opened that workshop link. And then did you type in your email address and your password? Okay. I think Mike can help. Are you okay? I need to see you. Everyone else okay? Any other problems? Is anyone struggling with anything? We might be having a little trouble with Wi-Fi. Oh my God. Who would have thought that the conference would have trouble with Wi-Fi? No. A lot of people are getting on. Are you going to be stepping through some of the things on stage there? What? Are you going to run through the workshop stages on stage? So if people can't do it, can they watch? Yes. At the end of the session, we are going to share with you all the slides. This is Jupyter. This is a repository that you can clone to. This code, everything that we are going to build here is not only available in the virtual studio. So because this virtual studio is going to be open for two days, so probably it's better that we start to show what is inside. And you can do this for your business. And you can do it. And then when we finish the session, I'm going to put this workshop for three days. So you can use all of these for free for three days. And may the Wi-Fi gods be with us as well today while we run it through with you. Oh yeah. So if it's just network issues because of which some of you are not able to follow along, we will try to go step by step again, hopefully with the Wi-Fi working for us. And any other issues apart from network issues with signing up, signing in, anything at all? Yeah. Great. So before we start, please take a picture of this. Yes. Because if you have a problem with the first one, you know, it's not a problem of internet. If you have a problem, say there is not enough account, it's more costly because the first one is running for accounts. So you can use the second one. Yeah. So we have separate environments, separate environments. Yeah. So let's start. Okay. So all of you should be seeing this right now. Correct? No, that's not. All of you should be seeing this, right? All of you should be seeing this. This is going to be on the left is going to be your step-by-step walkthrough on what we're going to be building, how we're going to be building it, the setup, each of the modules. So this is for you to follow along. If you're ever stuck, this shows you how to actually start running this, right? So this gives you a full walkthrough. But if you want to get started with the code, click on this over here, the agent speed run idea to code, right? Click on that, scroll all the way down and you will see the code editor URL. Everyone with me? Click that URL. The people who have internet. Yes, everyone who's got internet. Click on this button over here, scroll all the way to the bottom to the code editor URL, and then open that and this should pop up module one for you. So this is module one and you can close all of this. The first thing you will have to do is select your kernel, right? And which kernel do I select? Go to the same workshop studio here. Under setup, when you get started and you go to your next steps, it's going to show you here, right? So select kernel Python environment, CUSR bin Python 3.13. Copy that. And in your select kernel, paste that over here and it should pick it up for you. Okay. So you need to do this for every module that you're running. Now, what are we building today? Is everyone with me? Is anyone not with me? Oh, a bunch of you because of Wi-Fi. Is there any other Wi-Fi? What do we do? Do we? Okay, we're just. Yes. Yeah. Thank you. So if that's the case, then we're going to start walking through step by step. It's fairly simple and you can definitely go back and try it. Okay. So I'm just going to go with it and feel free to ask us any questions. So what are we building today? Today, we're building a customer service agent and we're building that using Strands agent, which is an agent harness framework. And how that works is it's using an agent with a loop. So the user sends in their input and their context, and then you have an LLM, which you can provide, right? Because this works natively with Amazon. We have a Bedrock hosted model, but you can have, so if you go to Strands agents over here, this is the Strands agents and you can look at model providers, you can use any of your favorite model providers. You can use your LLAMA. And if you want to host it locally and this shows you how to do it, all you have to do is call the model here, define the model. And then under agent, you just have to specify model and your model name. You can do this with OpenAI. This supports all of your different LLMs, your favorite LLMs. Use what you will. Hugging Face, all of your favorite things, right? So use your favorite model, bring your own API key, and then connect it to the model, and then we are ready to get started. So we are building a simple customer service agent. And what makes the agent powerful is the agentic reasoning loop, which means when you give it, when the user asks a question and says, hey, I have this trouble, I have this problem, the agent receives that input, the agent gets invoked, the agent calls the LLM, and the LLM then reads the question and calls a tool. So we want to define a set of tools because tools are the way by which we give an agent agency to execute a function. Because LLMs are mostly just going to be predicting the next token, we don't want to really rely on the LLM's base knowledge of what the answer is. You want to ground it to a source of truth, to a source of information. And this information can be stored in your database, this can be stored as a file, this can be stored in any different format, and that can be written inside of a tool, and that tool can be given, the agent can be given access to that tool, and the agent decides when to use that tool. And the agent can have access to a bunch of different tools, and the agent will figure out, it will rely on the LLM, the LLM's capability, the LLM's reasoning capability to figure out which tool to use, and call the tool, run the tool's response, and potentially, again, the agent loop can get completed, and then it would send the response. Now, another amazing thing about using an agent harness is, because you can support a bunch of different models, you can swap out whichever model you want, without really having to change the system prompt. You can if you want to, but you don't really have to change the system prompt, or change the structure, or the architecture of how everything works. This is it, and then you can try out with any model you want, and then it still works, it's still good to go. And the agent can have access to a bunch of different tools, and the agent will figure out it will rely on the LLM, the LLM's capability, the LLM's reasoning capability to figure out which tool to use, and call the tool, run the tool's response, and potentially again, the agent loop can get completed, and then it would send the response. Now, another amazing thing about using an agent harness is, because you can support a bunch of different models, you can swap out whichever model you want without really having to change the system prompt. You can if you want to, but you don't really have to change the system prompt, or change the structure, or the architecture of how everything works. This is it, and then you can try out with any model you want, and then it still works, it's still good to go. So you can even compare your models, different models' performances against the same boilerplate code. So it's super powerful, and then you get a response. Right? So how can we get started with this? First thing is, so in your module one, we've got we install the requirements.text file, then we define tools. Is this big enough for everyone to see? Do I need to zoom it in further? Okay, good. I'm seeing thumbs up. So what are we doing here? Because we're doing customer service bots, first thing is, we need to have data. So we've created mock data of two customers, and their account orders. So they've ordered something off of a website, and then they want questions, they want to get refunds on whatever they've ordered. So how are they going about this, and how can we build an agentic system that can offer solutions to these customers? So they have these orders, it's just like a dictionary, so these are the customers, and these are the order statuses, and we define tools. Tools can be written, it can be a functional code, but it can also be like an NLP type of tool that you can have generated. The way to define a tool is by using the add tool decorator function, and you write a code. So here we've got a simple tool that's doing a lookup on customers, that's just doing a get.customer ID. Then we've got another tool that's just doing get order history. The third tool we've got is process refund, right? So in each of these cases, the tools can look very different, but they're all the same format, all the same pattern, they all just have the add tool decorator. So let's run this. And after that, what we do, and this is our initial code for creating tools, now what we do to create an agent, we just need two basic things. One is your system prompt, the second is your LLM, your model. In this case, because we're using native bedrock models, hosted models, we don't really need to specify the model, we're just using the default model. But like I showed you on the Strang website, you can establish whichever model you want, and you can add your model here. The third thing you want to add, apart from this, is your tools. So you will call the agent method, write the three tools that we've just defined, and then create the system prompt which says, you are a customer service agent, and these are your guidelines. Always verify customer using, look up customer before taking action, use tool data to answer questions, don't ask the customer for info you already have. So in the system prompt, you tell the agent, like you tell the LLM how to use the tools that it's got access to, and what to do with it. So that's how your LLM and your agent understands what needs to be done with it. So here, now when we run this agent, we just say, hi, I'm customer so-and-so, can you check my recent orders? And so now it's saying, sure, let me pull up your account and order history. So it's invoking tool one. It's doing the lookup on customer. Then it's calling tool two, which is get order history, and it's saying, ah, okay, this is a summary of your recent orders. And then it's saying, hey, is there anything else I can help you with? Now this is awesome, but how can we figure out what's actually happening under the hood? Because a lot of times, one of the problems we have is my agent is doing things, and I have no insight into what it's doing. Where is my control? How do I get that, right? So let's inspect that agent loop. So what we, so this is how it works, right? And as we saw in the previous diagram, the user sends in a message, goes to the LLM, the LLM does the tool call, we get a tool result, and finally, we get a response. Now we can look at the agent messages. Agent.message. And so this is just code to see what the messages look like, and so this shows us the handoff. So this says the total number of messages for it. This is what the user is saying. This is what the assistant does. Then this is the tool call one, tool call two. Then there's nothing else that the user has done, and so the assistant says, okay, here is the response. So these are the metrics. These are the number of tokens that it used. We can use more metrics. You can add more metrics. Do what you will. Additionally, we just want to do something simple here, right? Because simple walkthrough. But what we can do is we can also have multi-turn conversations. This is just a single conversation. You can also run your multi-turn conversations where you have an extended chat with your agent. So for that, you can also try these, right? These are other samples that we've given. You're free to write your own if your internet is working. I hope it is. Is it? But also, what you can do is we've created chat.py. Under the same module, and we've got chat.py file for every single one of these modules. So when I click chat.py, this is the exact same underlying code, except we've enabled it for multi-turn conversation. So you do the same thing. Enable. You just have to. So when you go here, what you can do is you can open your terminal, and you just have to copy these two lines, because we're already in this specific folder. And then you pip install your requirements over here, and then you open a thing, and then you can chat with it directly if you want to. So then you can say, hey, blah, blah, blah. So you can just type, right? And you can have multi-turn conversations with it. It's just going to reply and see? There we go. So you can continue to have multi-turn conversations with it, the exact same underlying code, exact same tools, and it's just able to talk to you. 60 lines of code, less than 60 lines of code. So that's basic agent. Are we good? Okay, cool. Awesome. Second part. How do we make this agent better? What else can we do? This is basic stuff, right? Anyone who has been looking at blogs or just checking online would probably know how to do this. How can we make it better? Let me introduce you to what we call hooks. Now, hooks are amazing, because let me first open that. Let me first open that code there. Okay, I'm going to close this. Now, hooks are a way by which you can enforce certain programmatic commands and functions to take place. So what you can do is, in this entire process where from the time your agent is just getting invoked, it's doing its own tool calls and it's getting responses and sending it out, we want to be able to control it, right? Right from the time that the agent is being invoked to the, like, before the tool is being called, or maybe once the tool is being called and then it gets a response, we want to be able to have a lot of control over it. We want to potentially be able to validate who's using it. Like, who are the customers that are probably talking to this? Or what type of questions are they answering? Is it even supposed to be entertaining these types of questions? Do we want to have the rate limits on the type of tools that are being called and the number of times these tools are being called? How can we do that? So when you have a hook, you can introduce your code at this junction where you can have an assert function or a different type of function that allows it to ensure that certain changes are going to be able to do that. So you can do it before the text go through before it proceeds to your final output. So you can do it before invocation, you can do it after the LLM call, before the tool call, and then you can decide whether you want to approve of it or cancel it. And then you can even do it after tool execution before it sends the response. So you can do it at all of these spaces, but you can also do it at more locations. And this is just an example. Is it even supposed to be entertaining these types of questions? Do we want to have the rate limits on the type of tools that are being called and the number of times these tools are being called? How can we do that? So, when you have a hook, you can introduce your code at this junction where you can have an assert function or a different type of function that allows it to ensure that certain changes are going to be able to do that. So, you can do it before the text go through before it proceeds to your final output. So, you can do it before invocation, you can do it after the LLM call, before the tool call, and then you can decide whether you want to approve of it or cancel it. And then you can even do it after tool execution before it sends the response. So, you can do it at all of these spaces, but you can also do it at more locations. And this is just an example. If we go to strands agents, this will show you all the different ways you can enforce hooks. So, this is where I am at? No, I keep going to close all of these. Okay. So, in hooks, what are we doing here? We've got the same data that we're calling. Let me run this first. Okay. This is not the notebook? No. Oh, this is the customer service tools. Okay. Yeah, yeah. I'm on the wrong one. Okay. Okay. I'm on the notebook. Again, we have to install requirements and choose our environment. So, how does this work? Now, we want to import trans.hooks, and we want to import hook provider, hook registry, and where we want to call these hooks. So, in our case, we want to do it before invocation and also before tool call. And I'll tell you what we're doing. We're trying to create a rate limiter hook, which ensures that for one user request, the number of tools that are being invoked is not more than three. In case you have an LLM that's just going crazy and that's continuously invoking your tools, that's going to cost you a lot of tokens, and you know it's not working right. So, you want to create a hard stop rate limiter and say, hey, even if it's not working, it's fine. Stop it at three. Right? So, now that's what we're doing. How can we create that rate limiter over here? So, first, what we do is we define the rate limiter hook, and we want to say, okay, these are the maximum number of calls. We're creating a default number, and then we have to add it to the registry. So, over here, we add it and say, okay, before invocation event, and then we want another callback, which is before tool call event. And a callback means that's when it would get called. That's because you're defining it over here. So, then we have a counter, which before every response, every new time the user is asking, sending in a request, this gets reset to zero because you don't want it to continue running that rate limiter. And we define a second one called check, a second function called check. That checks the number. It counts the number of times your tools are being invoked. So, that's what this does, and then this looks at the max calls, and then it just calculates that. So, we define our rate limiter over here, and this is the main function that we've been looking at. One extra line that we added is the hooks, and we say rate limiter hook max calls equals three. And if we run it, it's calling these two, and it's saying, okay, tool call one, tool call two. Here's the summary of your events. This is what's happened. But let's actually test it. Let's try and break it and see if the rate limit is actually working, right? So, here I'm doing max calls equals two. You want to lower the limit to the trigger. So, over here, it's calling it so many times, right? And so, it's actually blocked it. So, here it's saying block lookup because it's exceeded the number of times. So, when your agent starts to go haywire and we all worry about, oh my God, is my agent going to take over everything, right? It won't because we have something called hooks. Is everyone with me? Are we good? Is anyone able to run it with me? Am I going too fast or are we just watching us? That works. Oh, okay, good. We have at least a few people. I would like to add something to the hooks. Sometimes, hook is better because when you're using an LLM with some tools, the LLM are probabilistic. Yeah. You know? They, when you put a prompt inside your agenting application, the prompt is a suggestion. You know? It's only about the probability to give you an answer. So, when you use a hook, you can be more deterministic. So, you can put code inside your agenting loop. So, you can put code, Python code, before or after the invocation. So, you can stop, I don't know if my name is an example. You have stopped a lot of more than three tools invocation. But, for example, if you want to restrict IP, I don't know, some credit card number, something like that. Yeah. You can put a hook, a code, capable to understand some things. So, yeah. Hey. You can receive this information. So, I'm going to block this with this deterministic function. So, you don't receive that. So, the model never is going to receive that information. So, you block the code. So, you don't waste token. So, you don't have to involve the model again. You don't waste tokens because you are stopping that using the hook. And if you don't want to send some type of answer to your customer service, you can stop that answer with an after call hook as well. Exactly. Thank you. Okay. So, you can try it out yourself. And, again, if you want to do multi-turn conversations, go to chat.py in the second module with hooks enabled. You can still continue to chat with it. And you can play around, add different hooks at different places, see what works. You can try and block certain customers or block certain types of questions. This is a really good way of enabling guardrails. Right? So, hooks are amazing. And we want to have hooks as we're writing good, building good agentic systems. Now, let's add one more layer of coolness to this project. Right? Let's add skills. Let's add skills. And let's find a way to steer your agent and your LLM and get them to respond in a fashion that we wanted to respond in. And so, steering is, I love steering. Steering is awesome. So, let's get to steering. Do I have any questions? Is everyone good with the idea of hooks? Yes. So, if we... Sorry? Oh, okay, okay, okay. So, the question that was... Oh, you have a mic now. Do you want to... Yes. Oh, that's strong. I saw that in the example with the hook, it kept running the agent, but it just blocked the tool call. How do we stop the agent so that it doesn't go into infinite loop and keep looping? So, as we're defining our hooks, we can define the hook in such a way to even end the agent's turn if we wanted to. For demo purposes, we wanted to show you how it's working so that we can see it doing the rate limiting and we can see that it's not running multiple times, right? The call. So, what it's doing is trying to invoke the tool in this case because we said before tool invocation, it just kept attempting to do it and kept stopping. And the LLM still continued to run the loop until the end. But if we want, we can create it in such a way that we say, okay, if I see this, just stop the turn and end it at that point. So, we can definitely customize just because we wanted to show you the end-to-end working, we made it this way. Thank you for that question. Okay, so, skills and steering. Now, this is a chatbot that's supposed to be answering customer service questions. But they could be asking a bunch of different questions that the agent may just not have access or the knowledge to answer. So, how do we give it that knowledge? How do we tell it how to answer it? We create what's called a skills folder, a skills file, which contains potentially all of your information on your ground truth, right? Your single source of truth maybe on what actually what steps it needs to take. And we can add this as a markdown file. and this is a way by which, so here what it would do is when we add agent skills, it would first go look up the skills folder and read all of the skills, see which one actually makes sense, and then it would use those skills. Let me get a steering in just a bit, but skills is a way by which we can give our, let me go to the third one, third module. So, I'm just going to run this first. Perfect. But they could be asking a bunch of different questions that the agent may just not have access or the knowledge to answer. So, how do we give it that knowledge? How do we tell it how to answer it? We create what's called a skills folder, a skills file, which contains potentially all of your information on your ground truth, right? Your single source of truth maybe on what actually what steps it needs to take. And we can add this as a markdown file. And this is a way by which, so here what it would do is when we add agent skills, it would first go look up the skills folder and read all of the skills, see which one actually makes sense, and then it would use those skills. Let me get a string in just a bit, but skills is a way by which we can give our, let me go to the third one, third module. So, I'm just going to run this first. Perfect. So, first thing is when we create skills, now we've got three types of skills that we've created. One is how do you process refunds, how do you track orders, and what if people ask some types of account-related questions, my password is not working or something, a bunch of frequently asked questions, how can we get it to work? Right? So, this one is on how to handle account issues. So, here we are creating these different skills plugins, and then we can directly call it, so when I open the skills folder here, we can look at sample skills. So, this is just a markdown file on skills for account troubleshooting, which is giving it context, additional context, because in your system prompt, you don't want to overflow it with all of the amount of information you have, because those are also considered input tokens, and those can get wasted unnecessarily. So, when a certain type of question is being asked, we can give it context that is relevant to that specific type of question, then it has access to all the information that it needs, so that it can do justice and answer the question correctly. So, in this case, this specific skill talks about how can we do account troubleshooting, what does it require to reset a password, what do you do when the account is locked, and the same thing for order tracking, right? What do we do, what are the steps that we need to follow? So, these are instructions that we give to the agent beforehand, and we write this based on what we want the agent to do. And so, we create these different skills files, markdown files, and when we run it, apart from the system prompt, what we give it access to is the plugin. So, we're now adding yet another parameter here, which is called plugin, and this has access to all of the skills plugins, and the skills plugin points to the skills folder here. So, now it's going to invoke whichever skills it needs for that specific type of question that's being asked, and when this runs, and someone says, I'd like a refund from a wireless headphones, it's actually calling the skills as a tool. And then it's saying, okay, I've got your account pulled up, here's what I found, and here's how it's doing it. So, it's becoming more and more deterministic, it's got a natural order that it flows, and you can invoke the context only at the time that it's required, and it's not, you're not overflowing your system prompt with a lot of tokens every single time. Now, this is skills, but how many, this is something that I've generally faced, right, with steering. How many times have we struggled as we're talking to our agents to get us an answer to a question that we ask in a specific format, and it always messes up. It seems to get all of the difficult questions right. If I tell it this is, so, if I ask it, okay, what is my refund I'm supposed to get, it would give us a refund and say, okay, this is what it is. But they also generally tend to talk too much and generate a lot of tokens, and they just free flowing. So, how do we give it, how do we get it to respond in the format that we want? How do we ensure that it's giving us a structured output if that's what we need? Or, hey, stop using m dashes. Every single time, do we want to keep telling it? We want to be able to catch that deterministically and ensure that it's doing it in a deterministic way. So, for that, we do something called steering, which helps the agent to steer itself in the direction that we want it to, by giving it a buddy agent. So, it works, think of it as pair programming or pair partnering, where as it's generating an output, the buddy agent looks at what's being generated, and then that buddy agent can then tell it, hey, no, this is not what you're supposed to do. This is the format that you wanted to do in. So, your buddy agent is sort of checking and correcting and course correcting, and then the response you want is the response that you're actually happy with. When you're deploying your code into production, there is no room for error in format structure. You want it a certain way, and steering can help you do that. Now, I'm going to do this quickly because I want Ellie to talk about deployment, which is how you can actually make sure your agent is helpful and useful. So, quick idea of steering handlers. Now, steering handlers works the same way as hooks. You can call it, you can invoke it at different points. You can invoke it before LLM, while LLM is being invoked, before tool call, after tool call, very similar to hooks, except at that hook point, now you're also adding another agent over there that can do a quick check. And that can buddy work with this and then give it the output once. So, think of it as another guardrail, if you will, right? So, then you can do a tool call, and then you can do this. And this is a guide that can say, oh, you know what? First, look up this before you give me a refund. Or then you can say, revise the tone of this message if it's sending out a message, and then after that it gets sent. So, now you have more control over what your agent is generating. And if we go back to steering. Okay. So, again, what do we want? We want to import the steerings. We want to import steerings over here. And from here, again, the steering handler. And these are all the different places that we're doing it at. And you can do it in different ways. Check the Strands agent documentation. The details are going to be in there. But also in the workshop mentioned over here, you will see all of the details. Now, we create a deterministic handler. We tell it, we give it rules, and we tell it what it's supposed to do. And this can also be a hard-coded function. This can also be another agent that has a hard-coded function in it that works. We can get it to do type enforcement. If you want the output to be only of a specific type, you can do different types of enforcements over here, right? So, then you create a steering agent. And then, this is all for steering, right? So, now you create a steering agent, and you create the guardrail. So, here, the refund workflow handler has been defined. And finally, you create the guardrail. So, here, you're saying, okay, don't overpromise. Guarantee specific timelines. Don't blame the customer. Acknowledge the customer's frustration. And so, this is the tone guardrail handler that we're creating. So, this is the second type of steering agent that we've created. Now, what we do is, in our final code, apart from agent skills, we just call these two different handlers that we've established. And these handlers can be established at different points. So, we can say steer after model if we wanted to do. And we can tell it what to do in this case. But over here, we can also tell it. We can also do steering data.get. We can create a ledger for it. And we can choose to enable them at whichever part of the flow, the agentic flow we wanted to do. And so, at the end, all we need to do is give it access to these two steering handlers. It's going to be enabled. And then, when you run it, it's not just calling the lookup customer and get order history. But it's also, we see that it's evaluating the agent response. So, before you send out the final response to your end user, you can ensure and you can be, you can do it with full confidence. You can say with full confidence that your model, that your agent is most likely going to be responding in the way that you want it to. Because we're establishing all of those control features. You can try it yourself. And then, I'm going to quickly give it over to Ellie. Because she's going to be talking. We can create a ledger for it. And we can choose to enable them at whichever part of the flow, the agentic flow we wanted to do. And so, at the end, all we need to do is give it access to these two steering handlers. It's going to be enabled. And then, when you run it, it's not just calling the lookup customer and get order history. But it's also, we see that it's evaluating the agent response. So, before you send out the final response to your end user, you can ensure and you can be, you can do it with full confidence. You can say with full confidence that your model, that your agent is most likely going to be responding in the way that you want it to. Because we're establishing all of those control features. You can try it yourself. And then, I'm going to quickly give it over to Ellie. Because she's going to be talking. Because only have 12 minutes to put this agent in production. I would like to add something to the steering part. There is an open source library that is calling agent control that you can add to a trans agent. It's there in the documentation. With agent control, you can create rules to the steering. For example, I have a demo where this is a travel engine. So, you can use hooks to block numbers. For example, it's one, one, one, two booking, a room for more than five people. You can use a hook to block the room for more than five people. But if you want to steer the agent to block more than five people, you can create rules. So, every time that the agent is receiving more than five bookings, he's going to say, Hmm, by C5 or C6, I can steer the booking for two rooms. So, you can create rules for that using the agent control library. And the rules, you can host this rule in a database. So, you can create a database for all your rules for steering the agents. So, every time that you invoke this agentic application, you can go to the database and see the rules. So, what is the good thing for this? So, you only have to change the rules in the database. You don't have to change the code for the agent. So, the agent only has to know the endpoint for your database. So, every time that you have a new rule, you can edit the database and that's it. And let's put these agents in production. So, here we have the session manager. But I am going to show you the session manager. It's when you want to save the memory using a framework. So, but you can do that using the agent called memory without the framework. And everything is in the code. And here in the file for deployment, we are not going to use a Jupyter Notebook, because you can do that for Jupyter Notebook. But we are going to use the CLI, the terminal. So, here in this folder, I'll close the folder, we are having the same engine. So, we have the customer service tools and we have the skills, we have everything here. So, to put this engine in production, you have to go to the workshop studio. Here, this is the thing what we are going to do. We are going to use the AWS CLI through the terminal. We are going to use some one command or two commands in the CLI. We are going to take this agent. Then we are going to send this agent, this agent code, to a runtime on AWS. And agent code is going to deploy this code inside a container. But we are not going to handle that, because agent code is going to do that for us. And we are going to have memory, too, without doing anything. So, let's see. Let's follow the steps. So, this is the app, something important. When you build a agentic application and you want to put that code inside the agent code runtime, the only difference that you have to do for your agent is put this decorator, the MPP entry point. So, the MPP entry point is the only difference between your agent running in your notebook or your computer between production. Because the MPP entry point is the thing that the runtime, runtime C, you can see the MPP entry point. Ah, everything behind the MPP entry point is the agent. So, every time that you invoke this runtime, this container, he's going to run that code behind the MPP entry point. So, let's style this. So, I go to the here. Sorry. Let me open this. This is the library that I need to execute all my CLI codes. And, I hope I have good internet running. So, in this environment, you are going to be able to deploy the agent and everything. But, if you are running this locally, you are going to be able to test the agent before to put it in AWS. It's something that you have to do to have the built-in observability. You need to do something in the console. So, let me show you this. So, to go to the console, you open this part, AWS console. So, it's going to open the console that is running in this session, in this account that you have. So, you need to go to agent core. Run, not here. Agent core. That's right in core. So, you can see all the services that agent core have. Harness, because you can build a harness with a few lines of code too. Runtime, gateway, memory, and observability is just right here. But, you need to select something. I don't remember what is the name, but I am going to show you. Let me see here. Here. Enable, no, no, here. Configure. So, you need to go to configure. And, here you need to enable transaction search. So, this thing allows you to have the middle in observability inside the runtime. If you don't have that, you are not going to see the agent observability inside your agent, because CloudWatch is not going to receive the information. And, another thing that you have to do, let me save this, is install, put inside the requirement, the observability library. That I have the observability requirements. So, for that, sorry, it's done. So, we have this trans-AN requirements, because I am going to use better agent core, and you need this one. The AWS OpenTelemetry Distro. So, if you are using another framework, for example, LineShare, or CREI, there is a unique library for that framework. But, you need to do some modification inside your agentic application. For the strands, you don't need to do anything, because the strand is building for AWS, so everything is built in. But, the observability works for other frameworks, but you need to do some modification. Everything is in documentation, so you can see it. So, we have the library. Let's go to the... So, here, I'm already there. So, agent core, great. So, I'm going to create... No, it's okay, I didn't say that. So, my name, I'm going to put Ellie, because I am Ellie. And, for here, I'm going to create a harness. I'm going to create an agent. But, I have my code. You know, if you choose agent, it's going to be a simple agent for you, but I have the code, so I can skip it. And, it's going to create the environment, everything that I need to put this agent that I already have inside this container. So, it's going to create a folder for me. Here is my folder. The agent core, everything. So, you can... All the steps are here in the word. Oh my God, four minutes. But, I'm going to do it. In five minutes, I'm going to put this agent in production. That's all it is, right? Five minutes. Yeah. So, agent core add to add my agent. And, what is here? So, well, it's taking a moment. When I put agent add, it's going to create the container that I need. But, I already have this agent here in my computer, because I wanted to show you something. The same agent that Sandy just showed you, this customer agent, I have the repo here in my computer. So, let me put this bigger. This is the same again in the five. Yeah. You can use agent core, that, agent core, that, to test the agent locally. So, you can do this. You can do this in the virtual studio, because the virtual studio is a virtual machine that only allows you to run code in this VS code. But, if you are running this locally in your computer, you can have this environment to test the agent. So, this is the same agent. And, you know, I have some sessions here, too. You can see the amount of tokens if you want to explore what's happening inside your agent. You can do that locally. But, because I'm using Amazon Bedrock as a model provider, I'm using my AWS credential. And, to use Amazon Bedrock, agent core, you need AWS credential. If you are running this locally. But, in the Amazon Bedrock and the workshop, you don't need that. So, yeah, it's working. You can use agent core to test the agent locally. So, you can do this in the virtual studio, because the virtual studio is a virtual machine that only allows you to run code in VS code. But, if you are running this locally on your computer, you can have this environment to test the agent. So, this is the same agent. I have some sessions here, too. You can see the amount of tokens if you want to explore what's happening inside your agent. You can do that locally. But, because I'm using Amazon Bedrock as a model provider, I'm using my AWS credential. To use Amazon Bedrock and agent core, you need AWS credential if you are running this locally. But, in Amazon Bedrock and the workshop, you don't need that. So, it's working. It's the same, exactly the same agent. I didn't do anything. So, let's come back. I have my everything done. I want to add my code inside this agent's application. Let me see inside this container. I want an agent. I'm going to click "Bring my own code." That's it. And, you can use direct code deploy or you can use container. I'm going to use that. And, you can bring your own API key to deploy this agent using Anthropic, OpenAI, whatever you want. But, I'm going to use Amazon Bedrock. I don't want to do anything here. Now, I'm going to move my code. To move my code, I have here, copy and paste it. I need to create this. Let me see, copy and paste. And core deploy. One minute to deploy. One minute to put this agent in production inside AWS. So, it's running. It's going to validate. It's going to check my credentials. If you're familiar with AWS, when you build everything inside AWS, you need to create the IAM. You need to create policy, permissions. You need to allow the service to connect with other services. You need to do many things inside. And in core, it handles everything for me. So, I don't need to create the policy. I don't need to create permissions. I don't need to create anything. So, it's doing everything for me. And, you can see that. And, because I created that locally, it's creating a CloudFormation. It's infrastructure as code using CDK. So, you can explore the CDK code. If you are not familiar with CDK, CDK is Cloud Developer Kit. So, you can create infrastructure as code with a programming language that you know, for example, Python, TypeScript, whatever. So, it's doing that for me. It's creating everything. It's creating the deployment and everything. And, you can see that in the console. So, let's go to Amazon Bedrock Runtime. It's creating the. Let me show the CloudFormation. Here, I'm going to see my stack. Because it's a virtual studio account, sorry. You can see that here. But, when you start to put this inside the runtime, I will see that here. There we go. So, it's here. And, you can test the agent. It's ready. I can test the agent right away. So, I can invoke this agent here. And, this is everything. Inside the repo, you can find how to invoke this agent using Boto3. So, the only thing that you need is the ARN for this agent. It's working. I think it's working. I hope so. It is. It's working. It's working. So, here you can find how to invoke this agent using the SDK. You can invoke this agent using the SDK. Explore how to invoke this agent using the SDK. And, to see the observability, you can go to the runtime. In here, you have the observability dashboard. And, you can see the session, the trace, how many runtimes you are running, how many sessions do you have. Each session is a runtime, a different container. It takes a moment. It takes about one or two minutes to see everything there. I'm done. That's it. Please take a picture for this and share it for the other friends. Here, you can find all the information. Everything is here. The CDK, the workshop studio, some credits. If you are lucky, because our review has about 20 credits for Ecolier. And the feedback, please, fire star. We are amazing. And all social media. Thank you, Mariela. And, if you have any questions, we are on LinkedIn, Twitter, Instagram. Please, in the QR code, it's everything that you need to learn more about Stranded and AI Core. Thank you. So, first thing is when we create skills, now we've got three types of skills that we've created. One is how do you process refunds, how do you track orders, and what if people ask some types of account-related questions, my password is not working or something, a bunch of frequently asked questions, how can we get it to work? Right? So, this one is on how to handle account issues. So, here we are creating these different skills plugins, and then we can directly call it, so when I open the skills folder here, we can look at sample skills. So, this is just a markdown file on skills for account troubleshooting, which is giving it context, additional context, because in your system prompt, you don't want to overflow it with all of the amount of information you have, because those are also considered input tokens, and those can get wasted unnecessarily needlessly. So, when a certain type of question is being asked, we can give it context that is relevant to that specific type of question, then it has access to all the information that it needs, so that it can do justice and answer the question correctly. So, in this case, this specific skill talks about how can we do account troubleshooting, what does it require to reset a password, what do you do when the account is locked, and the same thing for, like, order tracking, right? What do we do, what are the steps that we need to follow? So, these are instructions that we give to the agent beforehand, and we write this based on what we want the agent to do. And so, we create these different skills files, markdown files, and when we run it, apart from the system prompt, what we give it access to is the plugin. So, we're now adding yet another parameter here, which is called plugin, and this has access to all of the skills plugins, and the skills plugin points to the skills folder here. So, now it's going to invoke whichever skills it needs for that specific type of question that's being asked, and when this runs, and someone says, I'd like a refund from a wireless headphones, it's actually calling the skills as a tool. And then it's saying, okay, I've got your account pulled up, here's what I found, and here's how it's doing it. So, it's becoming more and more deterministic, it's got a natural order that it flows, and you can invoke the context only at the time that it's required, and it's not, you're not overflowing your system prompt with a lot of tokens every single time. Now, this is skills, but how many, this is something that I've generally faced, right, with steering. How many times have we struggled as we're talking to our agents to give us an answer to a question that we ask in a specific format, and it always messes up. It seems to get all of the difficult questions right. If I tell it this is, so, if I ask it, okay, what is my, what is the refund I'm supposed to get, it would give us a refund and say, okay, this is what it is. But they also generally tend to talk too much and generate a lot of tokens, and they, you know, just free flowing. So, how do we give it, how do we get it to respond in the format that we want? How do, how can we ensure that it's giving us, like, a structured output if that's what we need? Or, like, hey, stop using m dashes. Every single time, do we want to keep telling it? We want to be able to catch that deterministically and ensure that it's doing it in a deterministic way. So, for that, we do something called steering, which helps the agent, which helps the agent to steer itself in the direction that we want it to, by giving it a buddy agent. So, it works, think of it as, like, pair partnering, like, pair programming or pair partnering, where as it's generating an output, the buddy agent looks at what's being generated, and then that buddy agent can then tell it, hey, no, this is not what you're supposed to do. This is the format that you wanted to do in. So, your buddy agent is sort of checking and correcting and course correcting, and then the response you want is the response that you're actually happy with. When you're deploying your code into production, there is no room for error in, like, format structure. You want it a certain way, and steering can help you do that. Now, I'm going to do this quickly because I want Ellie to talk about deployment, which is how you can actually make sure your agent is helpful and useful. So, quick idea of steering handlers. Now, steering handlers works the same way as hooks. You can call it, you can invoke it at different points. You can invoke it before LLM, while LLM is being invocated, before tool call, after tool call, very similar to hooks, except at that hook point, now you're also adding another agent over there that can do a quick check. And that can buddy, like, sort of buddy work with this and then give it the output once. So, think of it as another guardrail, if you will, right? So, then you can do a tool call, and then you can do this. And this is a guide that can say, oh, you know what? First, look up this before you give me a refund. Or then you can say, revise the tone of this message if it's sending out a message, and then after that it gets sent. So, now you have more control over what your agent is generating. And if we go back to steering. Okay. So, again, what do we want? We want to import the steerings. We want to import steerings over here. And from here, again, the steering handler. And these are all the different places that we're doing it at. And you can do it in different ways. Check the strands agent documentation. The details are going to be in there. But also in the workshop mentioned over here, you will see all of the details. Now, we create a deterministic handler. We tell it, we give it rules, and we tell it what it's supposed to do. And this can also be a hard-coded function. This can also be another agent that has a hard-coded function in it that works. We can get it to do, you can do, like, type enforcement. If you want the output to be only of a specific type, you can do different types of enforcements over here. Right? So, then you create a steering agent. And then, this is all for steering. Right? So, now you create a steering agent, and you create the guardrail. So, here, the refund workflow handler has been defined. And finally, you create the guardrail. So, here, you're saying, okay, don't overpromise. Guarantee specific timelines. Don't blame the customer. Acknowledge the customer's frustration. And so, this is the tone guardrail handler that we're creating. So, this is the second type of steering agent that we've created. Now, what we do is, in our final code, apart from agent skills, we just call these two different handlers that we've established. And these handlers can be established at different points. So, we can say steer after model if we wanted to do. And we can tell it what to do in this case. But over here, we can also tell it. We can also do steering data.get. We can create a ledger for it. And we can choose to enable them at whichever part of the flow, the agentic flow we wanted to do. And so, at the end, all we need to do is give it access to these two steering handlers. It's going to be enabled. And then, when you run it, it's not just calling the lookup customer and get order history. But it's also, we see that it's evaluating the agent response. So, before you send out the final response to your end user, you can ensure and you can be, you can do it with full confidence. You can say with full confidence that your model, that your agent is most likely going to be responding in the way that you want it to. Because we're establishing all of those control features. You can try it yourself. And then, I'm going to quickly give it over to Ellie. Because she's going to be talking. Because only have 12 minutes to put this agent in production. I would like to add something to the steering part. You know, there is an open source library that is calling agent control that you can add to a trans agent. It's there in the documentation. With agent control, you can create rules to the steering. For example, I have a demo where this is a travel engine. So, you can use hooks to block numbers. For example, it's one, one, one, two booking, a room for more than five people. You can use a hook to block the room for more than five people. But if you want to steer the agent to block more than five people, you can create rules. So, every time that the agent is receiving more than five bookings, he's going to say, Hmm, by C5 or C6, I can steer the booking for two rooms. So, you can create rules for that using the agent control library. And the rules, you can host this rule in a database. So, you can create a database for all your rules for steering the agents. So, every time that you invoke this agentic application, you can go to the database and see the rules. So, what is the good thing for this? So, you only have to change the rules in the database. You don't have to change the code for the agent. So, the agent only has to know the endpoint for your database. So, every time that you have a new rule, you can edit the database and that's it. And let's put these agents in production. So, here we have the session manager. But I am going to show you the session manager. It's when you want to save the memory using a framework. So, but you can do that using the agent called memory without the framework. And everything is in the code. And here in the file for deployment, we are not going to use a Jupyter Notebook, because you can do that for Jupyter Notebook. But we are going to use the CLI, the terminal. So, here in this folder, I'll close the folder, we are having the same engine. So, we have the customer service tools and we have the skills, we have everything here. So, to put this engine in production, you have to go to the workshop studio. Here, this is the thing what we are going to do. We are going to use the AWS CLI through the terminal. We are going to use some one command or two commands in the CLI. We are going to take this agent. Then we are going to send this agent, this agent code, to a runtime on AWS. And agent code is going to deploy this code inside a container. But we are not going to handle that, because agent code is going to do that for us. And we are going to have memory, too, without doing anything. So, let's see. Let's follow the steps. So, this is the app, something important. When you build a genetic application and you want to put that code inside the agent code runtime, the only difference that you have to do for your agent is put this decorator, the MPP entry point. So, the MPP entry point is the only difference between your agent running in your notebook or your computer between production. Because the MPP entry point is the thing that the runtime, runtime C, you can see the MPP entry point. Ah, everything behind the MPP entry point is the agent. So, every time that you invoke this runtime, this container, he's going to run that code behind the MPP entry point. Okay. Okay. Okay. So, let's style this. So, I go to the here. Sorry. Let me open this. This is the library that I need to execute all my CLI codes. And, I hope I have good internet running. So, in this environment, you are going to be able to deploy the agent and everything. But, if you are running this locally, you are going to be able to test the agent before to put it in AWS. It's something that you have to do to have the built-in observability. You need to do something in the console. So, let me show you this. So, to go to the console, you open this part, AWS console. So, it's going to open the console that is running in this session, in this account that you have. So, you need to go to agent core. Run, not here. Agent core. That's right in core. So, you can see all the services that agent core have. Harness, because you can build a harness with a few lines of code too. Runtime, gateway, memory, and observability is just right here. But, you need to select something. I don't remember what is the name, but I am going to show you. Let me see here. Here. Enable, no, no, here. Configure. So, you need to go to configure. And, here you need to enable transaction search. So, this thing allows you to have the middle in observability inside the runtime. If you don't have that, you are not going to see the agent observability inside your agent, because CloudWatch is not going to receive the information. And, another thing that you have to do, let me save this, is install, put inside the requirement, the observability library. That I have the observability requirements. So, for that, sorry, it's done. So, we have this trans-AN requirements, because I am going to use better agent core, and you need this one. The AWS OpenTelemetry Distro. So, if you are using another framework, for example, LineShare, or CREI, there is a unique library for that framework. But, you need to do some modification inside your agentic application. For the strands, you don't need to do anything, because the strand is building for AWS, so everything is built in. But, the observability works for other frameworks, but you need to do some modification. Everything is in documentation, so you can see it. So, we have the library. Let's go to the... So, here, I'm already there. So, agent core, great. So, I'm going to create... No, it's okay, I didn't say that. So, my name, I'm going to put Ellie, because I am Ellie. And, for here, I'm going to create a harness. I'm going to create an agent. But, I have my code. You know, if you choose agent, it's going to be a simple agent for you, but I have the code, so I can skip it. And, it's going to create the environment, everything that I need to put this agent that I already have inside this container. So, it's going to create a folder for me. Here is my folder. The agent core, everything. So, you can... All the steps are here in the word. Oh, my God, four minutes. But, I'm going to do it. In five minutes, I'm going to put this agent in production. That's all it is, right? Five minutes. Yeah. So, agent core add to add my agent. And, what is here? So, well, it's taking a moment. When I put agent add, it's going to create the container that I need. But, I already have this agent here in my computer, because I wanted to show you something. The same agent that Sandy just showed you, this customer agent, I have the repo here in my computer. So, let me put this bigger. This is the same again in the five. Yeah. You can use agent core, that, agent core, that, to test the agent locally. So, you can do this. You can do this in the virtual studio, because the virtual studio is a virtual machine that only allows you to run code in this VS code. But, if you are running this locally in your computer, you can have this environment to test the agent. So, this is the same agent. And, you know, I have some sessions here, too. You can see the amount of tokens if you want to explore what's happening inside your agent. You can do that locally. But, because I'm using Amazon Bedro as a model provider, I'm using my AWS credential. And, to use Amazon Bedro, agent core, you need AWS credential. If you are running this locally. But, in the Amazon Bedro and the workshop, you don't need that. So, yeah, it's working. Yeah, it's the same. Exactly the same agent. I didn't do anything. So, let's come back to the, yeah, I have my everything. Done. So, I did this. I don't remember. I did this. No? So, CD. Really. So, I want to add my code inside this agent's application. Let me see. Inside this container. So, agent core. What I want, I want an agent. I'm going to click. Bring my own code. That's it. That's it. And, you can use direct code deploy or you can use container. I'm going to use that. And, you can bring your own API key to deploy this agent using Anthropia, OpenNI, whatever you want. But, I'm going to use Amazon Bedro. I don't want to do anything here. Enter. Enter. That's it. Now, I'm going to move my code. And, to move my code, I have here, copy and paste it. And, okay. Now, what else? Ah, I need to create this. So, let's see. Copy and paste. One minute. Wait. And, hey, I'm not going to do that. So, and core deploy. And, one minute to deploy. One minute to put this agent in production inside AWS. So, it's running. It's going to validate. It's going to check my credentials. So, if you're familiar with AWS. When you build everything inside AWS, you need to create the AM. You need to create policy, permissions. You need to allow the service to connect with other services. You need to do a lot of things inside. And, in core, it's handled everything for me. So, I don't need to create the policy. I don't need to create permissions. I don't need to create everything. Anything. So, it's doing everything for me. And, you can see that. Ah. And, because I created that locally. It's creating a cloud formation. It's infrastructure as a code using CDK. So, you can explore the CDK code. If you are not familiar with CDK. CDK is cloud developer kit. So, you can create infrastructure as a code with a program length one that you know. For example, Python, TypeScript, whatever. So, it's doing that for me. It's creating everything. It's creating the deployment and everything. And, you can do that. You can see that in the console. So, let's go to Amazon Bedroom, Runtime. Yeah. What? I can see anything. It's creating the. Let me show the cloud formation. Here, I'm going to see my stack. Ah, no. Because, it's a virtual studio account. Sorry. You can see that here. But, when you start to put this inside the runtime, I will see that here. Ah, it's there. Ah, there we go. So, it's here. And, you can test the agent. It's ready. Okay. I can test the agent right away. So, I can invoke this agent here. And, you know, this is super terminal everything. Inside the repo, you can find how to invoke this agent using Boto3. So, the only thing that you need is the ARN for this agent. Is it working? Okay. I think it's working. I hope so. It is. It's working. It's working. Yeah. So, here you can find how to invoke this agent using the SDK. Is there, give me the answer. You can. It actually worked. Is there anything else I can do? Yeah. So, you can invoke this agent using the SDK. Explore how to invoke this agent using the SDK. And, to see the observability, you can go to the runtime. In here, you have the observability dashboard. And, you can see the session, the trace, how many runtime are you running, how many sessions do you have. Each session is a runtime, a different container. It takes a moment. It takes about one or two minutes to see everything there. What? Okay. What? Yeah, yeah, yeah. I'm done. That's it. Wait. Please take a picture for this. And, share it for the other friends. Here, you can find all the information. Everything is here. The deck, the workshop studio, some credits. If you are lucky, because our view has about 20 credits for Edulier. And, the feedback, please, fire star. We are amazing. The internet, no, but it's not a fault. And, all social media. Thank you, Mariela. And, if you have an answer, we are on LinkedIn, Twitter, Instagram. Please, in the QR code, it's everything that you need to learn more about STRANCE and AENCORE. Thank you. Jenkins Jenkins