WhoBuilt

Stateful environments for vertical agents

Jul 22, 2025· 7 min· 1.4K views·Watch on YouTube

Speaker

Josh Purtell, founder of Synth Labs, explains how stateful environments can help build and improve vertical agents at an AI Engineer event.

What an environment means

In reinforcement learning, an environment packages the task logic separately from the AI algorithm. Purtell traces the idea from RL-Glue and OpenAI Gym to the agent-computer interface used by SWE-bench and SWE-agent.

Why statefulness matters now

Early LLM tools handled simple tasks such as arithmetic or weather searches, so they needed few abstractions. As models improved, agents began working on products and artifacts over longer periods, creating a need to capture and manage state.

What a stateful environment provides

The environment computes results outside the agent implementation and can connect to APIs, Excel documents, or other sources of truth. It exposes a useful representation for the agent to observe and manipulate, rather than requiring access to an entire application or operating system.

Separate agent logic from application logic

Keeping vertical application logic in code that does not change with the agent makes it easier to replace or update the agent as models improve. Network boundaries also let multiple agents or models work on one product over time, including asynchronously.

Reset, branch, and recover

A separate, resettable environment makes it easier to roll back an agent that has gone off course. Purtell connects this to language-agent tree search: agents can explore branches, compare results, and continue from a stronger state, as in his Minecraft example. He points to the open-source Synth AI Environments repository for implementations across academic benchmarks.

Takeaways

  • Keep vertical application logic separate from the agent so you can update models without rewriting the environment.
  • Expose only the state and actions an agent needs, instead of handing it an entire application.
  • Use network boundaries to support multiple agents working on the same product over time.
  • Make environments resettable so agents can recover from mistakes and explore alternate paths.

Mentioned in this talk

Search inside this talk

What was claimed 6

  • built
    “OpenAI ... came out with OpenAI Gym.”
    YouTube
    Verified2 sources· Talk, Web· archived
  • founded
    “I'm Josh, founder of Synth Labs.”
    YouTube
    Verified3 sources· Talk, Web· archived
  • feature
    SWE-agent: Coined the term “agent-computer interface” with SWE-bench
    “SWE-bench and SWE-agent coined the term “agent-computer interface.””
    YouTube
    Unverified1 source· Talk
  • feature
    SWE-bench: Coined the term “agent-computer interface” with SWE-agent
    “SWE-bench and SWE-agent coined the term “agent-computer interface.””
    YouTube
    Unverified1 source· Talk
  • feature
    stateful environment: Compute results outside the agent implementation and expose a useful representation of the workspace
    “A stateful environment is an engine that computes results external to the agent implementation.”
    YouTube
    Unverified1 source· Talk
  • feature
    stateful environment: Support resetting or rolling back environment state
    “You can start doing things like resetting the state of the environment your agent is working on. You could roll back.”
    YouTube
    Unverified1 source· Talk

Related talks