Beginner-Friendly Amazon Bedrock AgentCore & Strands Agents Tutorial

AWS Developers · Beginner ·✍️ Prompt Engineering ·8mo ago

Key Takeaways

Builds AI agents using AWS Bedrock AgentCore and Strands Agents, and deploys them to production with Kiro for development and chain-of-thought prompting

Full Transcript

If you want to build and deploy multiple agents into production, you have reached the right video. In today's video, we have a very curious learner with us, Ana, who has a lot of questions related to AI agents. How are they built? How are they deployed? So, I'll let her ask all the question. Hi, Ana. >> Hey, Shubhham. It's nice to meet you finally. >> So, I want to know what is this agent? What is trans agent? I don't know. Oh, that's great. I'll tell you. So, what is an AI agent? An agent is basically a piece of code. It's a software which has a particular set of tasks to do. >> Now, it can accomplish this goal with a physical environment, in a digital environment. You can deploy it. You can run it on your local machine. You can put it on production. It all works fine. So, you're liking these slides. >> Oh, I don't like the slides. Can you tell me something how I can actually build an agent? >> Oh, wow. Let me show you by a diagram. Now see this setup. >> Amazing. >> Now think of this. You write a prompt and this prompt goes to an LLM. You can take any LLM. You have clawed and so many things. >> Okay. >> Now this LLM will give you a response. If you ask >> what's current date and this LLM says I have trained on a past data. I can't tell the current date. >> That doesn't serve your purpose, right? >> It doesn't. That's why this AI agent has built-in tools. Now these tools are specific piece of code which can get date for you which can create a code interpreter which can open your browser. It can do certain actions. Now if you see this diagram if you write a prompt you can invoke an agent. >> Yeah. >> This agent talks to the LLM model. >> Okay. >> And it also executes the tool. >> Awesome. Now when you return the uh result from this tool, get the response from your LLM, you get the final amazing response, the final result which gets your work done. >> I have a question. Can you actually show me how we can code this? Looks very complex. >> Yeah, don't worry at all. I'll show you how to code it with strands agents. So strands agents is an open-source SDK which allows you to build these AI agent. It has amazing capabilities agent to agent support. It is model agnostic. You can run it with bedrock. You can run it with light LLM. You can basically use it on your local as well with Olama. So let's go. Let's go. Let's get started. >> Are you telling me like this is some kind of an expert who will do my work for me? >> Exactly. Let's build it. Oh, you've used Curio Curo before? >> I haven't. Can you show me how it works? >> Oh, that's great. That's great. I'll just open a project. Let's let's do everything from scratch. >> Oh, the UI is interesting. >> Interesting, right? >> I'll create a new folder. I'll call it my first agent is fine. >> Yes. And definitely since I'm building my first agent with you, I definitely want to look at it. >> Oh, that's great. So, we have our first So, this looks quite interesting. >> Yeah. >> Now, I'll just create a new file. I'll and I'll call it my agent. I just want to understand uh you are saying my screen is divided. It says let's build. What let's build uh is this. >> Oh, so Kira allows you to wipe code or specdriven coding. So we we'll just write the code because you're a new learner. So I'll just write it. So I'll create a Python file. I'll call it my agent. py. That's fine. >> Yes. >> Great. Now think of this if you're importing a Python package. Okay. need the Python package and strands agents is open source SDK. So I'll just go here >> and I'll just write a simple thing. First I need a virtual environment. So I'll just create a virtual environment. Python 3.13 m. >> Okay. So we are using Python today. >> Yes. Yes. >> Okay. >> Okay. Now we have our virtual environment. Okay. So Kira lets you know set up everything. I'll just activate it. Okay. >> Can you see how this is so easy? It gives me the tips on how I can actually type and what I have to type. >> Yeah. Interesting, right? So, all I need to do is pip install strands. >> Okay. >> Agents. >> Oh, >> and it'll collect all the requirements. And >> and this is just one library I need. >> Yeah, that's it. Yeah. And >> Okay. >> All I need to do is I I'll just hide this. Okay. >> Thank you. from strands. I'll just zoom in so that you can see it. >> Yeah. >> Import agent. So if you see a is capital, it's a class. >> So what do we do with a class? You create an instance of it. Great. So I'll create an agent is equal to >> agent. The class. >> Oh, that's quite simple. Wow. >> Now, how do I take an input in Python? A user input. user input is just a from the CLI. >> Okay. So, I'll take an input saying hello, how are you? Something like this. >> Okay, >> great. And this user input goes to my agent. >> Oh, >> now all I need to do is agent take this input. That's it. Oh, >> with just a few lines of code, I have created an agent. Now, let's let's run it. >> Yeah, please do. I want to see what output comes. >> Yeah, let's see. So, Python my agent py. Let's see. >> Okay. Hello. How are you? >> I'm doing good by the way. How is the Josh? >> Great. Now, okay. Just a minute. It's impromptu. We see some errors, >> but we always get the results. Here it is. >> Let's see. Hello. How are you doing? Is there anything I can help you with? Oh, I see. I I gave my prompt here. This should be me saying uh Shubhham which says something. And let's say my agent. >> Okay. So I >> say something else. Yeah. So we are writing I know simple code. >> Yeah. >> Hello. >> Okay. So now you're talking to the agent. >> Yeah. Yeah. Hello. How are you doing today? Is there anything I can help you with? Can you see now this agent is working? Now >> this looks like a simple, you know, conversation with an LLM, right? It's very basic. Now what if I want to add some tools to it? You remember the diagram which I showed you? >> You showed some built-in tools. I just want to try something maybe show me some uh math tools or some web request. Anything anything should be fine. >> So I'll just install one more library called install >> strands agents tools. >> And this allows you to get a lot of built-in tools. >> Oh my god. So I I'll show you >> now that this tools library is installed. I I'll quickly know import this. >> Okay. >> So I'll just go here. >> Okay. >> And from strands tools. >> Ah that's quite easy. >> Do you want to make a HTTP request to uh open API? >> Yes. I want to see what it searches the web. >> Okay. That's great. So I'll use this HTTP request and I'll use a system prompt. >> Now what's a system prompt? >> Uh I'm not aware about it. Can you explain? >> No worries. Think of this agent having a persona. A persona of its own which can basically understand that okay this is what I need to do. This is a specific thing I need to do. These are the tools I need to use. This is the output I need to show. So that kind of persona. So are you telling me that this is like a instruction that I would give to my agent? Okay. >> So you are a helpful agent. >> Thank you. while I try to learn from the agent that you're building. [gasps] >> And you can use APIs that don't require authentication so that we don't have to pass any credentials and everything >> and you give outputs. >> Okay. >> And a few lines. Simple. >> Looks >> interesting. >> Yeah. Now this system prompt I will be giving to my agent. So system prompt becomes this. So I've passed my system prompt to my agent. >> Okay. >> Now this HTTP request you see. >> Now I can have multiple tools, right? So I'll just use tools >> and I can give an array of tools. So if I want to use multiple tools, I'll use this. Okay. >> All set to get something. >> Yes. Let's check this. >> Okay. Okay. Great. Now let's run this program. >> Yeah. >> Okay. Now I I don't want uh Shubam. I want Ana. >> Oh. So I'm the user trying out this. Nice. >> Great. So I want you to ask this agent something. >> Okay. Let's ask it what's the what's the temperature >> in um Bangalore, India? >> Sydney. >> Sydney. That's great. What's the temperature in Cindy? Oh, can you see it uses this HTTP request tool to get the weather data? >> Yeah, I'm seeing interesting. >> It is interesting. >> Can you see? Oh, wow. My god, it gave >> Yeah, it gave me wind speed. That's amazing. Thank you. I learned something today, >> but uh I want to deploy it in production. >> Oh, that that's the big question that these agents we we built it very easily in in a what 5 minutes. But how to make sure that these agents go to production, right? And that's where you understand that to run this agent and the way we used to deploy software SAS application before is different. >> You need different set of tools and that's why I want to introduce uh this Amazon bedrock agent code to youing. It's very new and I want to tell a few things about it. >> Okay. Now you can see a lot of things on your screen, right? You can see memory, built-in tools, gateways, identity, runtime, and I'm pretty sure you're confused that hey, what's all this? >> I'll make it simpler for you. Now, think of this your agent. >> You can use trans agents, you can use lang chain, you can use crew AI, you can use llama, whatever, any framework of your choice. Okay, >> build your agent and take that agent code in center. Now think >> this agent needs a runtime. It needs an infrastructure to run >> cuz these agents they work differently from your you know regular code. So they need a specific runtime. >> Okay. So I'll get this runtime from bedrock agent core and this runtime will ensure it has the exact infrastructure and environment >> which is required for an AI agent to run. >> Okay. So you're telling me that I can build practically on any agent and I can deploy it using runtime. >> Yeah, that's correct. That's correct. >> Amazing. >> Great. >> And how do we ensure that it is secure? >> Oh yeah. Yeah. I'll tell uh about this. Now think of this. your AI agent if I tell that hey >> I I love uh chai I love coffee >> and tomorrow it forgets >> it's not a good agent right so that's why we need this memory layer >> bedrock agent core gives you memory as well >> okay >> now think of this I showed you a few tools right >> right >> you can get those tools as well >> okay >> now you were talking about identity >> yes >> all these agents they need a secure environment so that's Why we have identity as well? We have AM access roles as well that can help your agent be secure. They can connect with each other very securely. You get everything in bedrock agent core. >> Okay, that sounds amazing. >> Interesting. Right. You want me to uh actually run? >> I I I do want to see a demo of how you do it because up until now you have shown me it's a very low code solution. Can you show me how this runtime works? Okay. So, you want this agent to go into production? >> Yes. >> Oh, let's do this. So, now that we have a lot of libraries, >> okay, >> I need to create a requirements.txt file. Okay. Requirements. >> Okay. So, we are separating the imports and also the libraries in a separate file just to keep my console clean. >> Yeah. Yeah. So if you can recall what all libraries did we inst install? >> We installed strands >> strands. >> We installed strands agent tools. >> Okay. Then we installed strands agents tools. >> Yes. >> There's one more thing which is bedrock agent core. >> Okay. Okay. The names are quite simple. >> Yeah. Simple. Now all I need to do is I'll just use pip install. >> Mhm. hyphen r I want recursively install everything >> requirements.txt txt. >> Okay. >> And that installed bedrock agent core. How easy it was. How fast it was. >> Very easy and very fast. I'm amazed. >> Great. Great. Now what I'll do, I'll try to create a bedrock environment for this. I'll just hide this. >> So from bedrock agent core import bedrock agent core app. >> Okay. >> Okay. Great. And it's just this much we need. >> Yeah. Yeah. Yeah. And this where bedrock agent core app I think we need we need a runtime. Right. I I showed you this diagram. >> You showed me. >> Yeah. So from bedrock agent core I need a runtime so that my agent can run. So I'll do this. >> So you are providing it the environment where it can actually execute its operations. >> Exactly. Now I need an application where I can wrap everything. So I'll just create app is equal to >> bedrock agent core app. >> Okay. >> Interesting, right? >> It is interesting and quite simple. >> Yeah. Now this is your system prompt which goes to your agent. >> Okay. >> This is your user input and this is your output. Okay. >> Now think of this. This >> input and output has to be sent to Bedrock agent core. So you need uh an entry point for that. Okay. >> So what I'll do, I'll just wrap this up in a function. >> Okay. >> I'll call it invoke. >> Yeah. >> And this function needs a payload so that I can send my prompt. So I'll just give a payload. >> Okay. So essentially we are creating a wrapper and we are just pointing the entry of the bedrock runtime to that particular function. >> Exactly. Now I'll just do aterate app dot entry point. Now this invoke method becomes my entry point. >> Okay, that's amazing. It's >> interesting, right? It's it's very simple. Now instead of user input coming from your CLI, I can get it from my payload. >> So in my payload, >> I can do a get because it comes like a dictionary, >> right? >> I can do a get and I can ask for a prompt. >> Okay. >> Okay. >> Something like this. >> Okay. >> Okay. Yeah. >> Now this user input goes where? In my agent. >> That's correct. >> In my agent. Yes. >> Yeah. Now this has to be sending some response. >> Mhm. >> This response I'll return. >> Okay. >> Okay. Think of it like an API. I I have sent a request and it is getting a response. >> It's like a two-way communication between >> Exactly. >> Okay. >> So response dot message. It will have a message, right? >> Okay. Yes. >> Great. Now this is what we have built. >> Okay. >> This looks great. >> Looks good. I just want to see >> Yeah. >> how I learned all this. >> Uh I'm pretty sure you must have taken some time and learned. >> Yeah. Yeah. There's a documentation which I followed. Okay. >> It's called strandsing.com. It's there in the description and you can read through all these you know examples and applications. >> Okay. >> And let's try running it. Now we might get a few errors. That's completely fine. Okay, >> we'll walk us uh you know we'll walk through it. >> Okay, >> let's see. >> Okay, and you're saying this is quite simple to learn. >> Yeah, it's very easy. Now, let's say I want to run this locally first. I directly don't want to deploy it on production. Let's try to run locally. So, if I want to run this file, so if name >> Mhm. >> you know how how the local files run. >> So, basically in Python, we are trying to instantiate the class and run it. Okay. Okay. So this becomes my entry point. >> This I can directly >> run. >> Oh, got it. >> Easy, right? >> Now generally this if you want you can add a port so that it runs on a certain port >> but you can write a print that your agent >> Mhm. >> is live. >> Giving it the uh message that we get to know our agent is running successfully. >> Yeah, correct. >> So let's let's run it. Python. >> Yeah. >> My agent py. >> Oh, let's see. >> Quite simple. So, while this executes, I just wanted to know you referred to strands agent.com. Just wanted to know is this open source? >> Yes. Yes. Strands agents is open source. Yes, that's correct. Okay. >> So, can you see your agent is live? >> Oh, yes. >> Interesting. >> Yeah. Oh no, what I'll do, I'll just open another, you know, tab in my CLI and I'll just do a curl, >> right? Okay. So, we are now requesting our agent who is already running in the other tab. >> Yeah. >> Okay. >> I'll just use it's it's running locally. So, I'll just do localhost. >> Okay. >> At80. >> Okay. >> Invocation. >> Okay. And we need to give it the payload. >> Yeah, that's correct. That's correct. Now let's say oh oh wow can you see >> yes >> ko do it doing its work okay now I'll give a prompt saying um hello a simple simple hello prompt >> let's see if it works hello >> and I'll go back to my screen here can you see hello I'm here >> to help you make HTTP request to API >> yes and this is fantastic even with a simple hello message it asked me to uh go through the help documents and everything. Yeah, I can see it. >> It's it's been quite some time we learning AI agents. Are you finding it easy, difficult? How's it? >> It's very easy and I learned about strands. I learned about AI agents. I learned about bedrock runtime, how I can deploy it in production and also I learned it how it can be secured. >> Yeah. How easy it is. Now there's something which uh you know came here with my uh slide. >> Yeah. Yeah. >> Uh so is this some kind of reasoning you're talking about? >> Yeah. Yeah. Yeah. Yeah. You got it. So chain of thought prompting. It's a very interesting way of prompting. But think of this >> your agent which I showed right here. You gave it a prompt. It used a tool. It gave you output. >> But >> if you talk in general life, let's say you have a task given by your manager. >> Now what do you do? >> You plan it. >> Yeah. you visualize how I will be doing it. Then you retrieve all the information and you analyze okay this is how much time I'll take >> and then you actually do it right. >> Yes. >> So there are a chain of thoughts that you formed in your mind. >> Okay. >> Just think of it in a similar way. >> It's one of the most effective ways of prompting >> where you give it a stepbystep execution plan. >> Okay. So you're telling me I can do this with an agent. I can ask it to think step by step and that to logically. >> Exactly. Okay. >> So with strands agents and agent core you can basically build this agent which uses chain of thought prompting multiple agents >> and actually deploy it to >> I do want to see it now. I am very intrigued. >> Superb. Now think of this. You can see your screen right? >> Yeah. think that you have given a prompt that uh can you tell me how do I learn trans agents? >> Yes. >> Okay. Now if you have to give it a stepby-step execution all the logical thinking that it does it does not do it one way. It uses different agents. So there will be a planner agent to plan that this thing this task that you have given it'll take two to three steps. it'll break down into two to three steps >> and then there's a retriever agent >> which can have tools that can retrieve data can retrieve uh you know data from XY Z sources >> okay >> then there is another agent called analyzer now this analyzer agent >> will understand okay all the data that I've retrieved is it correct >> is it validated >> okay >> everything goes to your validator which ensures a smooth output that you are actually requesting. Can you see how interesting this is? >> Okay, so you're telling me all I just need to do is code these four agents and they are going to do the task for me and also they will reason out why they are doing that task. >> Exactly. >> Okay. >> Interesting. You want to see it live demo? >> Yes, I do want to see. >> Let's go. Let's do this. Okay. So, this was your first agent. >> Yeah. Huh? By the way, I have already written the code for your multi- aent. So, do you want me to explain it a bit? >> Yes, I do want to understand I'm seeing something like there are four agents. Can you explain what >> how and how they will collaborate with each other? >> Great. So, these are a few supporting libraries I've used just to ensure that I use a proper typing the proper best practices of Python. >> Right. >> I've used bedrock agent core runtime. Okay, >> remember it from the last time. Great. I've used trans agents and I have used >> the strand tool HTTP request. >> So I'm pretty sure you are fine with the imports. >> Okay. Okay. >> Great. Now I've created a bedrock agent core app >> right >> for four agents. >> Okay. >> Now I have given them names. So I have a planner agent, retriever agent, analyst and a validator. >> Okay. Okay. Now I've created a class called multi- aent system where in the init function I have initialized these agents. Now see the system prompt I've given for each and every agent. Very interesting. >> Yes. And I see for the planner you have mentioned that we should break down the tasks. Why do we need that? Is it for the same thing we were talking about? >> Exactly. Chain of thought prompting. So I have broken down the initial prompt into different tasks so that a validator gets its own task. The retriever gets its own task. >> The analyst agent gets its own task. >> Okay, that's amazing. And that is why my agent will now not be likely hallucinating. It will give me logical responses. >> You got this, Ana. I am I'm amazed to see how curious and on point you are. >> Thank you. >> Great. >> I'm learning a lot. >> So if you see the system prompt, break complex problem problems into two to three actionable subtypes. Now it'll divide these thing between your retriever analyst and the validator if you see the proc validate analysis quality accuracy and completeness. Okay. >> So the output from analyst agent >> goes to your validator. The output from retriever agent goes to your analyst and the planner actually you know divides the thing and gives it to them. >> So it's delegating my tasks. I don't have to do it. >> You got this. >> Okay. >> Great. So are we done with the init function? You got it. >> Great. >> Now in order to execute this agent, I have created all the agents. Whatever prompt you give, it goes here. >> Okay. >> And it gives the output. >> Okay. >> Easy. So I've just executed this agent. So this becomes my entry point. >> Okay. >> Now process query is where I want my query, my prompt to go and then it goes through these execution. Okay. >> Now this is what I've done. I have added a few metrics so that I can check if my agent is performing well. And by the way, agent core gives you observability. So all these metrics can be stored and you can then analyze that how your agent is performing. >> So you're telling me I can actually track the health of my agent, the performance. Oh my. You got this. And finally, I've built my response. >> Whatever user query I have given, you will be giving. by the way >> okay >> if it's success if it needs review I've given a confidence score >> and all the execution steps you know chain of thought stepby-step processing the summary and the results >> okay >> and in the payload I'll get the prompt let's say I don't give a prompt I have a fallback that how I can help you today >> so you're telling me that you actually if I don't give a prompt it will still respond me something >> okay okay That's correct. Oh, by the way, this multi- aent chain of thought system will start its server on a given port. >> Okay. >> Now, let me see. Are you attentive? >> Can you remember on port number 880? Is there something already running? >> Yes. >> Yes. My server here, my agent, it's still running on my local. So, I'll just kill it so that it doesn't collide with my new multi- aent setup. Right. >> Okay. Or if I want I can change the port as well. Okay. >> By the way, can you see this repository? It's I've added a few examples for you. I've added a cool read me. I've added a few test cases and the requirements. >> Okay. >> Great. >> That's a well structured project you've got there. >> Thank you so much. Let's build it. >> Okay. >> Okay. Now, I want you to understand a few things. I want to run it locally. I can directly write Python. >> Mhm. multi-agent py and this should do the work. Can you see starting the server on80? >> Yeah. >> But this we already did, right? >> Yes. >> The question comes how to make it work in production. >> And that's what I want to see. >> Yeah. So for that you need a toolkit >> which is known as bedrock agent core starter toolkit for a starter like you. [laughter] >> Okay. >> Okay. I already have >> we already have a requirement requirement. >> Exactly. So can you see I've added bedrock aure core starter toolkit. >> Yes. >> Interesting. Right. >> Yes. >> Now I'll just do pip inst. >> Okay. So we are installing the whole requirements.txt. >> Ah so requirements.txt. Enter. >> Okay. >> Interesting. And can you see everything got installed >> right? >> Interesting. Right. >> And that's in a few seconds. >> Yeah. Yeah. It's quite fast. Now think your agent needs a runtime. >> Yes. >> So have you worked on these applications before where I have built an application and I wanted to run it anywhere. Uh yes remember something known as docker. >> Yes. >> Yeah. Now if I have to write a docker file for this it's a lot of task >> right. >> Yeah. What if I tell you in just one command your docker file will be written. I am intrigued. You have to show me that. >> Okay, let me show you. So, all I need to do, you can't see any Docker file, right? >> No, >> no magic here. >> No. >> Now, all I need to do is with that starter toolkit, I'll just use agent >> core. >> Okay. >> Agent core configure. >> Mhm. >> Oh, my hero is already doing that magic. Okay. So, agent core configure multi-agent. So this becomes as an entry point. >> Okay. >> Asian code starter toolkit will understand this entire code and based on this code it'll write a docker file for you. >> Yes. Yes. That's correct. >> And that's that's just in one line. >> Yeah. Yeah. >> Okay. >> I'll show you. So agent core configure entry point. Enter. Now it'll ask you a few questions. >> Okay. >> So agent core name. So agent name multi- aent. So execution role name. Do you want to create a name? Let's let's give it some new name. >> Let's put AI agent rocks. >> AI agent rocks. That's great. Okay. ECR repository. So you uh remember this docker I was talking about. >> Yes. >> Now this Docker file creates an image. >> Okay. >> Now this image has to be hosted in a repository, right? >> So that's why we need ECR, elastic container registry. >> Okay. >> Okay. Now I'll if you have any repository of your own you can put it or you can just press enter to autocreate. >> It does. >> It does create. >> Okay. Okay. >> Now can you see there's a need for a dependency file which is your requirements.txt. >> Oh >> as it's in the same directory you don't have to do anything. But if it's in some other directory you can put the path. >> Okay. >> I'll just press enter. And it detected the file. >> It auto detects. Can you see how interesting era we are living in? >> Yes. And we are just like writing one line of code and you're getting things done. Sometimes we don't even have to write it. It's autoprompting. That's amazing. >> Yeah. You just have to think big. >> Yeah. So you can even have oath authorizer or you can use IM. So I don't want oath. I'm fine with IM. So I'll just click no. Okay. Great. >> Now do you want to allow the header? >> Let's >> allow list. allow to everyone. >> Let's not. >> Okay, that's fine. I'll keep the default one. And that's all. >> Yeah, >> it's done. >> Can you see >> it's all done. Configuration is complete. >> Interesting. And there's a Docker file ready for you. >> I can see that. And that's very >> It's interesting, right? Everything is ready for you. It uses open telemetry instrument so that you can get all the logs, all the observability built in. >> Okay. Okay. >> Interesting. Now once I have the configuration done, >> what I'll need to do, I just need to launch this agent. >> Okay. >> So agent core launch. >> Mhm. >> Let's take this rocket to the moon. Agent core launch. Now see what happens. >> Seeing that launching. >> Can you see? >> And are you telling me that now it's running in my Docker with the container with my image goes to the container registry? Can you see it uses code build? >> Yes. >> Which builds my docker file to an image which uses this image to run a container. >> Okay. >> Interesting. Can you see everything is happening in front of your eyes? >> Yes. >> Now whatever your source code is is it zips the source code and puts it to S3. Okay. >> So it can use it whenever it wants. >> Okay. And also because I should not lose it. >> Yeah. Yeah. Yeah. >> Okay. >> Can you see it's how how fast it is. So it has ceued the process provisioning done download source. Oh by the way all this uh code built this file is also given to you. >> Oh interesting right. >> So I get a YAML. >> Yeah. >> Okay. >> So we have done everything to make sure you just have to code your agent and leave it [clears throat] to us. >> Yes, I can see that. And it's very intriguing. We just wrote few lines of code for strand agents deployed an AI agent using bedrock agent core. Now we have a few lines of code written in kro to deploy it in the production and actually we are running it. >> Yeah. Oh, I see the role that you said AI agent rocks >> it's not there. >> So let's let's try creating a default role. That should be fine. >> Yes. >> Okay. Okay. So let's configure this one. Mhm. again. Okay. >> H >> auto create. So enter to autocreate. It auto creates. Great. >> Nice. ECR we'll use the previous one. That's that's completely fine. The dependency file. Okay. >> Yeah. >> Okay. So we have used everything as the previous one just the role >> role we have switched >> auto created. >> Okay. >> Let's see if this works. Great. Okay. Interesting. Okay, >> it's cued now. Takes some time but should be fine. >> So till the time it runs. I just wanted to know you mentioned something about chain of thought working with multi-agent and can you explain why it is needed while I know hallucinations is one thing we should avoid. What are the other reasons? >> So one thing is if I want an output which is a bit more structured. >> Okay. >> It has proper reasoning. Okay, >> a proper thought process went to it and not just random lot of you know tokens. I can give a chain of thought so I can refine it in every step. >> Okay. >> Okay. And the delegator agent that is my planner is also doing all these steps. >> Yeah. Yeah. Exactly. So can you see the launch failed again? Why? Because the name multi- aent already exists. Oh okay. >> So before you know there's a secret before giving this demo I was trying the running this so that yeah so so that's why it is giving a conflict. >> Okay. >> And it says use auto update on conflict flag. Oh I I'll just use that. >> Okay. So it's also giving you the suggestion what you should do. >> That's correct. So I'll just use this autocomplete on conflict flag with my launch. >> So this command launch I just need auto update on conflict. >> Okay. So it will shut down the previous one, remove the conflict and run the latest one. >> Exactly. >> Oh, that's amazing. >> So that's why I've kept all the errors with you so that you know whenever you try you get all these errors and you're able to fix it. >> Yes. And uh as a starter I would definitely need these insights which is amazing. Okay, >> I hope you understood all this code build the docker ignore which it created the docker file it created. Okay. It's all very necessary and the way we used to build our software previously >> and the way we are doing it now in the era of AI, it's very different. >> Yes. >> Okay. Are you liking the new one? >> I like this. So, uh can you tell me how from a traditional software, this AI software is different? >> Yeah. So, as you see this AI agent, we have a runtime. It uses memory. It uses built-in tools. uses a lot of component to make it a production ready thing. >> Yes. >> Yeah. So we need a different infrastructure, a different set of capabilities to deployed and that's why strands agents agent core. >> You see the point now by the way >> our >> agent >> agent is deployed. So code build deployment was successful >> without any cuts without any edits. I'm sure you are able to now deploy your agent with all the errors in this video only. Yeah, >> I'm pretty sure whenever you face any problem, you'll able to solve it. Let's run it. >> Yeah, that's exciting. >> Let's let's do this. Let's do this. So, it says the next step. If you want to check the status of your agent, >> you can check the status. >> Let's let's see if our agent is healthy. >> Okay. >> Okay. >> And that's always the first step to do just to check if my agent is everything is fine. So, can you see the observability dashboard is live? You can check how your observability, the logs, everything for your agent here. Can get the cloudatch log, get the deployment info, everything. >> Okay. >> Now, are you ready to invoke your agent? Let's go. Let's go. Agent core invoke prompt. Let's give a simple prompt. Hello. Just to see everything is fine. >> Yeah. >> Okay. Are you ready to see the magic? By the way, this is not on your local agent core will invoke. >> Okay, >> this particular multi- aent py. >> Okay, which is running in my other instance. >> Yes, >> it'll do all this thing processing the query. It'll go to your multi- aent system, start processing the query, use all the four agents, >> okay, >> and give you an output. So, as it uses chain of thought prompting, the output time >> might differ. It goes agent to agent, >> right? >> It Oh, but it's fast, >> right? Plus, it actually it's giving me the reasoning why it gave that particular answer. So, it is bound to take a little bit of time. >> Yeah. >> Can you see the query that I gave was hello, >> I got a status success. Yes. >> So, my first step was going to agent planner and it gave a very good confidence. It took around 5.86 seconds. Yes. >> The content was like an assistant giving, oh, you got this. Yeah. >> Interesting, right? >> Yes. Can I ask this particular agent how I should learn strand agent? >> Go for it. Just go for it. Write the prompt. >> How to learn strand agent. Let's see if my agent is smart enough. >> Interesting. And can you see in the retriever tool uh in the retriever agent here >> I have used tools HTTP request. So it goes to the official documentation gets all the data and bring it to you. >> Okay. >> It'll take some time because it goes through the chain of thought prompting and it'll get you the best output. >> Okay. So till the time these things are coming up can you also guide me how I can start my journey uh for bedrock agent co I know for strand I should go to strandagent.com and while the agent is getting me the response of the other details can you explain to me how bedrock agent co should be started >> great great so if I had to start it from scratch so what I'll do I'll basically go here and I'll just write strands.com so this is the place where I can get all of my >> okay >> documentation user guides examples API references and it's open source if you want to contribute you can do it >> okay >> yeah so I'll just go to user guide so whatever I told I I basically understood from here >> okay great now if you want to see you asked a question for bedrock agent core go here Amazon bedrock agent core all the examples All the setup, everything is mentioned here. >> That's amazing. And it's a one-stop shop for all the resources I want to learn. >> Exactly. And also, you'll get this in the video description. How interesting it is. Let's see if we got our result. Oh, it's it's still thinking. It's taking some time because it wants to teach you how to learn strange agent. Oh, maybe it it should say that. Just watch this video, you'll you'll understand. Okay, great. So uh by the way till now is everything clear? I hope you got everything how this works. >> Yes interesting right? >> I do and it now creates a com complete flow of the understanding I should start building my agents on strands. >> I should productionize them with bedrock agent core. >> I should actually start doing the best practices like I should start with an easy agent. Yeah >> and then scale it. Exactly >> right. And also for having the logic and reasoning built into it, I should be using chain of thought prompting. >> That's so true. >> I also wanted to know uh how did you learn about this? What was your journey? >> Yeah. So whenever I want to learn anything, I I go by this simple rule, read the documentations, read the manual and I start experimenting it. >> I start practicing it. I create projects. I ensure whatever I'm doing, I'm putting it in open source. I'm making it, you know, learn in public. >> I make sure I share my learnings with others. >> And that's why I use these, you know, ways. So I can build with communities. I can build with all my friends, all my colleagues. And that's how I >> communities sounds interesting. >> Yeah. Yeah. >> Uh does AWS has communities? >> Absolutely. We have a lot of user groups. They're in India, all over the world. >> Okay. Okay. Which community group are you a part of? >> Oh, I'm part of Pune community. >> Oh, okay. I need to join one of those. >> Yeah. >> Okay. So, I see it's the response is ready. >> Yeah, the response is ready. Let's go through the response. Oh, it's quite a big one. >> So, can you see how to learn trans agents? Success. It took a few steps. It has a good confidence >> and it gave you everything. Oh, wow. uh analysis of request you are asking about learning strand agent this appears to be a technical topic okay it also got a small typo you saw typo okay >> interesting so can you see based on research I can provide with comprehensive guide so it went to the internet it understood this uh the documentation which I was showing and can you see it gave that GitHub link okay >> the comprehensive user guide everything in your output and by the This is scalable >> and despite the typo, it was able to give me the answer. >> That's true. >> Okay, >> that's agents for you and deployed in productions using bedrock agent core. >> Okay, >> interesting. >> So today we have definitely learned something. We have learned about strands. We have learned about bedrock agent core. We have learned about how to deploy it. We have learned the best practices how we should begin our journey on this. That's amazing. Thank you Shbam. Thank you so much Ana for being such a curious learner and so helpful in doing the entire demo. It's amazing. Thank you so much. >> And do you want us to look in the description for the other links and the references? >> Absolutely. Yes. Thank you so much for watching the video till here and I want you to check out the description obviously like the video if you really liked it and subscribe to the AWS developers YouTube channel and I'll see you all in the next one. Thank you.

