chapter eight
8 Human In The Loop
This chapter covers
- When should humans be in the loop to assist or oversee the execution of tasks?
- Three different patterns for human-in-the-loop task executions
- Implementing the human input tool, result approval gate, and supervised task execution in our framework
We really have come a long way since the first LLM agent we implemented together back in Chapter 4. Our work in the previous three chapters, in which we added support for MCP tools, Skills, and (episodic) Memory, has greatly enhanced our LLM agent, enabling it to accomplish tasks more effectively and efficiently. That said, there are some tasks that an LLM agent cannot, or perhaps should not, perform autonomously. In this chapter, we’ll complete our stage 2 build by supporting three different approaches to enabling human-in-the-loop (HITL) task execution.