[
  {
    "startMs": 12740,
    "text": "Hi, everyone. Um, welcome, welcome. Agents that forge their own tools. What is so great about this? Can't your Cloud code do this, or can't your cursor or your code editors, can't they all write their own tools? So what am I even talking about here? Why is this such a big deal, right? Like, any, all of your co- um, agents can write tools by themselves, but how many agents do you know that can"
  },
  {
    "startMs": 42860,
    "text": "fix code at runtime? Let's say you've got something in production. It's running, everything looks great, but something is failing, then what happens? You have to probably bring it down, fix it by yourself, and then restart it, and then work with your Cloud code or whichever editor you're using, and then bring it back up, right? But imagine if your agent was smart enough to figure out, \"Oh man, there is a bug here. Something's not working. I'm falling,\" fe- uh, \"falling into an error. I need to fix myself.\" And"
  },
  {
    "startMs": 72740,
    "text": "it realizes what it can do to fix itself, writes its own tools or writes its own agents and fixes itself. How cool would that be, right? And that's what I'm here to talk to you about today. Let me quickly show you a demo because I think I like leading in with demos so you know what you're getting into. So let's start with that, right? So here I have a... And you can see my screen. I'm hoping it's big enough. I can zoom in. Okay. So I have a simple agent"
  },
  {
    "startMs": 102680,
    "text": "here called agents.py. This agent, we can go over the code in a bit, but this agent has nothing. It's just got, it's just got a, a pretty cool system prompt, and then it's calling the system prompt, and it's got three tools. And if you look at the tools package, there are actually no tools files that are written. So technically, this agent has no capability by itself, right? It shouldn't be able to do anything, right? All it should technically hallucinate because of the LLM that is"
  },
  {
    "startMs": 132720,
    "text": "running under the hood. But let's say I say something like... Okay. So first, I'm gonna start running this so we know it's running. Okay. So in runtime, right now this is running. Now I'm going to say, \"Hey, you know what? Um, help me calculate something, uh, some complex math equation.\" Right?"
  },
  {
    "startMs": 157960,
    "text": "When I say this, this agent, which technically has nothing available, is going to be calling the three tools that it's got, and we'll look into the tools that it's got in just a bit. And it's going to say, \"Oh, you know what? Let me create a math calculator tool because that's what you're asking for.\" And it's not just going to create, it's going to let me use this tool that I'm creating right now at runtime without having to rerun it. So okay. So it's clearly gone ahead and created. So let's look at tools again."
  },
  {
    "startMs": 187940,
    "text": "It's created the mathcalculator.tool, and it's saying, \"Okay. I do all these things. I've got min, max, blah, blah, blah.\" It's gone and created this entire new tool, so it's saying I can do all these things, right? So let's say calculate, uh, oh, yikes, uh, what's the square of blah, blah, blah. Some number, right? I'm just typing out a random number. So now it- it's calling that math calculator tool that it just wrote by itself, and it's giving me the answer."
  },
  {
    "startMs": 217900,
    "text": "Not just that, right? So let's say I give it something completely out of blue, and I say, uh, cool whatever, count number of characters in my word. Okay? So then, so then it's like, okay, so it's gonna check if it can use any of the tools that it's currently got access to. It doesn't. So what it's saying is, \"Okay, let me write a tool to count the number of characters you want,\" because clearly it knows that it does not have the capability to do it."
  },
  {
    "startMs": 248120,
    "text": "And so it's going ahead, and it's creating... Ah, there we go. Even before I could finish speaking, it created a character counter for us. So let's say, um, do it for this word, and it's not even a word. I'm just gonna put random things. You know what? I should have actually done something that I could count so I can validate it, but the thing is, it's calling a tool. It's calling the cha- character counter tool, and it's telling me that it's got 28 letters. Let's do it something we can test, so I'm just gonna do it for these"
  },
  {
    "startMs": 277980,
    "text": "three letters, right? We'll see if it knows. So I'm not even telling it what to do. I'm just typing three letters. It knows that it has to do it, and it's doing it. How powerful is this? So what I want to leave you with today is show you how you can build something like this, where you can use it, I think it's pretty powerful, and how we can implement it in our work, day-to-day work. Very niche. So now let's get down to the code. This is an idea called meta-tooling, and I'm"
  },
  {
    "startMs": 307960,
    "text": "using an open source framework called Strands Agents. And my name is Sandhya, and I work at AWS, and we at AWS built Strands Agents as an open source a- agentic harness that you can use to run your LLMs with. Right? And so, l- um, how, show of hands, how many developers do we have in the room? A quick show. Oh, most of you. Brilliant. I'm talking to the right audience. If not, I will change things around a little bit. So if"
  },
  {
    "startMs": 338020,
    "text": "you guys like getting to the code, I'm gonna get into the code with me, right? So the main thing we need here for agents, and I have a slide deck that goes with it, is we need just three types of tools, the editor, the shell, and the load tool, along with the system prompt that lets us implement this function. So I'm gonna quickly go to my slide deck that helps us understand this better Like I mentioned, this is Strands Agents. This is our agentic"
  },
  {
    "startMs": 368064,
    "text": "AI harness, and y- you can use your own LLMs, bring your own models. Another cool part, because this is a, a, an harness, is the fact that if, let's say tomorrow there's a new, the state-of-the-art LLM that comes out, you don't have to rewrite all of your system prompts. You don't have to rewrite the structure. You don't have to change your entire architecture. You can keep it as it is, and whichever model you use, you can just replace it. So it also lets you experiment with model performance without really"
  },
  {
    "startMs": 397544,
    "text": "rewriting your entire architecture. So it's super, super powerful. It supports MCP, A0A, all of that cool stuff. It has a bunch of model providers. Um, you can get started. So what do we do? Very simple, right? Five lines of code. Uh, import agent. From there, import shell. Shell is the very first tool that we need, because we need to give it access to the directory. We need to give it access. It needs to know what it's running, where it's running, where your code base is located. So that is just one of the tools that you"
  },
  {
    "startMs": 427324,
    "text": "need. And then if you ask it what can you do, it understands what's going on under the hood. So to techniques- technically start being able to use it on the fly, right? So then let's get into what I actually just built a couple of minutes ago and I showed you. Over here, what am I trying to do? The idea, because this is community-driven, AWS manages it and maintains it for you, people write a lot of pre-built inbuilt tools, but there's also community-written tools. And so"
  },
  {
    "startMs": 457624,
    "text": "all you need is three tools to be able to start implementing meta-tooling. So what do you need? First of all, you need to have a system prompt that tells your agent what a good tool looks like. How does that work? We have to start with the @tool decorator function. That's how it knows it's a tool. Uh, excuse me. That's how it knows it's a tool, and then you tell it what a tool looks like and where it should be stored, right? And so you call the system prompt there. That's all you say,"
  },
  {
    "startMs": 487904,
    "text": "and then you can give it access to different tools. I highlighted load tools from directory equals true, because that is what enables you to, uh, enables the agent to start letting it run the tools that it's generated at runtime dynamically. And we later on decided we should just make this into a func- uh, into a tool by itself, so now that's become the load tool. So now when you go and say, \"Hey, create tool, create five new tools for yourself and start"
  },
  {
    "startMs": 517924,
    "text": "using them,\" it's going to know what it's going to do. So let's go back to the code that I showed you earlier, right? Same thing. It's got the system prompt, and here I'm saying, \"You are the meta-tooling agent that creates your own tools and custom tools at runtime.\" So I'm defining the tool template. I'm telling it what a tool looks like. I'm giving it the tool specification of what it's supposed to look like, and then I'm giving it rules for what it's supposed to do and where it's supposed to write into. And I'm also telling it, \"Always check if it, if it"
  },
  {
    "startMs": 547864,
    "text": "exists or not. Only if it doesn't exist, then write a new tool.\" And I'm telling it, so I'm giving it three tools: editor, which allows it to write; the shell tool, which shows it what it has; and the load tool, which allows it to load from the directory, the tool from the directory dynamically. And this is all you need, and it takes just one line of code, right? System prompt equals system prompt, three different tools, and this is just"
  },
  {
    "startMs": 577904,
    "text": "code so that I can chat with it continuously. And so when I do this, it's actually able to start running. \"Create five random tools for yourself.\" And so it's going to start creating these five new tools, and the power of this is, like I said, when you're, uh, deploying code into production, you m- you might want to wait for the agent to be smart enough to figure out what's wrong and to be able to answer questions for"
  },
  {
    "startMs": 607604,
    "text": "itself. Let's say you're b- you're building this app that's supposed to book flight tickets domestically. But let's say you have one user who is saying, \"No, no, I want a flight ticket from, I don't know, India to Hong Kong.\" And your agent gives up because it's not been explicitly programmed to do that or it's not been trained to have access to be able to do that. But do you just want it to fail? Do you want it to run into an error? Do you want to give it back to your deployment, to your engineering team, uh, and have a, uh, turnaround of two weeks and then come back? No, you want to be able to solve it."
  },
  {
    "startMs": 637864,
    "text": "So this is one of the ways by which you can handle that, right? So again, let's get back to the code, and we have more cool things coming up. Now, I was speaking about tools that can-- this agent that can write it own-- write its own tools. Can it also write its own agents? Yes, it can. And I have another demo for that, but wait until the last few minutes for that, right? So when we talk about agents that write their own, uh, agents also, we want to understand agentic patterns. We have three primary patterns. The first"
  },
  {
    "startMs": 667804,
    "text": "one is swarm, where you have sub-agents that work with each other in parallel. So they work on a task in a combined fashion, and they take different parts of the task themselves. Then you have a graph where the result of one sub-agent gets fed into the other sub-agent, and then there's the handoff. And then you could also have workflows that have a combination of all of these, right? So with the workflow, you could have a parallel set of sub-agents calling each other, and then there could be nodes and graphs and"
  },
  {
    "startMs": 698084,
    "text": "all of that cool stuff. And so this, and so they, all of this can be created by just the agent itself. We don't need to. We can do it our ownselves, but we don't necessarily need to. So, um, let's quickly go check how that looks. Um, so this is the exact same thing. This is for my meta-agents. I'm doing the exact same thing. I've given it three tools. Over here I'm actually, if you look at my agents file, it's pretty empty. And I'm saying"
  },
  {
    "startMs": 727824,
    "text": "agent is the tool file template. So I'm saying just break it into two to four sub-agents. I'm keeping it simple. No swarm, nothing fancy here. A simple demo. And use it, and this is the tool spec for what an agent should look like. And I'm happy to share the code with you after this, right? And these are the rules that it follows. Same thing, right? One line is all it takes. System prompt, equal system prompt, three tools, and then same. So I'm gonna start running this now. Python3 agent.py."
  },
  {
    "startMs": 757948,
    "text": "And so I'm flying to Hawaii or whichever place, to some, uh, to Hawaii. Let's just say Hawaii. Help me plan my itinerary. Okay. So this is all I'm telling it. I'm not even telling it, \"Hey, go make your own agent,\" or, \"Go create your own tool.\" This is all I'm telling it. This is how your customers would chat with it, right? They just tell them what their problem is, and they expect you to figure it out, right? So"
  },
  {
    "startMs": 787908,
    "text": "this agent is gonna be like, \"Oh, great. Um, here I'm going to be printing out... I'm gonna be creating these into three focused sub-agents, the flight agent, the activities agent, the itinerary agent,\" and it's calling the editor tool three times, one for each of these. So I see that it's already created the activities. Yeah, it's creating... It's pretty fast. It's creating the activities agent. It's created, like, a flight agent that's doing something. It's created an itinerary agent. The w- let me call out the one thing this"
  },
  {
    "startMs": 817728,
    "text": "can't currently do right now is access real-time information because I haven't given it a tool that has access to real-world API, right? So assuming you add that on, you can ask it, \"What's the weather like?\" And it'll be like, \"You know what? Let me write a tool that can always grab the latest weather in whichever location and recommend stuff.\" So based off of that, it created those agents, and if you look at it somewhere here, it should technically be calling those agents. There we go. See, it's calling the activities agents, and then it's"
  },
  {
    "startMs": 847568,
    "text": "saying, \"These are the ma- main airports. These are the best beaches. These are what it is, and this is what you have to do.\" And so how amazing is, is it that you can now have your agent... So y- now your focus is not just building a good agentic system that can get the job done. You would also maybe want to start thinking about healing, writing self-healing code, about creating an agent that can sort of go over itself, look at what bugs are there, and fix itself. Had this been a longer session,"
  },
  {
    "startMs": 877648,
    "text": "I usually do longer sessions, I usually ask the audience to ask it to do crazy stuff, and I try breaking it, and what happens is this actually ends up breaking. You would see a bunch of errors coming up, and this thing is just talking, chatting away. So I need to probably set the max token somewhere here. But, um, and so it actually ends up erroring and breaking, but it r- recognizes that it's erroring, and it says, \"Oh, man, I'm erroring. Let me fix myself.\" And it would go and fix the same, uh, fix this exact same, uh, tool or agent that it's"
  },
  {
    "startMs": 907688,
    "text": "got here. So now if I'm like, \"I don't want Hawaii. Why do you make it for Hawaii? Do it for something else,\" it's gonna be like, \"Sure, let me do it. Let me update the agent.\" So it's super, super powerful, but then again, we have to keep in mind that this is just autonomously doing things by itself. With great power also comes great responsibility, even greater responsibility. So what do we need to do with it, right? We need, A, evals. What are some inbuilt evals that Strands Agents has? We w- we have totally eight different evals. The"
  },
  {
    "startMs": 937448,
    "text": "first one is at an overall session level. We want to figure out if I told it, \"Hey, book my flight tickets,\" is it actually booking? Did it achieve the end goal? That is part one of it, right? End goal achievement. Second thing we wanna look at it is at a trace level. Um, was it actually helpful? If I say, \"What is my balance?\" It then says, \"My balance is 500 bucks.\" Is that the expected type of answer? Part one. Part two, did it make up the answer? Is that the actual answer that you're supposed to get? You need to be able to evaluate that. But it doesn't"
  },
  {
    "startMs": 967248,
    "text": "just end there. What about tool access, right? What about did it use the right tool to get to that answer, or did it use a wrong tool? And within that specific tool, did it use the right parameter? Is the account ID actually 123, or is it supposed to be... Is it messing up? We want insight into what is going on so that we can trust it and reliably give it access. Again, not just, it doesn't just end there. We also want to understand inter-agent dependency. When we're building"
  },
  {
    "startMs": 996768,
    "text": "multi-agentic systems, we wanna look at the f- overall outcome and the overall response, if it's the way you wanted it to be. You want to make sure that it's calling the different tools and the different sub-agents in the right sequence, and you also want to take a deeper dive into what the messages, the inter-agent communication looks like and if that's up to the mark. All of this together gives us the full end-to-end agent conversation within our session. This gives us the insight. Again,"
  },
  {
    "startMs": 1026708,
    "text": "this also isn't good enough, right? We want to make sure it doesn't cause undue damage. If this meta-tooling or this meta-agent can spin off tools and agents, it can also modify and delete. Do I want it to delete my data? Do I want it to delete stuff that I have put all of my effort into building? No. So what do I do? I have to have guardrails in place. Four different types of guardrails. The first one is your environment. We need to make sure that we're sandboxing the environment. And when I say"
  },
  {
    "startMs": 1056588,
    "text": "sandboxing the environment, it's not your typical sandbox where your agent is in one container, and you're protecting it from the rest of the world. We want the environment in which this code is executing to be sandboxed. And Strands recently launched a feature about, I think, a few weeks ago where we can sandbox the, uh, code execution environment, and that is what guarantees that it doesn't touch the rest of your code execution environments, and"
  },
  {
    "startMs": 1086568,
    "text": "it doesn't mess up everything else, and it doesn't write into wrong places and delete from the wrong places, right? Next, we have to constrain the tools. We have to constrain permissions. We have to constrain the gu- who's got access and who can ask it questions and what types of questions we need to ask, and observability. All of your evals, your OTEL, your telemetry, all of that data needs to be there in order to be able to say that, \"Hey,\" reliably and say, \"Hey, I think I can go"
  },
  {
    "startMs": 1116608,
    "text": "ahead and build-\"An agentic system that can think for itself, that it can do more than what it's just been set out to do because it can fix things when things are broken on the fly, on the run, and it can solve more capabilities than it has been initially taught to. This is the starting of self-improving, uh, agents and the self-evolving agents. At some point, I'm convinced they will take over the world,"
  },
  {
    "startMs": 1146556,
    "text": "and I'm, I'm going to be at risk, but until then, I think this is incredible. And if anything, if I want to leave you with anything, I would want you to-- I would want to leave you with a quick idea of where Strands is, where Strands started with, and where we are right now. We started with building their own tools. We, we moved to getting them to update-- uh, to create agents by themselves. Now it's at a point where they can update their own source code. Fun fact, we created Strands agents three years ago"
  },
  {
    "startMs": 1176436,
    "text": "internally. It was really this internal thing before agents was even a thing, and it was so powerful that we said, \"You know what? Let's just open source it and give it back to the community.\" And we wrote the Python version of Strands, and the Python version of Strands wrote by itself the TypeScript version of Strands. So it did update its own source code. It's pretty powerful. I'm pretty psyched. And if, if-- this is my call to action. If, uh, this sounds interesting to you, reach out to me,"
  },
  {
    "startMs": 1206336,
    "text": "scan these, and we can have a conversation later. I'm happy to share my s- uh, slide deck and my code with you, um, and we can chat offline. Um, thank you very much. This is my LinkedIn. Uh, we have thirty seconds to go, I think."
  }
]
