Chapter C50 · Interactive Course
The software around the model
The harness, workflows, plans, context selection, state and stops.
Core Learning Concept
Label the host’s responsibilities around the model: assemble context, expose capabilities, run authorized calls, record state, and stop or continue. Then identify which next step is fixed by the workflow and which is chosen from new evidence. A clear run record makes recovery possible when the plan changes.
What You’ll Learn in This Chapter
-
The harness runs the agent loop
Identify software that manages context, tools and stopping.
An agent harness is the surrounding application that coordinates context assembly, tool execution, memory, and loop termination. While the model suggests next actions, the harness enforces constraints and executes actual system operations.
-
A workflow follows a designed route
Distinguish a fixed sequence from model-chosen next steps.
A workflow specifies some sequence or structure of operations in advance. An agentic step can choose among actions based on current evidence. These approaches can be combined, such as a fixed review process with flexible investigation inside it. Choose flexibility where it serves the task rather than assuming every step needs it.
-
Planning is a revisable proposal
Recognize a plan as provisional.
A plan is a proposed route to the goal based on current information. New evidence can make a step unnecessary, impossible, or unsafe. Update the plan while preserving the intended outcome and constraints. A changed plan should explain the reason and next action so the work remains understandable.
-
Context engineering selects useful input
Choose relevant information for the next decision.
Context engineering means selecting and organizing information for the model’s next decision. Relevant instructions, current state, source excerpts, and tool results can all contribute. More material is not automatically more helpful. Include what the decision needs and preserve important constraints while removing unrelated or stale content.
-
State records what happened
Distinguish task status from conversational claims.
State records where the task stands: what was proposed, attempted, completed, verified, or left uncertain. A timeout may leave completion unknown because either execution or only the response could have failed. Check the destination or use an appropriate operation identifier before deciding what to repeat.
-
A stop rule bounds work
Choose an explicit completion or escalation condition.
A stopping rule defines both success and limits such as time, attempts, or permitted scope. It should also specify what happens when progress cannot continue. A useful stop report distinguishes completed work from unresolved items. Ending a run because its budget expired is not the same as achieving the task.
-
Label the harness
Explain which component selected context, requested an action, executed it, recorded the outcome and stopped the supplied run.