EnCompass: Enhancing Agent Programming with Search Over Program Execution Paths

📅 2025-12-03
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Existing LLM agent programming approaches tightly couple workflow logic with runtime reasoning strategies (e.g., tree search), impeding independent modeling and substitution of either component. Method: We propose a decoupled agent programming paradigm centered on the “Probabilistic Angelic Nondeterminism” (PAN) model, which formally separates deterministic workflow logic from pluggable, strategy-agnostic reasoning policies. Based on PAN, we design EnCompass—a Python framework that automatically compiles annotated agent programs into searchable execution-path spaces via decorator-based instrumentation. Contribution/Results: Evaluated across three diverse tasks, EnCompass enables flexible, low-effort strategy switching (e.g., DFS, BFS, MCTS) with minimal code changes—yielding substantial improvements in task success rate and robustness. This work establishes a foundation for modular LLM agent design, systematic strategy experimentation, and reliability-oriented optimization.

Technology Category

Application Category

📝 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.
Problem

Research questions and friction points this paper is trying to address.

Separates agent workflow logic from inference strategies
Enables flexible experimentation with different search methods
Improves agent reliability with minimal additional coding
Innovation

Methods, ideas, or system contributions that make the work stand out.

PAN disentangles workflow logic from inference strategies
EnCompass compiles agent programs into search spaces
Framework enables quick reliability improvements with minimal coding
🔎 Similar Papers
No similar papers found.