Parallel Environments for Agents
Shangyin Tan (University of California, Berkeley), Jialin Zhang (University of California, Berkeley), Matei Zaharia (UC Berkeley)
Architectural Patterns & Composition System Optimization & Efficiency
Summary
A framework that lets agents branch execution across parallel isolated environment instances, achieving 48% on SWE-bench Pro with a 15-point gain over single-path baselines.
Description
Large language models increasingly benefit from scaling test-time compute through parallel sampling and best-of-N decoding. However, these approaches treat reasoning as static text generation, overlooking that real-world agentic tasks require interaction with stateful environments. For example, software engineering agents must iteratively execute code, observe test results, and adapt within changing environments. We introduce ParallelEnv, a modular execution framework that enables agents to branch their execution across parallel, isolated environment instances. ParallelEnv represents execution as a state graph over immutable environment snapshots, supports pluggable environment backends (Docker containers, VMs), and provides configurable scheduling strategies (priority, beam, round-robin) for managing concurrent branches. On SWE-bench Pro, tree-forking with ParallelEnv achieves 48% resolve rate at $0.50 cost, a 15-point gain over single-path baselines at matched compute budget.