Harness Engineering: Building the Production Cage for Powerful Domain Agents — Mike Chambers, AWS
AAI Engineer
컴퓨터/소프트웨어AI/미래기술
스크립트
00:00:00Hello, everybody. Hello, AI engineers. Are we all having a good time still?
00:00:20Woo! I'm having a good time. I mean, look at me. I'm up here. I'm loving this. So yeah,
00:00:27thanks so much for joining me. I want to come and talk to you all about harness engineering and all
00:00:31that kind of stuff. Let me tell you who I am in case you've not met me before. My name is Mike
00:00:37Chambers, and I'm a senior AI specialist developer advocate, and I work at Amazon at AWS. A little bit
00:00:47about, like, how I managed to get to stand here, which is a very exciting time for me. So quite a
00:00:55while ago, in terms of generative AI anyway, back in 2023, I had the amazing, awesome privilege to
00:01:03work with Antia, my colleague at the time, and now she works for Amazon AGI. You've probably seen her
00:01:08on this stage before. And the amazing Dr. Andrew Ng on a course about generative AI with LLMs. Sort of,
00:01:17can I say that we're approaching half a million enrollments with that? It looks like that's the
00:01:21case. And on a three-week course, that's pretty cool. If you can't tell, in that image, I'm playing
00:01:26Transformers with Andrew. That seemed like a really funny thing to do at the time. In 2025, I created an
00:01:32MCP Lambda handler that's downloaded still to this day at about 35,000 times a month to help people in
00:01:38some of the simplest ways of getting serverless MCP serving happening. And I'm going to talk about other
00:01:44things in relation to that at this time. So we've moved on from that. And in 2026, AWS is actually
00:01:51one of the founding members of the Agentic AI Foundation, part of the Linux Foundation. I'm doing
00:01:57a little bit of work behind the scenes on that. Hope to do a lot more of that as well. So a little bit
00:02:01about me. So as I've been preparing for this -- oh, and by the way, I did reread the abstract for this
00:02:09session and realized I said I'd be doing some live coding. And so I will. So all combined,
00:02:16fingers crossed, please, that all works for us. But as I've been sort of traveling around a little
00:02:21bit as I do, and I was at the AI Engineers Summit conference in Melbourne and took a lot of it in,
00:02:29and also from the beginning of this week as well, I just wanted to summarize some of the things that
00:02:35I'm seeing and I'm thinking and I really want to get across and what really matters to me. And that's
00:02:40this. There are two different types of agents. And so we talk about agents all the time, but I see
00:02:47two distinct types of agents. And as I say this, it's going to become really obvious. But they're the
00:02:53agents that we use. And so, you know, this is Claude Code and Cursor and Kero and all of those types of
00:02:59things. And also things that don't just generate code, things that we use for productivity and the
00:03:04like as well. And so those agents we use in a certain type of way. There's the agents that we use.
00:03:10And then on the other side of it, we've got the agents that we build. And that's actually more to
00:03:15do with me. And actually, it's more to do with this presentation as well. It's agents that we build and
00:03:20how we think about agents that we build. And so I do really think that these two things are quite
00:03:27separate. And they chain together as well. I might build an agent that you use. And this still holds
00:03:32true. So token maxing, all that kind of stuff, go for it if that's what you want to do with an agent
00:03:37that you use. But with an agent that you build, think about it carefully. Make sure that you're putting
00:03:42it together in a way that's going to work for the audience who's going to use that.
00:03:46So I promised that we're talking about harnesses and harness engineering. So let's define harness.
00:03:51I'm sure I'm not the only person to have put something like this up. I don't usually do this
00:03:55kind of thing and apologize if it makes your skin crawl. This is a dictionary definition of harness.
00:04:01A harness is a set of straps and fastenings used to control an animal. But if we took animal out of
00:04:06here and put model in there, then actually, it's pretty right, right, that that's kind of what a harness is.
00:04:12Other people have done a much better job than just the basic dictionary definition of what a harness is.
00:04:17So Langchain has got an article out. You've probably seen stuff like that. Martin Fowler.com,
00:04:22although Martin didn't write it. It was Brigitte who wrote this. Harness engineering for coding agents,
00:04:28agents that we use, right? So there are other ways of looking at harnesses. What about Amazon then?
00:04:33How do we see harnesses? Well, no, okay, this is the wrong kind of harness, sorry. We do have strong
00:04:40opinions on harnesses. I'm going to show you all of that. But we sell all kinds of things.
00:04:44So in a nutshell, and if you read those articles, and if you've had the conversations around here at
00:04:51this event, of course, a harness. If you take an agent, remove the model part from it and everything
00:04:57that you have left, that's the harness. Okay. So let's think about that in context of an agent that we use.
00:05:05And so it's pretty, I think, fairly straightforward. I have this coding assistant. It's probably on my
00:05:11machine. It has access to my files. And I create a harness, or the place I work at has created a
00:05:17harness for me, which contains how it's going to use memory, the skills that I want it to use, tools and
00:05:24MCP servers to allow it to be able to go and connect to documentation servers and the like. And well set
00:05:31up engineering teams have got their standards that they've had. They've had coding standards for decades,
00:05:37but now they have basically harness standards, the things that they want to deploy to everybody's
00:05:42coding assistants. So in a nutshell, that's what it is. I'm not going to talk too much more about that.
00:05:48But I do want to share one QR code with you. And I'll try and give you a little bit of warning before
00:05:52I bring QR codes out. This is the agent toolkit for AWS. This is available on GitHub. Of course,
00:05:58it's free. You can install it. And it helps you if this is what you're doing and you're deploying code.
00:06:04If you're deploying on AWS, or you're thinking about deploying on AWS, or maybe you will one day,
00:06:10grab this toolkit, enable your agent to help you in the right direction. It's instructions for how to
00:06:16install it on pretty much everything. And the reason why I get passionate about this is because
00:06:21I don't want to see any more slop ops. So we always used to push back against click ops in, you know,
00:06:28in the professional cloud development space. Clicking around on the console is great for being able to
00:06:32figure out what's going on, but it's not how you deploy things into production. We can ask an agent
00:06:38what's going on. But we don't want to ask the agent to spin up an S3 bucket, get me an EC2 instance,
00:06:44whatever it might be. We want the agent to build up our infrastructure as code, which is going to go
00:06:50and do that, so that we still own our deployments in the cloud. So no more slop ops.
00:06:56Okay, so that's the agent that we use. Now let's go and talk about the agent that we're going to build.
00:07:00I'm going to get into the code as quickly as I can, and we'll do as much as we have time for.
00:07:06So how do we think about a harness in relation to the agent that we're building?
00:07:10Exactly the same. To a point, yes. We still want to have how are we going to manage the memory,
00:07:16how are we going to manage the skills. And tools in MCP, by the way, that belies a lot of stuff,
00:07:21right? Because you can pretty much extend an agent to do almost anything you want with a whole bunch
00:07:25of different types of tools, which could be via MCP. But with an agent that I am building, I need to
00:07:33think about a lot more than just that, especially if, like at Amazon and like a cloud scale, I'm deploying
00:07:41my agent out to the masses. So how do I actually manage the loop? How do I manage scaling payments,
00:07:49memory, identity skills, runtime, context management, the rest of it? And I have left it to the last thing,
00:07:54but it should be the first thing that I say, observability and evaluations. Super, super important.
00:08:00How do we actually deal with this? Do I write all of this code down into one container and just deploy
00:08:06it and scale that? Not really if I want to be scaling to thousands of users. I need to think about each
00:08:11individual of these components and how I'm going to scale them out individually. And that, to me,
00:08:17is harness engineering. This is the serious side of stuff. This is the big stuff that we want to get
00:08:22harnesses working at real scale. Okay. Let's see if this works. I can feel your combined goodwill being
00:08:30sent my way that we're going to try and make some code work. So I'm here in Cairo. This is my IDE of
00:08:35choice here. And I've got a few different samples that we're just going to race through, watching that clock
00:08:40countdown fast. So just make sure that we're all on the same page here, and hopefully you can all see
00:08:47this. Of the code which I'm about to show you, by the way, one piece of code, not this one, has been
00:08:53generated by Cairo. Everything else is either a tool or this one. I actually wrote it myself. I didn't use
00:09:00an agent for this. I know. I deserve a round of applause, but it's okay. So this is a strands agent. So I've
00:09:09just taken the strands agents SDK. And hopefully this kind of thing is kind of familiar. I brought in an agent. I brought in the tool
00:09:16decorator. And I'm creating myself an agent. The tool definition is down here. And so I just pass in my system prompt.
00:09:23Things are pretty simple at this stage. And I've passed in a couple of tools. Calculator is something that's a library I can install.
00:09:30And get time is the one that we always use, because I don't tend to use agents to book flights. Certainly not ones like this.
00:09:37And so I can say something simple here, like, what is the time? I'm not going to run this, because you know the
00:09:41time. But you can see generally how this works. Is this a harness? Sort of. There's not an awful lot to it,
00:09:48right? We've got the tools in there. Our loop is being managed for us by the framework. This is pretty cool,
00:09:53so that's good. But obviously, if I was to run this, this is running on my laptop. It's not running at any
00:09:59particular scale. And we're missing some of the attributes that I want from the agents that I'm
00:10:04going to deploy. Let me move on to my next agent quickly. So this is also a strands agent. But this
00:10:10one, I actually asked Kiro to write it for me for this session, because I wanted to include some more
00:10:16stuff. And so inside of this agent, the one main thing that I want to point out is that I have included
00:10:23a session manager. So my session manager is helping me to maintain session state between invocations.
00:10:30So this is a sort of memory. It's a kind of medium-term, short-term memory kind of thing. It's not proper
00:10:36long-term memory, but it is there. And actually, it does store long-term memories in files which are
00:10:42down the side here that it's included for us. So if I just scroll down here, you can see,
00:10:48yeah, here's the agent definition itself. And we've got a bit more of a system prompt, because Kiro
00:10:53couldn't help itself. And we've got some tools here defined, including a remember tool that the agent
00:10:59can decide to use to remember stuff about me. And then I've got my session manager down there. And
00:11:05that session manager is going to rehydrate the conversation history when I come back to chat to
00:11:10it the next time. And maybe the next time is now. So let's see if we can get this working. Now, again,
00:11:16this is running on my local machine. And this is a demo here. So let's just type in hello, because I'm
00:11:22scared of typing too much and spelling it wrong. And it says, yeah, keep testing me, bring it on.
00:11:27Excellent. Who will win the World Cup? So obviously, I need to know this. And what does it say? Yeah,
00:11:40so while you could just say Australia, it knows I want Australia to win. It's where I'm currently
00:11:44living. I'm Australia. So obviously, Australia is going to win the World Cup. But why has it got that?
00:11:51It's because of previous conversations that we've had. And obviously, it's being honest
00:11:56that it has no clue. Because that's coming from the large language model, of course. So, okay,
00:12:01looks at a couple of different agents there, blasted through this. This is running on my machine. So
00:12:07this isn't really getting me to cloud scale, of course. And I'm picking up and I'm including various
00:12:13pieces in this, like memory. So let's go next. How do we get to the point where I can deploy something
00:12:19like this, if not this actual agent, out at cloud scale and take things like memory and deploy that
00:12:26separately so it can scale separately. Taking our loop out so it can scale separately. And we can then
00:12:33bolt in all kinds of other things as well. So in order to do that, I'm going to use something called
00:12:38Agent Core. And so we have Bedrock Agent Core. It's part of the stack that we have at AWS. And that's how
00:12:44I'm doing this and how I'm deploying. So I've done that already. But I want to show you how to start out
00:12:50with that and how we do this. So if I go to here, yeah, I'm ready to go. So I have a command line
00:12:58tool on my machine, the Agent Core command line. And so there's a QR code at the end, as you might
00:13:03imagine, so you can get hold of this. But I can use this to help me deploy my agent. Now this steps me
00:13:10through like many of these types of tools do. And it sort of steps me through what do you want to do.
00:13:15So this is my woohoo agent. And it's going to ask me a bunch of stuff. And I wanted to show you
00:13:20some of this as we step through. Now, strangely, I'm not going to select harness. And we'll come back to
00:13:25why I'm not selecting harness in a second. But I'm saying I wanted to deploy an agent. And what's going
00:13:30to happen here is this command line tool is actually going to step me through and actually write an
00:13:35entire agent. It's basically a hello world agent that I can then go and customize myself. And so using
00:13:42this command line is an easy way to get started with Agent Core. So I'm going to keep the default name.
00:13:47In fact, I'm probably going to keep all the defaults here just so we can see what's
00:13:50the option. Of course, I can bring code if I want. But I'm going to ask it to create some code for me.
00:13:55So it says, well, what do you want? Python or TypeScript. And back in the day,
00:14:00I used to do things like activate functions and back propagation in the machine learning space. So
00:14:04Python, it is for me. So I will choose that. And there's some deployment options. There's also this.
00:14:11I just want to point this out. Like, how can we actually go and connect into our agent? So our agent
00:14:15that's running at scale in the cloud, HTTP is probably the obvious one. But we might want to have it being
00:14:20served behind MCP. We might want to use awesome little things like AGUI so we can make nice interactive
00:14:28chat agents. But I'm going to say HTTP. We can use any framework we want. I happen to use strands
00:14:35agents SDK. But anything. You could write your own framework if you want to or your own base code.
00:14:42Any model is supported by this as well. So we don't just have to use the Amazon models. And we don't
00:14:47have to use the ones from Amazon Bedrock. But we can use any model. I'm using the one here. I'm using
00:14:52Sonic 4.5 just because that's offered to me at default. And here's memory. So this is the one thing I
00:14:58wanted to show you. So I can come in here and ask for long-term and short-term memory to be deployed.
00:15:02And we'll see what this means in just a second. But it's basically going to create for us cloud
00:15:07infrastructure which is going to manage those memories for us separately from our running agent,
00:15:12running asynchronously from our agent and connected, of course. So there's obviously other kinds of
00:15:17things we can do. We can hit enter. And it will start to create the configuration of this agent on my
00:15:22machine. Now I'm going to skip over here and come back to the actual code I have because I've already
00:15:29done this, of course. And this is the agent that it would be currently deploying, something like this.
00:15:34So we've built up here. This is a little bit more complex. So this is a strands agent. You'll notice
00:15:40that it's got a few more things added in. So it's got the linkage into Amazon Bedrock agent core app.
00:15:46But pretty much apart from that, that's all you need in order to be able to scale this agent out at
00:15:52runtime and do multi-tenant isolation. So you can write an agent that works for one user and then scale
00:15:59that out without you having to write all the multi-tenanted code. It's a massive saver. And from a
00:16:05security and identity perspective, it makes it so much simpler. It's very, very useful. So if I scroll
00:16:12down through here, you can see the rest of it is looking pretty similar. We've got some test tools in
00:16:17here. We've got a connection to MCP. So we can see how that is done. And we've got the connection
00:16:24into our session manager and our memory, which is all built in here. So if I scroll down a bit more,
00:16:30we'll be able to see somewhere where we actually invoke the thing, which is there. And the system
00:16:35prompt is somewhere at the top. So we can scroll through this code. I'm going through it quickly.
00:16:40You can write your own code and do this with it as well. If I go back over to my code here for just
00:16:46one second, I'm in the folder now that has been created with that code locally. It is actually
00:16:52deployed, but let's assume it's not deployed quite yet. I can come back in and type in agent core dev.
00:16:58And what that's going to do for me, Wi-Fi permitting, is it will spin up for us a web browser. And inside
00:17:06of that web browser, we're now connected to that agent running locally. So if I was to make updates
00:17:10to that code, we would see that happen in real time here. So I can say, hello, I am doing the pres now.
00:17:20It knows that I'm coming to do a presentation. I think it does anyway. And so, yeah, you can interact
00:17:25with the agent here. You can make adjustments to the code, and you'll see it update live here. But
00:17:31you can also use this to switch over to the live deployed version. So with agent core deploy, it will use
00:17:39infrastructure as code, like I talked about before, to deploy your agent out at scale with the memory,
00:17:46with the agent, with runtime, and with many other components if you choose to do so. You can use this
00:17:51interface then to go and look at traces, look at memory stores, look at all that stuff, so you can
00:17:55debug and see what's going on. Now, when we stepped through the console a second ago, sorry, the CLI app a
00:18:04second ago. We didn't choose harness. I skipped out on that one. And I'm just going to show you that
00:18:09quickly now. So one thing we can do instead is I think we can get to the point. You've seen I've
00:18:15deployed agents. I didn't do very much. I just did a system prompt and some tools and go. And there's an
00:18:20argument to be made that essentially, if that's possible, then maybe 80% of agent use cases, 80% of
00:18:27agent development's kind of solved already. We don't need to do much more than system prompt, connect to
00:18:32some MCP tools, and we've got what we want. And if that's the case, then we have harness built into
00:18:38agent core. This is the configuration for an agent. I just have a simple JSON which is showing me which
00:18:44model do I want to use and what system prompt do I want to use. Can't get much more simpler than that
00:18:49system prompt. And then this can also be deployed with agent core deploy. So at this point, we don't
00:18:55have even any agentic code either. We can just deploy it straight out. If you want to know any more about
00:19:02any of this, then please do come and see us down on the booth or see me after this session. I'll be more
00:19:06than happy to talk to you at length about this. 18 minutes is such a short amount of time for me to be
00:19:12able to talk about almost anything. But this is essentially all of these components on here.
00:19:18There's a mapping somewhere into something that agent core has. I apologize for the colors. It seemed
00:19:23like a good idea at the time. But this is an overview of the different capabilities that are composable
00:19:30out of agent core. So you can take any of these and use any of them together or separately. If you have
00:19:38an agent that's running in production very happily at the moment, but you like the idea of having
00:19:43long-term memory managed for you serverless, then you can just take that part and integrate it. That's
00:19:49totally something you can do. Here's the QR code. Sorry, I probably should have put that there a second
00:19:52ago. I'm moving this QR code in just a moment. But Amazon Bedrock agent core is that. If you're
00:19:58interested in the strands agents, which I happen to be using for this, it's obviously it's it's free
00:20:03because it's open source and it's a model first framework for putting together agents. It's super
00:20:10fast. It's super powerful. And it's what I use all the time. Thank you so much for being with me in this
00:20:16presentation. Please feel free to connect with me on LinkedIn. I'd love to carry on the conversation with
00:20:21you. Have a fantastic rest of show and have a safe travel as you go home after the event. Thank you so much.
커뮤니티 글
아직 글이 없습니다. 이 영상에 대한 첫 번째 글을 작성해 보세요!
이 영상에 대해 글쓰기