YouTube2Text

Tất cả những gì bạn cần biết về Harness Engineering — Transcript

by Việt Nguyễn AI · 7,395 words · 1,141 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Hello everyone. Recently, if you have
  2. 0:03been following AI news, you must have
  3. 0:05heard phrases like Agent Harnesses or
  4. 0:07Harness Engineering quite a lot. OpenAI
  5. 0:10talks about it, Anthropic talks about
  6. 0:12it, Google talks about it, and all the
  7. 0:14big players are talking about it.
  8. 0:16However, this is also one of the most
  9. 0:18confusing terms today. Even among those
  10. 0:21directly building AI agents, not
  11. 0:23everyone can clearly and distinctly
  12. 0:25explain what Harness Engineering is.
  13. 0:28The most common explanation you will
  14. 0:30often hear is that Harness is the
  15. 0:31environment for agents. However, with
  16. 0:35this explanation, many people still
  17. 0:37don't really understand what Harness
  18. 0:39Engineering actually is and how it
  19. 0:41differs from terms like Prompt
  20. 0:43Engineering or Context Engineering. So
  21. 0:46today, in this video, I will explain it
  22. 0:48to you in a simple and
  23. 0:49easy-to-understand way so you can truly
  24. 0:51grasp what Harness Engineering is.
  25. 0:53First, you can remember a simple
  26. 0:55formula: an agent equals a model plus a
  27. 0:58harness. This means that large language
  28. 1:01models, such as versions of GPT, Gemini
  29. 1:04, Haiku, Opus, Sonnet, or Claude, are
  30. 1:07just the brain. And the harness is
  31. 1:10everything surrounding that brain to
  32. 1:12make it actually work. The content of
  33. 1:14this video includes three main parts.
  34. 1:17In the first part, I will recount the
  35. 1:19development journey of agents from
  36. 1:21Prompt Engineering to Context
  37. 1:23Engineering, and now to Harness
  38. 1:24Engineering, as well as why the AI
  39. 1:26industry has followed this path. In the
  40. 1:30second part, I will dissect each
  41. 1:32component within the harness so you can
  42. 1:34see how each one operates. In the third
  43. 1:37part, the final section, I will add
  44. 1:39some important things you need to know
  45. 1:40if you want to use AI agents or even
  46. 1:42build them effectively yourself. To
  47. 1:44make it easier to visualize, throughout
  48. 1:47this video, I will use a consistent
  49. 1:48example: opening a pho restaurant. You
  50. 1:51have just hired a very talented chef.
  51. 1:53He has read every cookbook in the world
  52. 1:55and knows how to cook almost every dish
  53. 1:56. This chef is the model, or rather
  54. 1:59large language models such as versions
  55. 2:02of GPT, Claude, Opus, Gemini, or Haiku.
  56. 2:05However, this chef has two significant
  57. 2:07weaknesses. First, he only knows how to
  58. 2:09do exactly what is written on the order
  59. 2:11slip placed in front of him. That order
  60. 2:13slip is the prompt. Second, he has no
  61. 2:16memory. He only knows what is currently
  62. 2:18sitting on his kitchen counter.
  63. 2:20Anything cleared off the table, he
  64. 2:22forgets completely. That kitchen
  65. 2:24counter is the context window of the
  66. 2:26model. The larger the table, the more
  67. 2:29you can display, but every table has
  68. 2:31its own limits. So, the question here
  69. 2:33is: how can this genius yet forgetful
  70. 2:35chef run an entire pho restaurant
  71. 2:37serving hundreds of customers daily
  72. 2:39without any mistakes? The AI industry
  73. 2:42answered this question through three
  74. 2:44stages of development, going back to
  75. 2:462022 when ChatGPT first launched. At
  76. 2:48that time, the model's context window
  77. 2:50was only around 4,000 tokens,
  78. 2:52equivalent to a few hundred words. In
  79. 2:55our example, the chef's kitchen counter
  80. 2:57at this point is tiny. It only has
  81. 2:59enough room for a few order slips and a
  82. 3:01few other small items. With such a
  83. 3:03small table, the only thing we can do
  84. 3:05is write the order slip very skillfully
  85. 3:07, which is Prompt Engineering. For
  86. 3:09example, if you just write "a bowl of
  87. 3:11pho," the chef will cook a generic bowl
  88. 3:13, which might not be what the customer
  89. 3:15wants. But if you write "beef pho,
  90. 3:17extra green onions, less noodles, clear
  91. 3:19broth, no spicy," the bowl of pho will
  92. 3:21be much closer to what is requested. In
  93. 3:24the AI world, it's the same; this is
  94. 3:26the time when people learned how to
  95. 3:28assign roles to models, provide
  96. 3:29examples, and make clear requests. The
  97. 3:32central question for users and
  98. 3:33developers in this phase was: how
  99. 3:35should I write the prompt? However,
  100. 3:37prompt engineering has a major
  101. 3:39limitation: the model only answers once
  102. 3:41and that's it. People call this "
  103. 3:43one-shot." It's just like the chef
  104. 3:45reading the slip, cooking it once,
  105. 3:47serving it, and being done. He doesn't
  106. 3:49know how to fetch more ingredients,
  107. 3:51taste the food, or make corrections.
  108. 3:53With this tiny capacity and one-off
  109. 3:55workflow, people realized that writing
  110. 3:57good prompts alone isn't enough for big
  111. 3:59, complex tasks. The question began to
  112. 4:01emerge: how can we use this tiny
  113. 4:03context window more intelligently to do
  114. 4:06more work while using less space? And
  115. 4:08so, people started shifting gradually
  116. 4:11from Prompt Engineering to Context
  117. 4:13Engineering. If Prompt Engineering asks
  118. 4:16how to write the order slip, Context
  119. 4:18Engineering asks what should be laid
  120. 4:19out on the kitchen counter. Since the
  121. 4:22counter space is limited, everything
  122. 4:24placed on it must be truly valuable. We
  123. 4:26cannot bring the entire warehouse to
  124. 4:28the table; delivering the right thing
  125. 4:30at the right time is what matters most.
  126. 4:32To achieve this, people use three main
  127. 4:34techniques. The first is Tool Calling,
  128. 4:37the second is MCP, and the third is RAG
  129. 4:40. Let's talk about Tool Calling first.
  130. 4:42Tool Calling can be roughly translated
  131. 4:44into Vietnamese as "gọi công cụ."
  132. 4:46Instead of bringing the whole pantry to
  133. 4:48the table, the chef is allowed to go
  134. 4:50into the storage, grabbing just the
  135. 4:52beef and onions needed for the dish.
  136. 4:54It's the same for AI; the model
  137. 4:56searches the project itself, reading
  138. 4:58only the files relevant to the task it
  139. 5:00is working on. Tool Calling also allows
  140. 5:02the model to perform actions rather
  141. 5:04than just reasoning or talking
  142. 5:06theoretically. The second technique is
  143. 5:08MCP, which stands for Model Context
  144. 5:10Protocol. Imagine MCP as a standard
  145. 5:13power outlet in a kitchen. Companies
  146. 5:16that make kitchen appliances, like meat
  147. 5:18grinders or slow cookers, just need to
  148. 5:20follow the plug standard to plug them
  149. 5:22in and use them immediately. MCP helps
  150. 5:25companies add features and connect
  151. 5:27their services to large language models
  152. 5:29. The third technique is RAG, which
  153. 5:31helps retrieve external documents when
  154. 5:33needed. It's like having a cookbook in
  155. 5:36a restaurant that summarizes all the
  156. 5:38recipes. When a customer orders an
  157. 5:41unfamiliar dish, the chef simply flips
  158. 5:43to the right page instead of memorizing
  159. 5:45the whole book. RAG connects the model
  160. 5:48to a private database so that data is
  161. 5:50always ready whenever needed. Thanks to
  162. 5:53these techniques, a new generation of
  163. 5:55agents has emerged, especially coding
  164. 5:57agents like Cursor, Windsurf, Roo Code,
  165. 5:59while at the same time, the models
  166. 6:01themselves are getting better. Context
  167. 6:04windows have also grown from a few
  168. 6:06thousand to hundreds of thousands, and
  169. 6:09now even millions of tokens. This means
  170. 6:11the chef's kitchen counter has now
  171. 6:13become much larger. Users are starting
  172. 6:16to assign larger tasks to agents, such
  173. 6:18as building an entire feature or fixing
  174. 6:20a series of bugs. And context
  175. 6:21engineering helps the agent load the
  176. 6:23right context and act independently,
  177. 6:25allowing it to handle increasingly
  178. 6:26complex tasks. But eventually, this
  179. 6:28progress hits a ceiling; it has its
  180. 6:30limits. Imagine you give a chef a
  181. 6:33massive order to cook for a wedding of
  182. 6:35500 guests. In the world of programming
  183. 6:38, this is like telling an agent to
  184. 6:40clone an entire website. If you only
  185. 6:42use prompt engineering, you will get a
  186. 6:44very rudimentary website because the
  187. 6:46model only provides one response. If
  188. 6:48you use context engineering, the
  189. 6:50results will be better, but still not
  190. 6:52quite right. The website will be
  191. 6:54unfinished, with broken buttons and
  192. 6:56untested features, much like a wedding
  193. 6:58banquet missing dishes or serving food
  194. 7:00that no one has tasted yet. The problem
  195. 7:02here isn't that context engineering is
  196. 7:04bad, but that the task is too large and
  197. 7:07too complex. There is a major issue
  198. 7:09here called context summarization.
  199. 7:11Suppose cooking for the wedding takes
  200. 7:1212 hours; no matter how big the kitchen
  201. 7:14counter is, it will eventually fill up.
  202. 7:16When the kitchen counter is full, the
  203. 7:18chef will have to clear the table. He
  204. 7:19will write a summary of what he has
  205. 7:21done on a small piece of paper. Then he
  206. 7:23will clear everything else away and
  207. 7:24continue working. Remember that this
  208. 7:26chef has no memory, so after clearing
  209. 7:28the table, he will only know what is
  210. 7:30written on that piece of paper. In
  211. 7:32other words, the agent is limited by
  212. 7:34its own ability to summarize its work.
  213. 7:36If the summary is wrong, the
  214. 7:38consequences can be unpredictable.
  215. 7:39Sometimes the agent finishes
  216. 7:41summarizing and thinks the job is
  217. 7:42already done. Sometimes it
  218. 7:44oversimplifies things, assuming certain
  219. 7:46features are finished and tested. When
  220. 7:48in reality, they are not. That is why
  221. 7:50when you use AI, you often find tasks
  222. 7:52left unfinished, or even completely
  223. 7:54untouched, yet the agent still claims
  224. 7:56everything is done. This way of
  225. 7:58expanding the kitchen counter makes the
  226. 8:00agent look like it can handle longer
  227. 8:02tasks, but it is actually not very
  228. 8:04efficient. This is when people started
  229. 8:05trying many ways to overcome this
  230. 8:07barrier. One way is to use sub-agents.
  231. 8:10It is like the head chef now hiring
  232. 8:12many sous-chefs. Each sous-chef has
  233. 8:14their own workstation, with context
  234. 8:16managed in a hierarchical structure.
  235. 8:18The second way is to use an entire
  236. 8:20swarm of agents. With this approach,
  237. 8:23multiple agents are used at the same
  238. 8:24time. Each agent has its own individual
  239. 8:27context window. It is similar to having
  240. 8:29multiple head chefs in the same kitchen
  241. 8:30. However, the difference between this
  242. 8:33second method and the first is that
  243. 8:34here, the roles of these chefs are
  244. 8:36equal. And these very experiments led
  245. 8:39the entire AI industry to the third
  246. 8:41stage. These are the courses that I am
  247. 8:43currently teaching. If you are
  248. 8:45interested in these courses or want
  249. 8:47more information, you can contact me
  250. 8:49via the Zalo number shown on the screen
  251. 8:51. Actually, Agent Engineering existed
  252. 8:53long before the term "Agent" was even
  253. 8:56used. When experimenting with
  254. 8:58sub-agents and swarms, people gradually
  255. 9:00realized that we need to master three
  256. 9:02things at once. First is a better
  257. 9:04coordination layer. Who does what, and
  258. 9:06in what order. It is just like in a
  259. 9:08noodle shop; it is the operational
  260. 9:10process and the kitchen manager. Second
  261. 9:12is a better working environment. It is
  262. 9:15like a kitchen that needs to be fully
  263. 9:16equipped, with tools arranged in a
  264. 9:18logical way. Third is better context
  265. 9:21management. It is similar to deciding
  266. 9:23what to set on the table and what to
  267. 9:25clear away. Combine all three of these
  268. 9:28and we have Harness. "Harness" in
  269. 9:29English originally refers to the gear
  270. 9:31put on a horse so its power can be
  271. 9:33directed to the right task. For example
  272. 9:35, the task of pulling a carriage. This
  273. 9:37term has been widely used since the
  274. 9:39beginning of 2026. Many people say it
  275. 9:41is just a buzzword. But in reality, it
  276. 9:43generalizes a huge shift that is
  277. 9:44currently taking place in the AI
  278. 9:46industry. One of the most important
  279. 9:48changes in Harness Engineering is the
  280. 9:49idea of a loop. Instead of having a
  281. 9:51chef work for 12 hours straight with an
  282. 9:53increasingly messy table, we divide the
  283. 9:55work into shifts. At the start of each
  284. 9:57shift, the kitchen counter is
  285. 9:58completely cleared. This means the
  286. 10:00agent gets a brand-new context. However
  287. 10:02, every shift must strictly follow the
  288. 10:04rules for how to start and how to
  289. 10:06finish. Specifically, the process
  290. 10:08usually looks like this. First, people
  291. 10:10write a comprehensive requirement
  292. 10:12document called a Product Requirements
  293. 10:14Document, or PRD for short. It is
  294. 10:16similar to a detailed menu for an
  295. 10:18entire wedding. From there, they break
  296. 10:20it down into a specific task list in a
  297. 10:22JSON file, like a checklist taped to
  298. 10:24the kitchen wall. Something like: dish
  299. 10:26one is banana blossom salad, dish two
  300. 10:28is boiled chicken, dish three is sticky
  301. 10:30rice. Then from here, the loop begins.
  302. 10:33Each work shift, the chef starts with a
  303. 10:35clean table. He reads the checklist,
  304. 10:38picks exactly one unmade dish, cooks it
  305. 10:40, and tastes it. It is like running a
  306. 10:42test, then logging what was done and
  307. 10:44marking that dish as complete. That is
  308. 10:46the end of a shift, and the next shift
  309. 10:48repeats the exact same process. Until
  310. 10:50every item on the checklist has been
  311. 10:52marked off. Because each shift involves
  312. 10:54only one dish and a clean table, the
  313. 10:56chef will never be overwhelmed by
  314. 10:58having too much work. And because
  315. 11:00everything is carefully recorded on the
  316. 11:02checklist and logbook, there is no risk
  317. 11:04of the agent mistakenly thinking a task
  318. 11:06is done due to faulty context
  319. 11:08summarization. The most famous example
  320. 11:10of this approach is ReAct, a technique
  321. 11:11that once caused a stir in the AI
  322. 11:13community for its high efficiency. But
  323. 11:15what is even more remarkable is that
  324. 11:16its underlying structure is extremely
  325. 11:18simple. It starts by converting to a
  326. 11:20JSON file and then iterating through
  327. 11:21each feature until completion. Its
  328. 11:23source code repository is very small.
  329. 11:25Anthropic’s Ness demo is the same—
  330. 11:27very lightweight and simple. One thing
  331. 11:30to clarify here is that Ness
  332. 11:31engineering does not kill context
  333. 11:33engineering, and certainly not prompt
  334. 11:35engineering. If you open the source
  335. 11:37code of an AI coding agent, like Client
  336. 11:39for example, you will see its system
  337. 11:41prompt is still a very elaborately
  338. 11:43written prompt. Prompt engineering is
  339. 11:45still used; it has just become a small
  340. 11:47branch within the whole system. Imagine
  341. 11:50three nested circles. The innermost
  342. 11:52circle is the prompt, reminding the
  343. 11:54agent who it is. For example, that you
  344. 11:56are the head chef of a pho restaurant.
  345. 11:58The middle circle is context; it
  346. 11:59decides what we should lay out on the
  347. 12:01kitchen table. The outermost circle is
  348. 12:04Ness; it controls the entire operation
  349. 12:06of the restaurant, guiding the chef
  350. 12:08through each step of the workflow. This
  351. 12:11means the prompt asks how to write the
  352. 12:13order ticket, context asks what to put
  353. 12:15on the table, and Ness asks how the
  354. 12:17entire restaurant should operate.
  355. 12:20Nowadays, most AI coding agents have a
  356. 12:23Ness layer integrated inside. However,
  357. 12:25each provider designs it in a different
  358. 12:27way. That is why every company is
  359. 12:29talking about Ness today. Now, we will
  360. 12:33analyze what is inside a Ness. Put
  361. 12:36simply, Ness is an architecture that
  362. 12:39helps turn a model into an agent. A
  363. 12:42model, or large language model, is
  364. 12:44essentially just a text generation
  365. 12:46machine. You ask, it answers, and then
  366. 12:48it stops. It’s like a great chef who
  367. 12:50just stands in one place and recites
  368. 12:52recipes orally. Ness is what gives him
  369. 12:54the ability to act, see the results of
  370. 12:56his work, and continue until the dish
  371. 12:58is truly finished. The clearest
  372. 13:00examples of Ness are AI programming
  373. 13:02tools, such as Claude Code, Codex,
  374. 13:05Cursor, or Windsurf. Each tool starts
  375. 13:07from the same problem. How can the
  376. 13:09model write and fix code on a real
  377. 13:11project? And interestingly, despite
  378. 13:13being made by different companies, they
  379. 13:15have gradually converged on very
  380. 13:16similar architectures. Before going
  381. 13:18into detail, we need to distinguish
  382. 13:20Harnesses from another thing that is
  383. 13:22often confused with them: frameworks.
  384. 13:23If you are interested in AI, you have
  385. 13:26surely heard at least once of names
  386. 13:28like LangChain, LangGraph, CrewAI, or
  387. 13:31AutoGen. They are all frameworks, not
  388. 13:34Harnesses. A framework is like a kit
  389. 13:37for us to assemble our own kitchen. It
  390. 13:39gives us each individual piece
  391. 13:41separately. Here is the stove, there is
  392. 13:43the fridge, and this is the recipe
  393. 13:45shelf. You, the architect, have to
  394. 13:47assemble them yourself. Frameworks are
  395. 13:50made for humans to assemble an AI agent
  396. 13:52themselves. As for Harnesses, they go
  397. 13:54in the opposite direction; there is no
  398. 13:56assembly step here at all. A Harness is
  399. 13:58essentially like a restaurant where the
  400. 14:00keys are handed over to us. Things like
  401. 14:03the stove, tools, processes, or rules
  402. 14:05are all pre-configured. Technically,
  403. 14:09it's like a loop combined with a
  404. 14:11catalog of tools and a permission layer
  405. 14:13. Everything is pre-connected. A
  406. 14:16Harness is made for the Agent itself to
  407. 14:18work. You just need to provide the goal
  408. 14:20, and the Harness will take care of the
  409. 14:21rest. In short, a framework is like you
  410. 14:23having to build your own kitchen. While
  411. 14:25a Harness is like a kitchen that has
  412. 14:27already been built. You just have to go
  413. 14:29in and operate it. So, what exactly is
  414. 14:31inside a Harness? There are nine main
  415. 14:33components that you need to know. As I
  416. 14:35mentioned in the previous part, each
  417. 14:37company or each party will have a
  418. 14:38different way of designing Harnesses.
  419. 14:40For the rest of this video, I will use
  420. 14:42the Harness from Anthropic, the company
  421. 14:44behind Claude, as an example because it
  422. 14:46is one of the best AI coding agents and
  423. 14:48their Harness is also considered one of
  424. 14:50the best in the world today. These nine
  425. 14:53main components include the main loop,
  426. 14:55context management, tools and skills,
  427. 14:58sub-agents, pre-built skills, session
  428. 15:00memory, system prompt assembly, and
  429. 15:03extension hooks. Permissions and safety
  430. 15:05. Now, let's walk through each
  431. 15:07component one by one. The first
  432. 15:09component, and the foundation for every
  433. 15:11agent, is the loop. It sounds
  434. 15:13sophisticated, but at its core, it's
  435. 15:15just a while loop in the code. Let's
  436. 15:17look at how a chef makes a bowl of pho
  437. 15:18in our restaurant. He reads the order
  438. 15:21ticket and the kitchen rules. He
  439. 15:22decides what needs to be done. For
  440. 15:24example, slicing the meat thinly. He
  441. 15:26starts slicing, then checks the result
  442. 15:28to see if the meat is thin enough. That
  443. 15:31result is placed back onto the table.
  444. 15:34Then he goes back to the first step and
  445. 15:36checks what needs to be done next. For
  446. 15:37example, blanching the rice noodles. He
  447. 15:40performs this step and then looks at
  448. 15:42the result again. Then he checks again.
  449. 15:44The next step is pouring the broth,
  450. 15:45tasting it, and checking if anything is
  451. 15:47missing. For instance, if it lacks salt
  452. 15:50, he adds more. With an AI agent, it
  453. 15:52works exactly the same way. The model
  454. 15:54reads the system prompt and decides
  455. 15:56which tool to call. It runs the tool,
  456. 15:58takes the result, feeds it back into
  457. 16:00the context, and repeats. Thus, the
  458. 16:02loop will stop in one of the following
  459. 16:04two cases. First, when the model
  460. 16:06returns a text response without calling
  461. 16:09any more tools. Meaning the chef
  462. 16:11announces that the dish is finished.
  463. 16:13Second, when it hits the loop limit,
  464. 16:15like the shop rule: if you redo it over
  465. 16:1720 times and it's still not right, stop
  466. 16:20. Report to the manager. This limit
  467. 16:22ensures that the agent will never run
  468. 16:24forever without ending. Think of this
  469. 16:26loop as the main engine that helps
  470. 16:28operate the entire restaurant. The
  471. 16:30other eight components all revolve
  472. 16:31around and serve it. That was an
  473. 16:33example with a text-based model, but
  474. 16:35for multimodal models that read text
  475. 16:37and images, the loop is exactly the
  476. 16:39same. Now, let's move on to the second
  477. 16:41component. In each loop, the kitchen
  478. 16:43table gets increasingly crowded. We add
  479. 16:46new order tickets, tool results, and
  480. 16:48notes. Sooner or later, this table will
  481. 16:51be full. Meaning it reaches the model's
  482. 16:53context limit. At this point, Hes will
  483. 16:55have to decide on three things. First,
  484. 16:57what needs to be kept as is. Second,
  485. 17:00what can be summarized, and third, what
  486. 17:02can be discarded. Let's take Claude's
  487. 17:05code as an example. In the past,
  488. 17:07Claude's kitchen table was about
  489. 17:08200,000 tokens wide, and then we got
  490. 17:11the Opus model, which increased this
  491. 17:13number to 1 million tokens. When the
  492. 17:16table reaches a certain threshold, for
  493. 17:18example 80%or 90%, Hes will trigger a
  494. 17:21step called compaction, or context
  495. 17:23compression. The most important or most
  496. 17:26recent messages will be kept as is. As
  497. 17:28for the rest, they will be compressed.
  498. 17:30In a pho restaurant, this is like
  499. 17:31cleaning the table during peak hours.
  500. 17:34The three newest order tickets are kept
  501. 17:35on the table. The 10 old completed
  502. 17:38tickets are consolidated into a note
  503. 17:40saying 10 bowls served, table five
  504. 17:42requested no onions. As for onion peels
  505. 17:44and scratch paper, we throw them
  506. 17:45straight into the trash. This step is
  507. 17:47extremely important and can cause
  508. 17:49terrible consequences if done poorly.
  509. 17:52For example, in the step where we
  510. 17:54consolidate the 10 old tickets, if we
  511. 17:56accidentally forget the note that table
  512. 17:585 requested no onions, the customer
  513. 18:00will receive a bowl full of onions.
  514. 18:02Therefore, context management must be
  515. 18:04designed very carefully. Next is the
  516. 18:06third component. This component
  517. 18:08consists of two layers: tools and
  518. 18:10skills. Tools are the most basic
  519. 18:12operations like reading a file, writing
  520. 18:15a file, running a command, or searching
  521. 18:17code; in the kitchen, these are the
  522. 18:19knife, the cutting board, and the pot.
  523. 18:22Every pho restaurant must have these
  524. 18:24tools. Rice shops or noodle shops are
  525. 18:26the same. Tools are universal in nature
  526. 18:28. Skills are a layer that sits on top
  527. 18:31of tools. This is where an
  528. 18:33organization's proprietary knowledge is
  529. 18:35packaged, usually in the form of
  530. 18:37markdown files. In a pho restaurant,
  531. 18:38skills are the drawer of heirloom
  532. 18:40recipes, how to simmer broth for 12
  533. 18:42hours, the restaurant's unique ratio of
  534. 18:44star anise and cinnamon, and the
  535. 18:45standard way to plate a bowl of pho.
  536. 18:47Using the same knife and the same pot,
  537. 18:49every shop has a different secret
  538. 18:51recipe. You can simply remember that
  539. 18:54tools are the same in every restaurant.
  540. 18:57But as for skills, every restaurant is
  541. 18:59different. And to manage everything, we
  542. 19:02need a directory called a registry.
  543. 19:06Just imagine it as a board hanging on
  544. 19:07the kitchen wall, clearly listing the
  545. 19:09tools available and the permissions
  546. 19:11required to use them. For example, this
  547. 19:14specific knife can only be used by the
  548. 19:16head chef, while other knives can be
  549. 19:18used by anyone. And if you want to use
  550. 19:20these tools, where should you get them
  551. 19:22from? Technically, each tool only needs
  552. 19:24to be described by four things: name,
  553. 19:26required permissions, processing
  554. 19:28function, and a description. A
  555. 19:31summarized list including name,
  556. 19:32permissions, and description will be
  557. 19:34sent to the model so it knows what is
  558. 19:36in the kitchen. An interesting point is
  559. 19:39that the way skills are registered is
  560. 19:41quite similar to tools. A skill is
  561. 19:44essentially just a tool that, when
  562. 19:46called, opens a file to read. It is
  563. 19:50just like a chef who only opens the
  564. 19:52recipe book when needed, rather than
  565. 19:53laying out every single recipe from the
  566. 19:55start. This way, the kitchen counter
  567. 19:58does not get excessively cluttered. The
  568. 20:01fourth component is sub-agents. At some
  569. 20:05point, when the restaurant has to
  570. 20:07prepare overly complex dishes or cook
  571. 20:09multiple dishes in parallel, one chef
  572. 20:11with one counter is not enough. That is
  573. 20:15when the agent will create sub-agents
  574. 20:17to handle separate tasks. Just like a
  575. 20:20head chef calling in extra kitchen
  576. 20:22assistants. Each assistant will have
  577. 20:23three things of their own. First is a
  578. 20:26separate work session, meaning a
  579. 20:27separate counter that is not shared
  580. 20:29with the head chef. Second is a limited
  581. 20:32set of tools; for instance, an
  582. 20:33assistant just checking inventory won't
  583. 20:36be allowed to touch the knives. Third
  584. 20:38is a focused instruction, like "you
  585. 20:40only need to do exactly this specific
  586. 20:42job." Usually, a Hayes will have three
  587. 20:45types of kitchen assistants. The first
  588. 20:47type is the exploration assistant. This
  589. 20:49assistant is responsible for checking
  590. 20:51the pantry, assessing the situation,
  591. 20:53and this assistant is only allowed to
  592. 20:55look, not to touch anything in the
  593. 20:56pantry. The second is the general
  594. 20:58assistant. This assistant will do the
  595. 21:01common tasks, and finally, there is the
  596. 21:03inspection assistant. This assistant
  597. 21:05will taste the dishes to see if they
  598. 21:07meet the requirements. Each type of
  599. 21:09assistant will have its own permissions
  600. 21:11, list of tools, and specific
  601. 21:13instructions. The process by which the
  602. 21:15main agent delegates work to sub-agents
  603. 21:17includes three main steps. First is
  604. 21:19assigning tasks, second is setting
  605. 21:21limits, and third is collecting results
  606. 21:24. The head chef assigns tasks, limits
  607. 21:26the scope of the assistant, and then
  608. 21:28only receives the final result.
  609. 21:29Assistants can make a mess on their own
  610. 21:31table as much as they want. It doesn't
  611. 21:33affect the head chef's table at all.
  612. 21:35Thanks to that, the head chef can do
  613. 21:37many tasks at once while still keeping
  614. 21:39their table tidy. When talking about
  615. 21:41the third component, we are talking
  616. 21:43about skills. And there are many skills
  617. 21:45that users will add themselves during
  618. 21:47the usage process. They usually look
  619. 21:50for skills online from reputable
  620. 21:52sources, for example, from major
  621. 21:54companies like OpenAI or Anthropic,
  622. 21:56such as front-end design, back-end
  623. 21:59design, or model building. After that,
  624. 22:02they will add these skills to the AI
  625. 22:04Coding Agent so that from now on, the
  626. 22:06AI Coding Agent can also use these
  627. 22:08skills. However, besides the skills
  628. 22:12that users add and supplement to the
  629. 22:14model, every Hayes has a set of
  630. 22:16built-in skills. Meaning, from the very
  631. 22:18beginning, it already has these skills
  632. 22:19available. Users do not need to install
  633. 22:21anything extra at all. For example,
  634. 22:23with Claude Code, it will certainly
  635. 22:25have some very basic skills. For
  636. 22:27example, such as reading files, writing
  637. 22:29files, editing files, searching,
  638. 22:31running commands on the machine, or
  639. 22:33navigating through code. For a Hayes,
  640. 22:35these skills are mandatory; you cannot
  641. 22:37function without them. Because an agent
  642. 22:40that cannot read or edit files can in
  643. 22:42no way be called a coding agent. It is
  644. 22:45just like how someone who cannot
  645. 22:46perform basic tasks like holding a
  646. 22:48knife or turning on the stove cannot be
  647. 22:50called a chef. Of course, these default
  648. 22:53skills are quite basic, and in reality,
  649. 22:55they are not much different from
  650. 22:57regular tools. Besides the basic skills
  651. 23:00, modern agents today also have a set
  652. 23:02of higher-level skills available. For
  653. 23:06example, skills for creating git
  654. 23:08commits, opening pull requests, or
  655. 23:10running tests and reading the results.
  656. 23:14These are skills similar to knowing how
  657. 23:16to plate food beautifully, how to
  658. 23:18package food for takeout, or how to
  659. 23:20hand over shifts properly. Some of
  660. 23:22these skills will vary depending on
  661. 23:24which company is building the agent.
  662. 23:26The sixth component is memory or
  663. 23:28storage for the work session. A
  664. 23:30long-running agent session always has
  665. 23:32states like what has been done, what is
  666. 23:34being done, or what is left to do. If
  667. 23:37the program crashes halfway and our
  668. 23:39agent has no mechanism to write to the
  669. 23:41disk, everything will be lost. It is
  670. 23:44like a busy restaurant suddenly losing
  671. 23:46power. The chef already has a poor
  672. 23:48memory. So after the power goes out, he
  673. 23:50will completely forget which tables
  674. 23:51have been served and which are still
  675. 23:53waiting. Modern agents today solve this
  676. 23:55very simply. Usually, they use a file
  677. 23:58that is append-only, never to be
  678. 23:59deleted or edited. Often it is a JSON
  679. 24:02file or a Markdown file. Every message,
  680. 24:04every tool usage result, and every
  681. 24:06context compression is recorded as a
  682. 24:08line in this file. In the noodle shop,
  683. 24:10that is the kitchen logbook. After
  684. 24:12finishing a task, the chef will
  685. 24:13immediately record a line. For example:
  686. 24:1510:05 AM, table 3 served two bowls of
  687. 24:18rare beef pho. The rule is to only
  688. 24:19write and never erase. Once recorded,
  689. 24:21it is immediately saved to the disk. If
  690. 24:23the power goes out right after, the
  691. 24:25line just written remains safe. Thanks
  692. 24:27to this logbook, even if an incident
  693. 24:29occurs. For example, if the head chef
  694. 24:31has a family emergency and has to go
  695. 24:33back home for a few days. During these
  696. 24:35days, someone else will step in to
  697. 24:37replace him. The new person just needs
  698. 24:39to read the logbook from start to
  699. 24:41finish—essentially a replay—to know
  700. 24:43exactly how things are progressing and
  701. 24:45what needs to be done to continue the
  702. 24:47unfinished work. And because this
  703. 24:49logbook only allows adding new entries,
  704. 24:51not deleting old ones, two shifts can
  705. 24:53write in the same book without worrying
  706. 24:55about stepping on each other's toes. In
  707. 24:57short, the program or a session might
  708. 24:59encounter glitches or incidents, but
  709. 25:01the logbook never will. The seventh
  710. 25:03component in HNES relates to how we
  711. 25:05connect and assemble system prompts
  712. 25:07together. Essentially, system prompts
  713. 25:11in today's complex AI agents aren't
  714. 25:13just a static block of text written
  715. 25:15once; they are a combination from an
  716. 25:17assembly line consisting of many
  717. 25:19components. When an AI agent starts,
  718. 25:23HNES traverses up the project's parent
  719. 25:25directories to find instruction files
  720. 25:28with specific names, such as agent.md
  721. 25:30or rules.md, and then inserts their
  722. 25:32content into the system prompt. It can
  723. 25:36also load other memory files we've
  724. 25:38saved simply by reading the directories
  725. 25:40and files on the drive. Imagine our pho
  726. 25:42restaurant has now become a chain with
  727. 25:44many branches. At the start of each
  728. 25:46shift, the chef receives an instruction
  729. 25:47sheet consisting of two parts. The
  730. 25:49first part contains the general rules
  731. 25:51for the entire chain. Use the correct
  732. 25:52broth recipe, the correct portion of
  733. 25:54meat, and ensure hygiene. Every branch
  734. 25:56must follow these. But the latter part
  735. 25:58differs because each branch operates in
  736. 26:00its own way. For example, branch A
  737. 26:02mainly serves dine-in customers. A
  738. 26:03specific note here is that every order
  739. 26:05slip must include a table number. Bowls
  740. 26:07for the same table need to be prepared
  741. 26:09so they can be served together. Once
  742. 26:10finished, place them on the service
  743. 26:11counter for staff to take to the
  744. 26:13correct table. As for branch B, it
  745. 26:14specializes in takeout. Note that each
  746. 26:16order slip must have an order ID, and
  747. 26:18noodles, broth, and herbs must be
  748. 26:20packed separately. Before delivery,
  749. 26:21verify the number of servings and
  750. 26:23attach the order ID to the bag. Now,
  751. 26:25suppose both receive a request for two
  752. 26:26beef noodle soups. But at branch A, the
  753. 26:28chef will prepare two bowls for table
  754. 26:30service. While at branch B, he will
  755. 26:32prepare two takeout sets and attach the
  756. 26:34correct order ID. The skill and general
  757. 26:36recipe remain the same, but the
  758. 26:38workflow must follow each location's
  759. 26:40guidelines. It is similar for AI agents
  760. 26:42; each project may have its own
  761. 26:44specific file.md or agent.md. Does this
  762. 26:47project specify which command to use
  763. 26:48for running tests? Does the other
  764. 26:50project specify which directory to
  765. 26:51place the source code in? Agents will
  766. 26:53follow appropriate instructions so the
  767. 26:55same model knows how to work across
  768. 26:56different projects. It is like a chef
  769. 26:58arriving at a specific branch and being
  770. 26:59given the correct instruction manual
  771. 27:01for that branch. However, there is a
  772. 27:03point here that we need to pay
  773. 27:04attention to. Most agents today use an
  774. 27:06optimization technique called prompt
  775. 27:08caching. Specifically, prefix caching.
  776. 27:11This means if the beginning of the
  777. 27:12prompt is identical to the previous
  778. 27:14time, the model won't need to reprocess
  779. 27:15that part. Therefore, the processing
  780. 27:17will be much faster and much cheaper.
  781. 27:19In the kitchen, it is like this. The
  782. 27:21general rules at the beginning are
  783. 27:23already memorized by the chef, who can
  784. 27:24just glance over them. The chef only
  785. 27:26needs to carefully read the notes at
  786. 27:28the end of the rule sheet. But if
  787. 27:31someone inserts a new line at the top
  788. 27:33of this sheet, everything behind it
  789. 27:35shifts, and the chef has to read from
  790. 27:36start to finish. Of course, this will
  791. 27:39take more time. Therefore, the order in
  792. 27:41this instruction sheet is very
  793. 27:43important. The static part should be
  794. 27:45placed first. The dynamic part should
  795. 27:47be placed later. If we reverse it, we
  796. 27:49will ruin the prefix caching. This is
  797. 27:51one of the reasons why agents can run
  798. 27:53hundreds of loops while keeping costs
  799. 27:55at an acceptable level. The eighth
  800. 27:57component is hooks. We can translate
  801. 27:58this into Vietnamese as "điểm móc."
  802. 28:01This is how we can extend agents. Hooks
  803. 28:04allow us to insert our own custom logic
  804. 28:06before or after a tool runs without
  805. 28:08needing to touch the HNES core. There
  806. 28:10are two types of hooks. The first type
  807. 28:12is a pre-tool hook, which runs before
  808. 28:14the tool executes. It receives the tool
  809. 28:17name and input arguments, then can
  810. 28:19allow, reject, or modify that call. In
  811. 28:21a pho shop, this is like an inspector
  812. 28:23standing right next to the kitchen.
  813. 28:25Before adding beef to the pot, this
  814. 28:26inspector checks whether the beef is
  815. 28:28still within its expiration date. If it
  816. 28:30is still fresh, they allow it; if it is
  817. 28:32expired, they block it. If a customer
  818. 28:34asks for less salt, they adjust the
  819. 28:35seasoning accordingly. The second type
  820. 28:37is a post-tool hook. It runs after the
  821. 28:39tool has finished executing and sees
  822. 28:41the result. It cannot block anything
  823. 28:42anymore because the task has already
  824. 28:44been completed. Its job is auditing,
  825. 28:46logging, tracking, and observing, much
  826. 28:48like a kitchen camera recording every
  827. 28:50dish served so the owner can review it
  828. 28:52at the end of the day. Technically
  829. 28:54speaking, communicating with hooks is
  830. 28:57very simple. HNES sends data in JSON
  831. 28:59format, and the hook returns an exit
  832. 29:02code to tell HNES whether to allow or
  833. 29:04reject the action. Hooks can also help
  834. 29:07different components communicate with
  835. 29:09each other. Hooks are how businesses
  836. 29:11actually put HNES into practice,
  837. 29:13helping them attach their own security,
  838. 29:15auditing, and compliance rules to the
  839. 29:17right hook points. And the final
  840. 29:19component, the ninth one, is
  841. 29:21authorization and security. This is the
  842. 29:23component that decides whether an agent
  843. 29:25is a useful tool or a potential danger.
  844. 29:28HNES defines a hierarchical
  845. 29:29authorization system. Level one is
  846. 29:32read-only, level two allows writing
  847. 29:33within one's own workspace. Level three
  848. 29:36is full access. Each tool declares the
  849. 29:38minimum permissions it needs, and it is
  850. 29:40HNES's duty to verify that at the time
  851. 29:42of distribution, before the tool can
  852. 29:44even run. In the pho shop, imagine we
  853. 29:46have three types of access badges. The
  854. 29:48green badge allows entry only to
  855. 29:49inspect the inventory, without touching
  856. 29:51anything. The yellow badge allows
  857. 29:52cooking in the designated kitchen area,
  858. 29:54while the red badge grants full access,
  859. 29:56from turning off the main gas valve to
  860. 29:58dumping the entire pot of broth. There
  861. 29:59is a point we need to note here: the
  862. 30:01same tool can be either safe or
  863. 30:03dangerous depending on how it is used.
  864. 30:05Take a water tap; if we use it to wash
  865. 30:07vegetables, it is harmless, but if we
  866. 30:09spray it into an electrical outlet, it
  867. 30:11is very dangerous. It is the same with
  868. 30:13computers; there are safe commands,
  869. 30:14such as listing files, viewing content,
  870. 30:16or searching, which only require read
  871. 30:18access. As for dangerous commands, such
  872. 30:20as deleting files, running with
  873. 30:22administrative privileges, or shutting
  874. 30:23down, they require higher permissions.
  875. 30:25For example, full access. As for the
  876. 30:28remaining commands, they usually fall
  877. 30:29somewhere in between. Therefore, Hanes
  878. 30:31needs to examine the specific action to
  879. 30:33see what the agent intends to do, how
  880. 30:35far its impact goes, and if it falls
  881. 30:37within the permitted scope. For tasks
  882. 30:38that have been permitted, the agent can
  883. 30:40proceed. For tasks that exceed that
  884. 30:42scope, the system can block them or ask
  885. 30:44for your confirmation before execution.
  886. 30:46It is just like our chef being allowed
  887. 30:48to get ingredients and cook dishes
  888. 30:49according to orders on their own. But
  889. 30:51if he wants to throw away a whole pot
  890. 30:53of broth simmered for 12 hours, he
  891. 30:55would need to notify the owner, explain
  892. 30:57why, and wait for approval. The purpose
  893. 30:58of the permission layer is to clearly
  894. 31:00define which tasks the agent can do
  895. 31:01independently and which ones require
  896. 31:03human decision-making. When that
  897. 31:04boundary is clear, you will feel more
  898. 31:06secure when delegating tasks to the
  899. 31:07Agent and will also know which steps
  900. 31:09require your involvement. We have just
  901. 31:10reviewed the individual components of
  902. 31:12Hanes one by one. Now, let's try to put
  903. 31:15them all together to see how a user's
  904. 31:17request will be processed. Suppose you
  905. 31:19ask an AI coding agent, such as Claude
  906. 31:22Code, a request like "Please help me
  907. 31:24fix the issue where the login button is
  908. 31:26unresponsive." In the noodle shop
  909. 31:28example, imagine this as the moment a
  910. 31:30customer orders a bowl of rare beef pho
  911. 31:32without green onions. First, Hanes will
  912. 31:34gather the necessary instructions for
  913. 31:36the agent, including general rules,
  914. 31:38project-specific guidelines, and
  915. 31:39information about the working
  916. 31:41environment. It is just like a chef
  917. 31:42receiving their shift instructions and
  918. 31:44then reading the customer's order slip.
  919. 31:45Next, the development phase begins. The
  920. 31:48agent uses tools to locate the code
  921. 31:49related to the login button, reads the
  922. 31:51necessary files, and identifies the
  923. 31:53cause of the error. If needed, it can
  924. 31:55delegate a sub-agent to investigate a
  925. 31:57part of the project and return the
  926. 31:58results. Before any tool is run, it
  927. 32:01checks whether that action is permitted
  928. 32:03. Configured hooks can also participate
  929. 32:06in the verification at this stage. Just
  930. 32:09like a chef knowing which tools to use
  931. 32:11and which area to work in, they must
  932. 32:13follow kitchen regulations. Once the
  933. 32:15cause is identified, the agent modifies
  934. 32:17the code and runs a test. If the test
  935. 32:19reports an error, the results are fed
  936. 32:21back to the agent for further fixes. In
  937. 32:23a pho shop, this is the moment the chef
  938. 32:25tastes the broth. If it doesn't taste
  939. 32:27right, they adjust it and taste it
  940. 32:28again. Throughout the process, Hannes
  941. 32:30records the progress of the work. If
  942. 32:32the context becomes too long, it
  943. 32:33retains only the necessary information
  944. 32:35for the agent to continue. It's like
  945. 32:37keeping a kitchen log while clearing
  946. 32:38the table to make space for more work.
  947. 32:40Finally, once the fix and tests are
  948. 32:41complete, the agent reports the result
  949. 32:43back to you. The bowl of pho is served
  950. 32:45exactly as ordered, with no extra
  951. 32:47ingredients. Thus, you only made one
  952. 32:49request, but behind it lies an entire
  953. 32:51process. Reading instructions, finding
  954. 32:53information, using tools, and verifying
  955. 32:55permissions. Testing and recording the
  956. 32:57results. Hannes organizes that process
  957. 32:59so the model can complete the work step
  958. 33:01by step. Through this example, we have
  959. 33:03seen how the components in Hannes
  960. 33:05coordinate with each other. However, to
  961. 33:07be able to use or even build such
  962. 33:09systems yourself, there are a few
  963. 33:11points to keep in mind. First, with the
  964. 33:13same model, different organizational
  965. 33:15methods will yield different results.
  966. 33:17Place the same chef in two different
  967. 33:19kitchens. In the first kitchen, tools
  968. 33:21are lacking and disorganized.
  969. 33:23Ingredients are a mess, and the order
  970. 33:25slips are unclear. In the second
  971. 33:27kitchen, everything is well-organized,
  972. 33:29customer requests are clear, and there
  973. 33:31is a final check before serving. The
  974. 33:33chef's skill level in these two
  975. 33:35kitchens remains the same, but the
  976. 33:36ability to produce dishes that meet
  977. 33:38requirements will differ. It is the
  978. 33:40same with AI; the same model, when
  979. 33:41provided with the right tools, clear
  980. 33:43instructions, and a way to verify
  981. 33:45results, can work much more effectively
  982. 33:47. Therefore, when an agent isn't
  983. 33:49performing well, don't just think about
  984. 33:51switching to a more powerful model.
  985. 33:53Check to see if it has enough
  986. 33:55information, the necessary tools, and a
  987. 33:57way to recognize errors to self-correct
  988. 33:59. Second, you can improve HNES without
  989. 34:01having to build everything from scratch
  990. 34:03. An easy way to visualize this is that
  991. 34:06Hannes consists of the parts the
  992. 34:07manufacturer has already made and the
  993. 34:09parts you can add for your own work.
  994. 34:11With tools like Cursor or Codex, the
  995. 34:14core is already built, including how to
  996. 34:16call the model, run tools, manage
  997. 34:18context, and organize the workflow loop
  998. 34:20. It is similar to taking over a
  999. 34:23kitchen that already has a stove, a
  1000. 34:25refrigerator, and utility systems; you
  1001. 34:27don't need to rebuild everything
  1002. 34:28yourself. However, you still need to
  1003. 34:30add your own restaurant's specifics,
  1004. 34:33such as recipes, ingredient
  1005. 34:34organization, shift handover guides,
  1006. 34:36and food inspection processes. In
  1007. 34:39working with AI, that could be an
  1008. 34:41agent.md or clues.md file containing
  1009. 34:43project instructions, scripts, routine
  1010. 34:46tasks, automated testing snippets, or
  1011. 34:48connections to necessary tools. In
  1012. 34:51other words, you don't need to write an
  1013. 34:53AI coding agent yourself before you can
  1014. 34:55start doing Hness Engineering.
  1015. 34:57Adjusting an existing tool to make it
  1016. 34:59follow your specific process is also
  1017. 35:01part of this job. Third, there are
  1018. 35:04errors that must be prevented by
  1019. 35:05mechanisms rather than just empty words
  1020. 35:07. Suppose the chef frequently forgets
  1021. 35:09to turn off the stove. You could stick
  1022. 35:11a note on it saying "remember to turn
  1023. 35:13off the stove." If he still forgets,
  1024. 35:14you might stick up another note. But at
  1025. 35:16some point, you will realize that you
  1026. 35:18need a more reliable mechanism. Such as
  1027. 35:20an automatic shut-off timer, for
  1028. 35:22example. It is the same with Agents. If
  1029. 35:24it keeps making the same mistake,
  1030. 35:26writing more prompts might help, but it
  1031. 35:28may not be enough. Similarly, if the
  1032. 35:31agent frequently breaks existing
  1033. 35:33functionality when editing code, you
  1034. 35:35can add tests to catch those errors. Or
  1035. 35:37, if there is a directory that
  1036. 35:39shouldn't be modified, you can restrict
  1037. 35:41write access to that folder. The thing
  1038. 35:43to remember is that instructions tell
  1039. 35:45the agent what to do, while checks and
  1040. 35:47permissions help it detect or prevent
  1041. 35:49unauthorized actions. A good agent
  1042. 35:51setup needs to combine both of these.
  1043. 35:53Fourth, if you want the agent to be
  1044. 35:55able to self-correct, you need to let
  1045. 35:57it know whether the result is right or
  1046. 35:59wrong. In previous parts, I mentioned
  1047. 36:00the importance of testing many times. I
  1048. 36:03need to emphasize it once again here.
  1049. 36:04This is a very important point. If we
  1050. 36:06want our agent to be capable of working
  1051. 36:08through multiple steps on its own. A
  1052. 36:10chef who cannot taste the food will
  1053. 36:11find it very difficult to know if the
  1054. 36:12dish is seasoned correctly. The agent
  1055. 36:14also needs a similar way to evaluate
  1056. 36:16what it has just done. For code, this
  1057. 36:18could be test results or error messages
  1058. 36:20. For interfaces, this could be
  1059. 36:22screenshots to compare against the
  1060. 36:24requirements. For calculations, this
  1061. 36:26could be a verification step using a
  1062. 36:28tool. If you just assign a task and let
  1063. 36:30the agent guess if it did it correctly,
  1064. 36:32it will be very hard to trust the
  1065. 36:34output. But with clear feedback, the
  1066. 36:36agent can rely on it to proceed. It can
  1067. 36:38fix errors where they appear, re-check,
  1068. 36:40and then move on to the next step.
  1069. 36:42Therefore, when designing a task for an
  1070. 36:44agent, always consider what it will
  1071. 36:46rely on to know if it has done the job
  1072. 36:48correctly. Finally, if you want the
  1073. 36:50agent to be more autonomous, prepare a
  1074. 36:52work environment for it with clear
  1075. 36:54boundaries. In the permissions section,
  1076. 36:56we talked about requiring the agent to
  1077. 36:58ask for permission before performing
  1078. 36:59certain operations. But if you now want
  1079. 37:01it to work through multiple steps
  1080. 37:02without constantly stopping to wait for
  1081. 37:04confirmation, what should you do? One
  1082. 37:06way is to prepare a dedicated work
  1083. 37:07environment for it, often called a
  1084. 37:09sandbox. Depending on the needs, it
  1085. 37:11could be a container or a virtual
  1086. 37:13machine configured with appropriate
  1087. 37:14limits. Using the pho restaurant
  1088. 37:16example, imagine you set aside a
  1089. 37:18separate kitchen to test new dishes.
  1090. 37:20The chef can test recipes, try
  1091. 37:21different preparation methods, mess up,
  1092. 37:23and start over while the main kitchen
  1093. 37:25still serves customers. Of course, that
  1094. 37:27experimental kitchen needs to be
  1095. 37:28properly isolated. Which ingredients to
  1096. 37:30use, which equipment to touch, and
  1097. 37:32whether items can be taken from the
  1098. 37:34storage. It is the same with agents;
  1099. 37:36what matters is not just having a
  1100. 37:38separate workspace, but clearly
  1101. 37:39limiting the data and resources it can
  1102. 37:41access. If the scope of influence is
  1103. 37:43better controlled, you will have the
  1104. 37:45basis to allow the agent to be more
  1105. 37:46proactive within that scope. So, we
  1106. 37:48have gone through the entire pho
  1107. 37:49restaurant, from the ordering process
  1108. 37:51to how the whole kitchen is organized.
  1109. 37:53If you only need to remember three
  1110. 37:55things from this video, remember that
  1111. 37:57prompt engineering is about writing
  1112. 37:58requests clearly. Context engineering
  1113. 38:00is about providing the right
  1114. 38:02information at the right time. And HES
  1115. 38:04Engineering is about organizing the
  1116. 38:05entire process so the model can use
  1117. 38:07information, take action, check results
  1118. 38:10, and continue working. HES consists of
  1119. 38:12nine core components, but you don't
  1120. 38:14need to build all nine from the start
  1121. 38:16by yourself. If you are using an AI
  1122. 38:18coding agent, start with the tasks
  1123. 38:20closest to your needs. For example,
  1124. 38:22write clear project instructions, add
  1125. 38:24procedures for repetitive tasks, and
  1126. 38:26prepare a way to verify the results.
  1127. 38:29Then, we can continue to observe where
  1128. 38:31the agent is getting stuck to keep
  1129. 38:32improving it there. A great chef needs
  1130. 38:34a well-organized kitchen to truly
  1131. 38:36showcase their skills. With AI agents,
  1132. 38:39the model is very important, but how
  1133. 38:41you organize the work around it is
  1134. 38:43equally important. That is the meaning
  1135. 38:45of the formula I introduced to you at
  1136. 38:46the beginning of this video. An agent
  1137. 38:48equals the model plus HES. I hope the
  1138. 38:50things I shared in this video are
  1139. 38:52useful to you. Thank you so much for
  1140. 38:54your time. I will see you in the next
  1141. 38:56videos. Yeah.

About this transcript

This page contains the full transcript of Tất cả những gì bạn cần biết về Harness Engineering by Việt Nguyễn AI, generated from the public captions YouTube serves with the video. The transcript has 7,395 words across 1,141 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.