Notes

Environment (Agent)

An agent on its own does nothing. It becomes useful only when there is something to look at and something it can change — a codebase, a browser tab, a ticketing system, a warehouse floor. That surrounding something is the environment: everything outside the agent that its actions act upon and that its observations come from.

What the environment actually is
In practice it is defined by the tools the agent is given, because a tool call is the only way it can reach outside itself. Three properties shape every design decision around it:

  • It holds state. A file written at step three is still written at step nine, whether or not the agent remembers writing it.
  • It is partially observable. The agent sees only what its last observation returned, never the whole system.
  • It changes without the agent. A colleague merges a branch, a price updates, another agent edits the same record — and the world the plan was built on has moved.

Why drawing the boundary matters
The environment you grant is the blast radius you accept. An agent whose environment is a sandboxed container holding a copy of the repository cannot damage production; one handed live credentials can. It is also what makes evaluation honest — benchmarks like WebArena and OSWorld exist because comparing agents requires every one of them to face the same resettable environment. Leave it vague and failures stop being reproducible: the run that succeeded and the run that looped differ in the world, not in the agent.

The environment is everything outside an agent that it observes and acts upon — files, APIs, a browser, a physical workspace. In practice it is defined by the tools the agent is given, and it holds state the agent did not store itself, changes without the agent, and is only partially visible through each observation. Naming it precisely bounds what the agent can damage and makes runs reproducible enough to evaluate.

Imagine hiring a decorator. Before they can do anything, you have to tell them which room is theirs, where the paint is, and what they are not allowed to touch. That room is the environment.

For software working on its own, the environment is simply the world it has been let into — your files, a website, an email account, sometimes a real robot in a real kitchen. It is where the software looks to see what is going on, and where its actions actually land. Deciding what goes inside that boundary is the main way people keep these systems safe: a mistake can only reach as far as the room it was given.