EnCompass: Enhancing Agent Programming with Search Over Program Execution Paths

Zhening Li, Armando Solar-Lezama, Yisong Yue, Stephan Zheng
12/3/2025
cs.AIcs.LGcs.PL

No official code found. Best implementation: nitin966/OpenEncompass (23 stars, last commit 2026-02-10).

Abstract

We introduce a new approach to agent programming, the development of LLM-based agents. Current approaches to agent programming often entangle two aspects of agent design: the core workflow logic and the inference-time strategy (e.g., tree search). We introduce "probabilistic angelic nondeterminism" ("PAN"), a programming model that disentangles these two concerns, allowing the programmer to describe the agent workflow and independently experiment with different inference-time strategies by simply changing a few inputs. We provide an implementation of PAN in Python as the EnCompass framework, which uses a Python decorator to compile agent workflow programs into a search space. We present three case studies that demonstrate how the framework lets the programmer quickly improve the reliability of an agent and easily switch between different inference-time strategies, all with little additional coding.

View on arXivView PDF

Code Implementations(1)

A flexible framework for AI agents that separates workflow logic from search strategy. Based on https://arxiv.org/pdf/2512.03571 Also read https://asari.ai/blog/encompass

231PythonDec 7, 20258 months ago

Similar Papers

Cite this paper

@article{li2025encompass,
  title  = {EnCompass: Enhancing Agent Programming with Search Over Program Execution Paths},
  author = {Zhening Li and Armando Solar-Lezama and Yisong Yue and Stephan Zheng},
  year   = {2025},
  eprint = {2512.03571},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.03571v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.03571.svg)](https://codeofpaper.com/paper/2512.03571)

Discussion