Original Description

Learn how to build and deploy AI agents to production using AWS Bedrock Agent Core and Strands Agents. Using Kiro for development, follow along as we demonstrate agent building, chain-of-thought prompting, and production deployment best practices. Explore Amazon Bedrock Agents 👉 https://go.aws/47NHsvZ Resources: Strands Agents: https://go.aws/4ofh1oN AWS Bedrock Agent Core: https://go.aws/43F7LSD Follow AWS Developers! 📺 Instagram: https://go.aws/4olJSrM 🆇 X: https://go.aws/3Lf8Ytx 💼 LinkedIn: https://go.aws/43y00xO 👾 Twitch: https://go.aws/433xkg3 Chapters: 00:00 - Introduction 00:51 - What are AI Agents? 02:41 - Building Your First Agent 10:20 - Understanding Chain of Thought Prompting 20:29 - Multi-Agent Systems 27:40 - Production Deployment with Bedrock Agent Core 42:11 - Best Practices & Resources #AmazonBedrock #AIAgents #MachineLearning #TechTutorial
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from AWS Developers · AWS Developers · 0 of 60

← Previous Next →
1 Using Microsoft Active Directory across On-premises and Cloud Workloads
Using Microsoft Active Directory across On-premises and Cloud Workloads
AWS Developers
2 What is Cloud Computing with AWS? | Hebrew Webinar
What is Cloud Computing with AWS? | Hebrew Webinar
AWS Developers
3 Best Practices for Getting Started with AWS | Hebrew Webinar
Best Practices for Getting Started with AWS | Hebrew Webinar
AWS Developers
4 Best Practices for Using AWS Identity and Access Management (IAM) Roles
Best Practices for Using AWS Identity and Access Management (IAM) Roles
AWS Developers
5 Building Scalable Web Apps | Hebrew Webinar
Building Scalable Web Apps | Hebrew Webinar
AWS Developers
6 Dev & Test on the AWS Cloud | Hebrew Webinar
Dev & Test on the AWS Cloud | Hebrew Webinar
AWS Developers
7 Storage & Backup on AWS | Hebrew webinar
Storage & Backup on AWS | Hebrew webinar
AWS Developers
8 Disaster Recovery on AWS | Hebrew Webinar
Disaster Recovery on AWS | Hebrew Webinar
AWS Developers
9 AWS Israel News  | Episode 1
AWS Israel News | Episode 1
AWS Developers
10 Security Best Practices on AWS | Hebrew Webinar
Security Best Practices on AWS | Hebrew Webinar
AWS Developers
11 Ready: Introduction to AI on AWS | Hebrew Webinar
Ready: Introduction to AI on AWS | Hebrew Webinar
AWS Developers
12 Set: What is ML for developers? | Hebrew Webinar
Set: What is ML for developers? | Hebrew Webinar
AWS Developers
13 Go!: Building your own ChatBot with Amazon Lex | Hebrew Webinar
Go!: Building your own ChatBot with Amazon Lex | Hebrew Webinar
AWS Developers
14 And Beyond: Amazon Sagemaker | Hebrew Webinar
And Beyond: Amazon Sagemaker | Hebrew Webinar
AWS Developers
15 Building API-Driven Microservices with Amazon API Gateway - AWS Online Tech Talks
Building API-Driven Microservices with Amazon API Gateway - AWS Online Tech Talks
AWS Developers
16 Understanding AWS Secrets Manager - AWS Online Tech Talks
Understanding AWS Secrets Manager - AWS Online Tech Talks
AWS Developers
17 Best Practices for Building Enterprise Grade APIs with Amazon API Gateway - AWS Online Tech Talks
Best Practices for Building Enterprise Grade APIs with Amazon API Gateway - AWS Online Tech Talks
AWS Developers
18 Build, Train and Deploy Machine Learning Models on AWS with Amazon SageMaker - AWS Online Tech Talks
Build, Train and Deploy Machine Learning Models on AWS with Amazon SageMaker - AWS Online Tech Talks
AWS Developers
19 AWS Israel News | Episode 2 | re:Invent
AWS Israel News | Episode 2 | re:Invent
AWS Developers
20 AWS Floor28 News - January
AWS Floor28 News - January
AWS Developers
21 AWS Floor28 News - February - Hebrew
AWS Floor28 News - February - Hebrew
AWS Developers
22 AWS Floor28 News - March - Hebrew
AWS Floor28 News - March - Hebrew
AWS Developers
23 AWS Floor28 News - April - Hebrew
AWS Floor28 News - April - Hebrew
AWS Developers
24 AWS Floor28 News - May - Hebrew
AWS Floor28 News - May - Hebrew
AWS Developers
25 Authentication for Your Applications: Getting Started with Amazon Cognito - AWS Online Tech Talks
Authentication for Your Applications: Getting Started with Amazon Cognito - AWS Online Tech Talks
AWS Developers
26 AWS Floor28 News - June - Hebrew
AWS Floor28 News - June - Hebrew
AWS Developers
27 AWS Floor28 News - July - Hebrew
AWS Floor28 News - July - Hebrew
AWS Developers
28 Enriching your app with Image Recognition and AWS AI Services - AWS Webinar - Hebrew
Enriching your app with Image Recognition and AWS AI Services - AWS Webinar - Hebrew
AWS Developers
29 Personalize, Forcast, and Textract - AWS Webinar - Hebrew
Personalize, Forcast, and Textract - AWS Webinar - Hebrew
AWS Developers
30 Managing Your ML Development Lifecycle with Amazon SageMaker - AWS Webinar - Hebrew
Managing Your ML Development Lifecycle with Amazon SageMaker - AWS Webinar - Hebrew
AWS Developers
31 Running your ML code in Amazon Sagemaker - AWS Webinar - Hebrew
Running your ML code in Amazon Sagemaker - AWS Webinar - Hebrew
AWS Developers
32 Get Started in Minutes with Amazon Connect in Your Contact Center - AWS Online Tech Talks
Get Started in Minutes with Amazon Connect in Your Contact Center - AWS Online Tech Talks
AWS Developers
33 AWS Floor28 News - August - Hebrew
AWS Floor28 News - August - Hebrew
AWS Developers
34 AWS Floor28 News - September - Hebrew
AWS Floor28 News - September - Hebrew
AWS Developers
35 Deep Dive on Amazon EventBridge - AWS Online Tech Talks
Deep Dive on Amazon EventBridge - AWS Online Tech Talks
AWS Developers
36 Advanced Serverless Orchestration with AWS Step Functions - AWS Online Tech Talks
Advanced Serverless Orchestration with AWS Step Functions - AWS Online Tech Talks
AWS Developers
37 Living on the Edge - an Introduction to  Amazon CloudFront and Lambda@Edge  - Hebrew Webinar
Living on the Edge - an Introduction to Amazon CloudFront and Lambda@Edge - Hebrew Webinar
AWS Developers
38 AWS Floor28 News - October - Hebrew - YouTube
AWS Floor28 News - October - Hebrew - YouTube
AWS Developers
39 What's New with AWS Storage - AWS Online Tech Talks
What's New with AWS Storage - AWS Online Tech Talks
AWS Developers
40 How to Build a Compelling Migration Business Case Using TSO Logic - AWS Online Tech Talks
How to Build a Compelling Migration Business Case Using TSO Logic - AWS Online Tech Talks
AWS Developers
41 Configuring and Managing Amazon S3 Replication - AWS Online Tech Talks
Configuring and Managing Amazon S3 Replication - AWS Online Tech Talks
AWS Developers
42 AWS Floor28 News - November - Hebrew
AWS Floor28 News - November - Hebrew
AWS Developers
43 Using Relational Databases with AWS Lambda - Easy Connection Pooling - AWS Online Tech Talks
Using Relational Databases with AWS Lambda - Easy Connection Pooling - AWS Online Tech Talks
AWS Developers
44 AWS Floor28 News - December 2019 - Hebrew
AWS Floor28 News - December 2019 - Hebrew
AWS Developers
45 AWS Floor28 News - January 2020 - Hebrew
AWS Floor28 News - January 2020 - Hebrew
AWS Developers
46 Top 10 Data Migration Best Practices - AWS Online Tech Talks
Top 10 Data Migration Best Practices - AWS Online Tech Talks
AWS Developers
47 How to Use Azure Active Directory with AWS SSO - AWS Online Tech Talks
How to Use Azure Active Directory with AWS SSO - AWS Online Tech Talks
AWS Developers
48 AWS Tips & Tricks - Amazon Redshift Advisor - Hebrew
AWS Tips & Tricks - Amazon Redshift Advisor - Hebrew
AWS Developers
49 AWS Tips & Tricks - Amazon Redshift Elastic Resize - Hebrew
AWS Tips & Tricks - Amazon Redshift Elastic Resize - Hebrew
AWS Developers
50 AWS Tips & Tricks - Amazon Redshift Spectrum - Hebrew
AWS Tips & Tricks - Amazon Redshift Spectrum - Hebrew
AWS Developers
51 AWS Tips & Tricks - Savings Plans & Cost Explorer - Hebrew
AWS Tips & Tricks - Savings Plans & Cost Explorer - Hebrew
AWS Developers
52 AWS Tips & Tricks - Amazon Redshift Concurrency Scaling - Hebrew
AWS Tips & Tricks - Amazon Redshift Concurrency Scaling - Hebrew
AWS Developers
53 AWS Tips & Tricks - Training Models with Amazon SageMaker - Hebrew
AWS Tips & Tricks - Training Models with Amazon SageMaker - Hebrew
AWS Developers
54 AWS Tips & Tricks - Auto Model Tuning with Amazon SageMaker - Hebrew
AWS Tips & Tricks - Auto Model Tuning with Amazon SageMaker - Hebrew
AWS Developers
55 AWS Tips & Tricks - Amazon Comprehend - Hebrew
AWS Tips & Tricks - Amazon Comprehend - Hebrew
AWS Developers
56 Understanding High Availability and Disaster Recovery Features for Amazon RDS for Oracle
Understanding High Availability and Disaster Recovery Features for Amazon RDS for Oracle
AWS Developers
57 Amazon Forecast  – Forecasting  - From Months to Days (Hebrew)
Amazon Forecast – Forecasting - From Months to Days (Hebrew)
AWS Developers
58 Visualize your data with Amazon QuickSight (Hebrew)
Visualize your data with Amazon QuickSight (Hebrew)
AWS Developers
59 Amazon Kendra (Hebrew)
Amazon Kendra (Hebrew)
AWS Developers
60 AWS Floor28 News - AI/ML Special Edition
AWS Floor28 News - AI/ML Special Edition
AWS Developers

Related Reads

Chapters (7)

Introduction
0:51 What are AI Agents?
2:41 Building Your First Agent
10:20 Understanding Chain of Thought Prompting
20:29 Multi-Agent Systems
27:40 Production Deployment with Bedrock Agent Core
42:11 Best Practices & Resources
Up next
No More Struggling with Prompts! Here is Auto Prompt Enhancement Magic🔥
DroidCrunch
Watch →