Observation
An observation is information returned to an AI agent from its environment. It tells the agent what happened, what changed, or what is currently true so the next decision can use evidence rather than assumption.
Observations come from many sources
Common observations include:
- A search tool returning results.
- An API returning data or an error.
- A test runner reporting passed and failed tests.
- A user approving or rejecting a proposed action.
- A sensor reporting a physical measurement.
- A database query returning no matching records.
An observation can be successful, incomplete, ambiguous, or negative. “Permission denied” is still useful because it tells the agent that its intended action did not occur.
Observations close the agent loop
The basic cycle is action followed by observation. The agent interprets the result, updates its state, and chooses whether to continue, retry, change strategy, ask for help, or stop.
How AI Agents Work places this feedback step inside the complete execution loop.
Imagine a coding agent edits a function and runs the test suite. The test output is an observation. If two tests fail, the agent should not assume the code is complete. It uses the failure messages to investigate and revise the change.
Observation is not the same as state
An observation is newly received information. Agent state is the maintained representation of the task across steps.
For example, “API request timed out” is an observation. State may record that the first attempt failed, two retries remain, and no external update has been confirmed.
This distinction helps prevent unreliable behavior. Raw observations can be noisy or incomplete, while state should organize what the agent currently believes and what it still needs to verify.
Good observations improve reliability
Tools should return structured, relevant results with clear success and error signals. A vague message such as “something went wrong” gives the agent little basis for recovery. A response containing an error code, failed field, and safe retry guidance is much more useful.
The agent should also avoid treating every observation as trustworthy. Results may be stale, malicious, or inconsistent. Validation and source awareness are therefore part of interpreting feedback, especially before high-impact actions.
Learn More
How AI Agents WorkContinue with the full AIRundown guide →