Stateful environments for vertical agents — Josh Purtell, Synth Labs

Introduction to Stateful Environments 00:00

  • Josh Purtell from Synth Labs introduces the concept of stateful environments for improving agent development, particularly in vertical applications such as finance, accounting, and health.
  • Environments are defined as containers that capture state for agents, a concept with origins in reinforcement learning (RL) where environments separate task logic from AI algorithms.

Historical Context and Motivation 00:57

  • RL environments have a history dating back to RL Glue, OpenAI Gym, and academically relevant agent-computer interfaces like SUB bench and SU agent.
  • Earlier AI applications required only simple abstractions due to basic model capabilities (e.g., sum calculations or simple internet lookups).
  • As language models improved, particularly since Sonnet 35 and the introduction of Claude artifacts, the need arose for architectures supporting long-horizon work on products or artifacts.

Definition and Structure of Stateful Environments 03:07

  • A stateful environment runs computations external to the agent, allowing the agent to manipulate but not contain all environment logic.
  • These environments expose a simplified representation (such as a specialized terminal) for agents to interact with, rather than overwhelming them with the full source application (like Excel).
  • Network boundaries are highlighted as crucial, enabling the agent and the environment to operate in separate processes, which supports RL training and multi-agent scenarios.

Benefits of Using Stateful Environments 04:10

  • Separating application logic into a stateful environment allows easy agent replacement when new models are available, without modifying core logic.
  • Network boundaries facilitate asynchronous work and multi-agent collaboration on the same product, making production implementation more robust.
  • The approach enables features like resetting or rolling back environment state, which is especially valuable to recover from errors or experiment with alternate agent strategies.

Advanced Use Cases and Practical Implications 05:02

  • Resettable environments make sophisticated research techniques like language agent tree search (from prior language agent research) feasible in production, especially for long-horizon tasks like those in Minecraft.
  • In agent-driven tasks with hundreds or thousands of steps, the ability to reset or backtrack avoids derailment and enables more efficient development.

Implementation Resources and Conclusion 06:19

  • Open-source implementations and abstractions for stateful environments are available on Synth's GitHub under "synth AI environments."
  • The talk concludes with an invitation to explore these resources for academic and practical use cases.