Appearance
05. Two Ways to Work with an Agent: Instruction or Goal
The problem. You can work with an agent in two ways: give it an instruction at each turn of the conversation, or give it a goal and let it move forward on its own. What architectural difference makes this second mode possible?
Example 5: the restaurant. The ordering kiosk is the basic mode: a tool, a fixed procedure, an implicit instruction. Now imagine an agent connected to the restaurant's system: you give it the goal "is my order #42 ready?", and it checks with the kitchen, comes back to the customer if there is a delay, offers a solution, and alerts a human if the delay exceeds fifteen minutes. It works between two messages, without being given instructions again.
The concept. In instruction mode, we give the instructions at each turn, and the agent forgets everything from one turn to the next: the model is stateless (layer 0) and it is the harness that rebuilds the context at each call (layer 1), as seen in the previous course. In goal mode, the agent moves forward on its own, and it can work for hours, even weeks, on a given goal. The core of the loop, decide, act, observe, update, stays the same; it is the architecture around it that changes.
| Instruction mode (chat) | Goal mode (resident agent) | |
|---|---|---|
| Who drives? | the human, at each turn | the agent, between two messages |
| Duration of a "task" | one turn of conversation | hours, days, weeks |
| State between turns | rebuilt at each call (layer 1) | persisted between sessions (layer 5) |
| Work trigger | a message from the human | an event, a schedule, a tick |
| Channel | synchronous (turn by turn) | most often asynchronous (goal → result) |
When to prefer which mode? Instruction mode suits short, fuzzy tasks where the human wants to keep control at each step (exploring an idea, debugging with the agent). Goal mode suits long, well-defined tasks where you accept coming back later for the result (writing a report, tracking ten orders, preparing a schedule). The cost is not the same: goal mode consumes model calls between two human check-ins, so it needs a budget (tokens, cost, iterations: layer 4) and stop conditions.