Observe: What Happened?
An action without observation is flying blind. Imagine a pilot who fires the engine and then closes their eyes — they have no idea if the plane climbed, descended, or veered off course. The observe stage is where an agent opens its eyes after every action: it reads the result, interprets what that result means, and uses it to inform the very next perceive stage. Observation is what transforms a series of disconnected actions into a coherent, self-correcting process.
What an Observation Looks Like
An observation is the data the agent receives in response to its action. Its form depends entirely on what action was taken. If the agent ran a web search, the observation is the list of results — titles, snippets, URLs. If the agent executed code, the observation is the code's output — its printed result, its error message if it crashed, or its return value. If the agent sent a form submission, the observation might be a success message or a validation error. If the agent asked a user a clarifying question, the observation is the user's reply. In every case, the observation is concrete: a piece of data, not an abstraction. The agent's next think stage must interpret this data — what does it tell me about how things stand?
An observation is the concrete result the agent receives after taking an action. It could be a search result, a code output, an error message, a sensor reading, or a user reply — any data that reflects the state of the world after the action.
Interpreting Success and Failure
Not all observations look the same — and not all of them signal success. A well-designed agent must handle at least three types of observations. Success signals confirm that the action achieved its intended effect. The code ran without errors and produced the expected output. The search returned highly relevant results. The form was submitted and acknowledged. Failure signals indicate something went wrong. The code threw an exception. The search returned zero results. The API call timed out. A good agent does not treat failure as a dead end — it treats failure as information. The failure tells the agent something valuable about the world, and the agent uses that to adjust its plan. Ambiguous signals are the hardest to handle: the action completed without error, but the result is unexpected, incomplete, or unclear. An agent must be able to recognize ambiguity and decide whether to ask for clarification, try a different approach, or accept partial success.
A failed action is not simply a setback — it is data. When an agent's code crashes with an error message, that message tells the agent exactly what went wrong and where to look. Treating failure as feedback is a hallmark of good agent design.
Feeding the Loop: Observation to Perception
The observe stage does not exist in isolation — it feeds directly into the next perceive stage. The observation becomes part of the agent's context window, meaning the agent now perceives a richer situation than it did before. Each loop cycle accumulates observations, building a more complete picture of the task. This is how agents make progress. On the first loop, the agent might search for information and observe that the results are too general. On the second loop, it perceives those results alongside the original goal and refines its search. On the third loop, it finds exactly what it needs. Without observation feeding back into perception, each loop would start from scratch with no learning from prior actions.
Complete the sentences about the observe stage.
Match each action to the observation that would follow it.
Terms
Definitions
Drag terms onto their definitions, or click a term then click a definition to match.
An agent executes code and receives a traceback error message. What should a well-designed agent do?
Why does the observation stage feed back into the perceive stage, rather than just concluding the loop?
Interpret the Observation
- Step 1: An agent is trying to find the current population of Tokyo. It searched the web and received this observation: 'Results: (1) Tokyo Population 2010 Census — 13.1 million (2) Tokyo Metropolitan Government — official site (3) Tokyo travel guide — best restaurants.'
- Step 2: Evaluate the observation. Did the action succeed? Is the information sufficient? What is wrong or missing?
- Step 3: Write the agent's next think stage: what does it reason about the observation, and what action does it decide to take next?
- Step 4: Now imagine a second scenario: the agent ran a database query and received only an empty result — zero rows returned. Write two different interpretations of this observation that the agent might consider, and explain what action each interpretation would lead to.
- Step 5: In one sentence, explain why ambiguous observations are harder to handle than clear success or failure signals.