Harness Engineering: Building the Production Cage for Powerful Domain Agents — Mike Chambers, AWS

AI Engineer · 20 min · 300 sentences · from YouTube's caption track

Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.

  1. 00:16Hello everybody.
  2. 00:17Hello AI engineers.
  3. 00:19Are we all having a good time still?
  4. 00:22I'm having a good time.
  5. 00:23I mean, look at me.
  6. 00:24I'm up here.
  7. 00:24I'm loving this.
  8. 00:26Um, so yeah, thanks so much for joining me.
  9. 00:28Um, I want to come and talk to you all about harness engineering and all that kind of stuff.
  10. 00:33Um, let me tell you who I am in case you've not met me before.
  11. 00:37Um, my name is Mike Chambers and I'm a senior AI specialist developer advocate.
  12. 00:42Um, and I work at Amazon at AWS.
  13. 00:45Um, little bit about like uh how I managed to get to stand here which is a very exciting time for me.
  14. 00:53Um so um quite a while ago in terms of generative AI anyway back in 2023 um I had the amazing awesome privilege uh to work with Antia my colleague at the time and now she works for Amazon AGI you've probably seen her on this stage before
  15. 01:10um and the amazing Dr. Andrew Ing on on a course about generative AI with LLMs um sort of can I say that we're approaching half a million enrollments with that?
  16. 01:20It looks like that's the case.
  17. 01:21And on a three-week course, that's pretty cool.
  18. 01:23If you can't tell, in that image, um, I'm playing Transformers with Android.
  19. 01:28That seemed like a really funny thing to do at the time.
  20. 01:30Um, in 2025, I created an MCP Lambda handler.
  21. 01:34It's downloaded still to this day about 35,000 times a month.
  22. 01:37Um, to help people in some of the simplest ways of getting serverless MCP serving happening.
  23. 01:43Um, I'm going to talk about other things in relation to that this time.
  24. 01:46So, we've moved on from that.
  25. 01:48Um and in 2026, so the AWS is actually one of the founding members of the Aentka Foundation, part of the Linux Foundation.
  26. 01:56Um I'm doing a little bit of work behind the scenes on that.
  27. 01:59Hope to do a lot more of that as well.
  28. 02:01So little bit about me.
  29. 02:02Um so as I've been um preparing for this, oh by the way, I did reread the abstract for this session and realized I said I'd be doing some live coding
  30. 02:14and so I will.
  31. 02:15So all combined fingers crossed please that that all works for us.
  32. 02:19Um but as I've been sort of traveling around a little bit as I do and I was at the AI engineers uh session uh summit uh uh conference in Melbourne
  33. 02:28um and took a lot of it in and also from the beginning of this week as well.
  34. 02:32I just wanted to to to summarize some of the things that I'm seeing and I'm thinking and I really want to get across and and what really matters to me
  35. 02:40and that's this.
  36. 02:41There are two different types of agents.
  37. 02:44Um, so we talk about agents all the time, but I see two distinct types of agents.
  38. 02:49And as I say this, it's going to become really obvious, but they're the agents that we use.
  39. 02:55And so, you know, this is claude code and cursor and kirao and all of those types of things.
  40. 03:00And also things that don't just generate code, things that we use for productivity and the like as well.
  41. 03:05And so those agents we use in a certain type of way.
  42. 03:08There's the agents that we use.
  43. 03:10And then on the other side of it, we've got the agents that we build.
  44. 03:14And that's actually more to do with me and and actually it's more to do with this presentation as well.
  45. 03:18It's agents that we build and how we think about agents that we build.
  46. 03:23Um and and so I do really think that these don't two things are quite separate and they chain together as well.
  47. 03:29I might build an agent that you use and this still holds true.
  48. 03:33So token maxing, all that kind of stuff, go for it if that's what you want to do with an agent that you use.
  49. 03:38But with an agent that you build, think about it carefully.
  50. 03:42Make sure that you're putting it together in a way that's going to work for the audience who's going to use that.
  51. 03:47So, I promised that we were talking about harnesses and harness engineering.
  52. 03:50So, let's define harness.
  53. 03:52I'm sure I'm not the only person to have put something like this up.
  54. 03:54I don't usually do this kind of thing and apologize if it makes your skin crawl.
  55. 03:58This is a dictionary definition of harness.
  56. 04:01A harness is a set of straps and fastenings used to control an animal.
  57. 04:05But if we took animal out of here and put model in there, then actually it's pretty right, right, that that's kind of what a harness is.
  58. 04:12Other people have done a much better job than just the basic dictionary definition of what a harness is.
  59. 04:17So Lang Chain has got a article out.
  60. 04:20You've probably seen stuff like that.
  61. 04:21Martinfowler.com although Martin didn't write it.
  62. 04:24It was Pitta wrote this.
  63. 04:25Harness engineering for coding agents.
  64. 04:28Agents that we use, right?
  65. 04:29So there are other ways of looking at harnesses.
  66. 04:32What about Amazon then?
  67. 04:33How do we see um harnesses?
  68. 04:36Well, um no, okay, this is the wrong kind of harness.
  69. 04:39Sorry, we do have strong opinions on harnesses.
  70. 04:41I'm going to show you all of that, but we sell all kinds of things.
  71. 04:44So, in a nutshell, and if you read those articles, um and if you've had the conversations around here at this event, of course, um a harness, you take an agent,
  72. 04:55remove the model part from it, and everything that you have left, that's the harness.
  73. 05:00Okay, so let's think about that in context of an agent that we use.
  74. 05:06And so it's pretty, I think, fairly straightforward.
  75. 05:09I have this coding assistant.
  76. 05:10It's probably on my machine.
  77. 05:11It has access to my files.
  78. 05:13And I create a harness or the place I work at has created a harness for me which contains um how it's going to use memory, the skills that I want it to use, tools and MCP servers to allow it to go to be able to go and connect to documentation
  79. 05:28servers and the like.
  80. 05:29and and well set up engineering teams have got their standards that they've had.
  81. 05:35They've had coding standards for decades, but now they have basically harness standards, the things that they want to deploy to everybody's coding assistance.
  82. 05:44So, in a nutshell, that's what it is.
  83. 05:46I'm not going to talk to too much more about that.
  84. 05:48Um, but I do want to share one QR code with you, and I'll try and give you a little bit of warning before I bring QR codes out.
  85. 05:53This is the agent toolkit for AWS.
  86. 05:56This is u available on GitHub.
  87. 05:58Of course, it's free.
  88. 05:59You can install it and it helps you if this is what you're doing and you're deploying code.
  89. 06:04If you're deploying on AWS or you're thinking about deploying on AWS or or maybe you will one day, grab this toolkit, enable your um uh agent to to help you in the right direction.
  90. 06:15It's instructions for how to install it on pretty much everything.
  91. 06:18And the reason why I get passionate about this is because I don't want to see any more slop ops.
  92. 06:24Um, so we always used to push back against click ops in, you know, in the professional cloud development space.
  93. 06:30Clicking around on the console is great for being able to figure out what's going on, but it's not how you deploy things into production.
  94. 06:36We can ask an agent what's going on, but we don't want to ask the agent to spin up an S3 bucket, get me an EC2 instance, whatever it might be.
  95. 06:45We want the agent to build up our infrastructure as code which is going to go and do that so that we still own our deployments in the cloud.
  96. 06:54So no more swap ops.
  97. 06:56Okay.
  98. 06:56So that's the agent that we use.
  99. 06:58Now let's go and talk about the agent that we're going to build.
  100. 07:00And I'm going to get into the code as quickly as I can and we'll do as much as it has time for.
  101. 07:06So how do we think about a harness in relation to the agent that we're building?
  102. 07:10Exactly the same to a point.
  103. 07:12Yes.
  104. 07:13We still want to have how are we going to manage the memory?
  105. 07:16How are we going to manage the skills and tools in MCP by the way that that belies a lot of stuff, right?
  106. 07:22Because you can pretty much extend an agent to do almost anything you want with a whole bunch of different types of tools which could be via MCP.
  107. 07:30But with an agent that I am building, I need to think about a lot more than just that.
  108. 07:36especially if um like at Amazon and like at cloud scale I'm deploying my agent out to the masses.
  109. 07:43So how do I actually manage the loop?
  110. 07:46How do I manage um scaling payments, memory, identity, skills, runtime, context management, the rest of it and I have left it to the last thing but it should be the first thing that I say.
  111. 07:56Observability and evaluations super super important.
  112. 08:00How do we actually deal with this?
  113. 08:02Do I write all of this code down into one container and just deploy it and scale that?
  114. 08:07Not really.
  115. 08:08If I want to be scaling to thousands of users, I need to think about each individual of these components and how I'm going to scale them out individually.
  116. 08:15And that to me is harness engineering.
  117. 08:19This is the serious side of stuff.
  118. 08:21This is the big stuff that we want to get harnesses working at real scale.
  119. 08:25Okay, let's see if this works.
  120. 08:27I can feel your combined goodwill being sent my way that we're going to try and make some code work.
  121. 08:33So, I'm here in Kira.
  122. 08:34This is my IDE of choice here.
  123. 08:36And I've got a few different samples that we're just going to race through watching that clock countdown fast.
  124. 08:42So, um just just make sure that we're all on the same page here and hopefully you can all see this.
  125. 08:48Um of the code which I'm about to show you, by the way, one piece of code, not this one, has been generated by Curo.
  126. 08:55Everything else is either a tool or this one I actually wrote it myself.
  127. 09:00I didn't use an agent for this.
  128. 09:01I know I deserve a round of applause, but it's okay.
  129. 09:04[laughter]
  130. 09:05So, this is uh this is a Strand agent.
  131. 09:09So, I've just taken the Strands agents SDK.
  132. 09:11Um, and hopefully this kind of thing is kind of familiar.
  133. 09:14I've brought in an agent.
  134. 09:15I brought in the tool decorator and I'm creating myself an agent.
  135. 09:18The tool definition is down here.
  136. 09:20Um, and so I just pass in my system prompt.
  137. 09:23Things are pretty simple at this stage and I've passed in a couple of tools.
  138. 09:27Calculator is something that's a library I can install and 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.
  139. 09:37Um and so I can say something simple here like what is the time?
  140. 09:40I'm not going to run this because you know the time but you can see generally how this works.
  141. 09:44Is this a harness?
  142. 09:46Sort of.
  143. 09:47There's not an awful lot to it, right?
  144. 09:49We've got the tools in there.
  145. 09:50Our loop is being managed for us by the framework.
  146. 09:53This is pretty cool.
  147. 09:54So that's good.
  148. 09:55But obviously if I was to run this, this is running on my laptop.
  149. 09:58It's not running at any particular scale.
  150. 10:00And we're missing some of the attributes that I want from the agents that I'm going to deploy.
  151. 10:05Let me move on to my next agent quickly.
  152. 10:08So this is also a strand agent, but this one I actually asked Kira to write it for me for this session um because I wanted to include some more stuff.
  153. 10:17And so inside of this agent, the one main thing that I want to point out is that I am uh included a session manager.
  154. 10:25So my session manager is helping me to maintain session state between invocations.
  155. 10:30So this is a sort of memory.
  156. 10:32It's a kind of medium-term short-term memory kind of thing.
  157. 10:35It's not proper long-term memory, but it is there.
  158. 10:38And actually, it does store long-term memories in files which are down the side here that it's uh included for us.
  159. 10:45So, if I just scroll down here, you can see uh yeah, here's the agent definition itself.
  160. 10:50Um, and we've got a bit more of a system prompt because Kira couldn't help itself.
  161. 10:54Um, and we've got some tools here defined.
  162. 10:57Um, including a remember tool that the agent can decide to use to remember stuff about me.
  163. 11:02Um, and then I've got my uh session manager down there.
  164. 11:05And that session manager is going to rehydrate the conversation history when I come back to chat to it the next time.
  165. 11:12and maybe the next time is now.
  166. 11:15So, let's see if we can get this working.
  167. 11:16Now, again, this is running on my local machine.
  168. 11:18Um, and this is a demo here.
  169. 11:20So, let's just type in hello because I'm scared of typing too much and spelling it wrong.
  170. 11:25Um, and it says, uh, yeah, keep testing me.
  171. 11:27Bring it on.
  172. 11:28Excellent.
  173. 11:28Um, um, who will win the World Cup?
  174. 11:35So, obviously I need to know this.
  175. 11:37And, um, what does it say?
  176. 11:40Yeah.
  177. 11:40So, while you could just say Australia, it knows I want Australia to win.
  178. 11:44It's where I'm currently living.
  179. 11:45I'm Australia.
  180. 11:46So, obviously Australia is going to win the World Cup, but why has it got that?
  181. 11:51It's because of previous conversations that we've had.
  182. 11:53And obviously, it's being honest that it has no clue because that's coming from the large language model, of course.
  183. 12:00So, okay, looks at a couple of different agents there, blasted through this.
  184. 12:04This is um running on my machine.
  185. 12:07So this isn't really getting me to clouds scale of course and I'm I'm picking up and I'm including various pieces in this like memory.
  186. 12:15So let's go next.
  187. 12:16How do we get to the point where I can deploy something like this if not this actual agent out at cloudscale and take things like memory and deploy that separately so it can scale separately.
  188. 12:29taking our loop out so it can scale separately and we can then bolt in all kinds of other things as well.
  189. 12:35So in order to do that I'm going to use something called um agent core um and so we have bedrock agent core.
  190. 12:42It's part of the stack that we have at AWS and that's how I'm doing this and how I'm deploying.
  191. 12:47So I've done that already but I want to show you how to start out with that and how we do this.
  192. 12:52So if I go to here uh yeah I'm ready to go.
  193. 12:56So, I have a command line tool on my machine, the agent core command line.
  194. 13:01Um, and so there's a QR code at the end, as you might imagine, so that you can get hold of this.
  195. 13:05Um, but I can use this to help me deploy my agent.
  196. 13:09Now, this steps me through like many of these types of tools do.
  197. 13:12Um, and it sort of steps me through what do you want to do?
  198. 13:15So, this is my woohoo agent.
  199. 13:17Um, and it's going to ask me a bunch of stuff.
  200. 13:19And I wanted to show you some of this as we step through.
  201. 13:22Now, strangely, I'm not going to select harness.
  202. 13:25And we'll come back to why I'm not selecting harness in a second, but I'm saying I wanted to deploy an agent.
  203. 13:29And what's going to happen here is this command line tool is actually going to step me through and actually write an entire agent.
  204. 13:36It's basically a hello world agent that I can then go and customize myself.
  205. 13:41Um, and so using this command line is an easy way to get started with agent core.
  206. 13:45So I'm going to keep the default name.
  207. 13:47In fact, I'm probably going to keep all the defaults here just so we can see what's the option.
  208. 13:51Of course, I can bring code if I want, but I'm going to ask it to create some code for me.
  209. 13:55So, it says, well, what do you want?
  210. 13:57Python or TypeScript?
  211. 13:58And back in the day, I used to do things like activate functions and back propagation in the machine learning space.
  212. 14:04So, Python it is for me.
  213. 14:06So, I will choose that.
  214. 14:08Um, and there's some deployment options.
  215. 14:10There's also this I just want to point this out like how can we actually go and connect into our agent.
  216. 14:15So, our agent that's running at scale in the cloud, HTTP is probably the obvious one, but we might want to have it being served behind MCP.
  217. 14:22We might want to use awesome little things like AGUI so we can make nice interactive chat agents, but I'm going to say HTTP.
  218. 14:30We can use any um framework we want.
  219. 14:34I happen to use Strand's agents SDK, but anything you could write your own framework if you want to um or your own own base code.
  220. 14:42Any model is supported by this as well.
  221. 14:44So, we don't just have to use the Amazon models.
  222. 14:47Um, and we don't have to use the ones from Amazon Bedrock, but we can use any model.
  223. 14:51I'm using the one here.
  224. 14:52I'm using Sonic 4.5 just because that's offered to me at default.
  225. 14:56And here's memory.
  226. 14:57So, this is the one thing I wanted to show you.
  227. 14:58So, I can come in here and ask for long-term and short-term memory to be deployed.
  228. 15:02And we'll see what this means in just a second, but it's basically going to create for us cloud infrastructure which is going to manage those memories for us separately
  229. 15:11from our running agent running asynchronously from our agent and connected of course.
  230. 15:16So there's obviously other kinds of things we can do.
  231. 15:18We can hit enter and it will start to create the configuration of this agent on my machine.
  232. 15:23Now I'm going to skip over here and come back to the actual code I have because I've already done this of course.
  233. 15:30Um, and this is the agent that it would be currently deploying.
  234. 15:33Something like this.
  235. 15:34So, we've built up here.
  236. 15:36This is a little bit more complex.
  237. 15:37So, this is a strands agent.
  238. 15:39You'll notice that it's got a few more things added in.
  239. 15:42So, it's got the linkage into Amazon Bedrock agent core app, but pretty much apart from that, that's all you need in order to be able to scale this agent out at runtime
  240. 15:52and do multi-tenant isolation.
  241. 15:55So you can write an agent that works for one user and then scale that out without you having to write all the multi-tenented code.
  242. 16:03It's a massive saver and from a security and identity perspective, it's makes it so much simpler.
  243. 16:09It's um it's very very useful.
  244. 16:12So if I scroll down through here, you can see the rest of it is looking pretty similar.
  245. 16:15We've got some test tools in here.
  246. 16:17We've got a connection to MCP, so we can see how that is done.
  247. 16:21Um, and we've got the uh connection into our session manager and our memory which is all built in here.
  248. 16:28So, if I scroll down a bit more, we'll be able to see somewhere where we actually invoke the thing um which is there.
  249. 16:34Um, and the system prompt is is somewhere at the top.
  250. 16:37So, we can we can scroll through this code.
  251. 16:39I'm going through it quickly.
  252. 16:40You can write your own code and do this with it as well.
  253. 16:43If I go back over to my um uh code here for just one second.
  254. 16:47I'm in the folder now that has been created with that code locally, it is actually deployed, but let's assume it's not deployed quite yet.
  255. 16:55I can come back in and type in agentcore dev.
  256. 16:58And what that's going to do for me um Wi-Fi permitting is it will spin up for us a web uh browser.
  257. 17:05And inside of that web browser, we're now connected to that agent running locally.
  258. 17:09So if I make updates to that code, we would see that happen in real time here.
  259. 17:14So I can say hello, I am doing the press now.
  260. 17:20Um it knows that I'm coming to do a presentation, but I think it does anyway.
  261. 17:23Um and so yeah, you can interact with the agent here.
  262. 17:26You can make adjustments to the um to the code and you'll see it update live here.
  263. 17:31Um but you can also use this to switch over to the live um deployed version.
  264. 17:36So with agent core deploy it will use infrastructure as co code like I talked about before to deploy your agent out at scale with the memory with the agent with runtime and with many other components if you choose to do so you can use this interface then to go and look at traces look at memory stored look
  265. 17:54at all that stuff so that you can debug and see what's going on.
  266. 17:58Now, when we stepped through the um the the the console just a second ago through the the CLI app a second ago, we didn't choose harness.
  267. 18:06I skipped out on that one and I'm just going to show you that quickly now.
  268. 18:10So, one thing we can do instead is I think we can get to the point you've seen I've deployed agents.
  269. 18:16I didn't do very much.
  270. 18:17I just did a system prompt and some tools and go.
  271. 18:20And there's an argument to be made that essentially if that's possible then maybe 80% of um agentic use cases 80% of agent development is kind of solved already.
  272. 18:29We don't need to do much more than system prompt connect to some MCP tools and we've got what we want.
  273. 18:34And if that's the case then we have harness built into agent core.
  274. 18:39This is the configuration for an agent.
  275. 18:41I just have a simple JSON which is showing me which model do I want to use and what system prompt do I want to use.
  276. 18:48Can't get much more simpler than that system prompt.
  277. 18:51Um, and then this can also be deployed with agent core deploy.
  278. 18:54So at this point we don't have even any agentic code either.
  279. 18:58We can just deploy it straight out.
  280. 19:00If you want to know any more about any of this then please do come and see us down on the booth or see me after this session.
  281. 19:06I'll be more than happy to talk to you at length about this.
  282. 19:0918 minutes is such a short amount of time for me to be able to talk about almost anything.
  283. 19:14But this is essentially all of these components on here.
  284. 19:18There's a mapping somewhere into something that Agent Core has.
  285. 19:22I apologize for the colors.
  286. 19:23It seemed like a good idea at the time.
  287. 19:24Um, but this is an overview of the different capabilities that are composable out of agent core.
  288. 19:32So, you can take any of these and use any of them together or separately.
  289. 19:38If you have an agent that's running in production very happily at the moment, but you like the idea of having long-term memory managed for you serverless, then you can just take that part and integrate it.
  290. 19:49That's totally something you can do.
  291. 19:50Here's a QR code.
  292. 19:51Sorry, probably should have put that there a second ago.
  293. 19:53I'm moving this QR code in just a moment, but Amazon Bedrock agent core is that if you're interested in the Strands agents, which I happen to be using for this, it's obviously it's it's free because it's open source.
  294. 20:05Um, and it's a um a model first framework for putting together agents.
  295. 20:10It's super fast, it's super powerful, and it's what I use all the time.
  296. 20:15Thank you so much for being with me in this presentation.
  297. 20:17Please feel free to connect with me on LinkedIn.
  298. 20:20I'd love to carry on the conversation with you.
  299. 20:22have a fantastic rest of show and have a safe travel as you go home after the event.
  300. 20:28Thank you so much.