Large language model (LLM) agents typically rely on reactive decision-making paradigms such as ReAct, selecting actions conditioned on growing execution histories. While effective for short tasks, these approaches often lead to redundant tool usage, unstable reasoning, and high token consumption in complex long-horizon tasks involving branching, iteration, or multi-tool coordination. To address these limitations, this paper introduces PseudoAct, a novel framework for flexible planning and action control in LLM agents through pseudocode synthesis. Leveraging the ability of LLMs to express task-solving strategies as code, PseudoAct synthesizes a structured pseudocode plan that decomposes a task into subtasks and explicitly encodes control flow, including sequencing, conditionals, loops, parallel composition, and combinations of these logic primitives. Actions are then executed by following this global plan, making the decision logic explicit and temporally coherent. This design reduces redundant actions, prevents infinite loops, and avoids uninformative alternative exploration, enabling consistent and efficient long-horizon decision-making. Experiments on benchmark datasets show that our method significantly outperforms existing reactive agent approaches, achieving a 20.93% absolute gain in success rate on FEVER and setting a new state-of-the-art on HotpotQA.
Figures & tables
Fig. 1 : Comparison between reactive ReAct/DFSDT and our PseudoAct framework. (Reactive agents follow unstructured trial-and-error action sequences and may fail after reaching the maximum attempt limit. In contrast, PseudoAct generates a structured pseudocode plan that decomposes the task into phases with explicit decision logic, guiding action selection and reducing unnecessary exploration).
Primitive
Semantics
EXECUTE
Atomic single-action execution
IF-ELIF-ELSE
Conditional branching
FOR x IN C
Bounded iteration over collection C
WHILE ϕ
Convergence-driven iteration
TRY-ON_FAILURE
Fault-tolerant execution with fallback
PARALLEL
Concurrent independent computations
TABLE I: Logic primitives Λ for pseudocode planning.
Fig. 2 : Illustration of a pseudocode plan for resolving a practical multi-step task in the electrical power system domain.
Fig. 3 : An example of the runtime prompt constructed by the Control-Flow Executor for solving the power grid task in Figure 2 . The agent receives both the Global Workflow Context (top) and the Local Step Context (bottom), ensuring local actions are consistent with global intent.
FEVER
HotpotQA
Method
Accuracy (%)
F1 (%)
Accuracy (%)
ReAct
60.78
62.63
46.40
DFSDT
67.31
64.16
73.21
PseudoAct
88.24
83.35
82.14
TABLE II : Quantitative tests and comparison results on the FEVER and HotpotQA benchmarks.
Fig. 4 : Overview of Scenario 1. The iteration trace reports the evolution of load and voltage at Bus 11, terminating after seven iterations when the voltage constraint is violated, with the final panel summarizing the converged solution.
Fig. 5 : Scenario 2, in which an attempted 15% load increase at Bus 5 is aborted because no load elements exist at the target bus, resulting in no voltage variation.
Fig. 6 : Comparison of AC and DC optimal power flow (OPF) costs on Case 9 and Case 39, showing successful convergence for both methods and consistently higher AC generation costs due to network losses.
Fig. 7 : Scenario 4: Sequential load-shedding mitigation with persistent shared state. The agent identifies the top three overloaded lines, performs iterative load reduction for Line 21 under N-1 contingency, and preserves the updated load state for subsequent evaluations of Lines 11 and 26.
Fig. 8 : Scenario 5, illustrating a repeated attempt to increase Generator 0 capacity to induce line overload. The experiment confirms that increasing generation capacity alone does not affect line loading without a corresponding change in dispatch, resulting in no limit being found.
Fig. 9 : Examples of calibration applied to the HotpotQA dataset, including incomplete answer spans, encoding inconsistencies, and question-answer type mismatches.
Large language model (LLM) agents often rely on long sequences of low-level textual actions, resulting in large effective decision horizons and high inference cost. While prior work has focused on improving inference efficiency through system-level optimizations or prompt engineering, we argue that a key bottleneck lies in the representation of the action space itself. We propose Latent Action Reparameterization (LAR), a framework that learns a compact latent action space in which each latent action corresponds to a multi-step semantic behavior. By reparameterizing agent actions into latent units, LAR enables decision making over a shorter effective horizon while preserving the expressiveness of the original action space. Unlike hand-crafted macros or hierarchical controllers, latent actions are learned from agent trajectories and integrated directly into the model, allowing both planning and execution to operate over abstract action representations. Across a range of LLM-based agent benchmarks, LAR significantly reduces the effective action horizon and improves inference efficiency under fixed compute budgets. As a consequence, our approach achieves substantial reductions in action tokens and corresponding wall-clock inference time, while maintaining or improving task success rates. These results suggest that action representation learning is a critical and underexplored factor in scaling efficient LLM agent inference, complementary to advances in model architecture and hardware.
Wenhao Huang, Qingwen Zeng, Qiyue Chen +11
Université de Montréal · Mila - Quebec AI Institute · The University of Sydney +7
Large language model (LLM) agents have recently demonstrated strong capabilities in interactive decision-making, yet they remain fundamentally limited in long-horizon tasks that require structured planning and reliable execution. Existing approaches predominantly rely on flat autoregressive policies, where high-level reasoning and low-level actions are generated within a single token sequence, leading to inefficient exploration and severe error propagation over extended trajectories. In this work, we propose HiMAC, a hierarchical agentic RL framework that explicitly decomposes long-horizon decision-making into macro-level planning and micro-level execution. HiMAC models reasoning as a structured blueprint generation process followed by goal-conditioned action execution, enabling robust long-horizon planning within LLM-based agents. To train this hierarchy efficiently, we introduce a critic-free hierarchical policy optimization paradigm that extends group-based reinforcement learning to bi-level structures through hierarchical relative advantage estimation. Furthermore, we propose an iterative co-evolution training strategy that alternates between planner exploration and executor adaptation, mitigating the non-stationarity inherent in hierarchical learning. Extensive experiments on ALFWorld, WebShop, and Sokoban demonstrate that HiMAC consistently outperforms strong prompting and reinforcement learning baselines, achieving state-of-the-art performance and substantially improved sample efficiency across both text-based and visually grounded environments. Our results show that introducing structured hierarchy, rather than increasing model scale alone, is a key factor for enabling robust long-horizon agentic intelligence.
Hongbo Jin, Rongpeng Zhu, Jiayu Ding +2
School of Electronic and Computer Engineering, Peking University
Large language model (LLM) agents for long-horizon interactive tasks typically follow a ReAct-style protocol, issuing one primitive action per LLM round. While this enables frequent replanning, it is inefficient for long-horizon tasks where many rounds are spent on routine action sequences. A natural alternative is to let the agent emit variable-length action chunks. However, naively training such policies with standard reinforcement learning fails: the agent either collapses to single-action behavior or over-commits to excessively long sequences. Both failures share a common root cause: the inability to learn chunk boundaries. We propose SPACE, which addresses this challenge by distilling chunk-boundary supervision from trajectory-induced programmatic skills. We induce two-level programmatic skills from successful trajectories, where subskill boundaries serve as direct chunk-boundary supervision. This temporal structure is then distilled into a primitive-chunk policy via hybrid on-/off-policy optimization with chunk-aware credit assignment. Experiments on ALFWorld and ScienceWorld show that SPACE improves success rates by 7.0%-31.3% over the strongest baseline in each setting while reducing average LLM decision rounds by up to 78.9%.
Yanting Yang, Can Jin, Jinman Zhao +6
Rutgers University · University of Toronto · The Hong Kong Polytechnic University +2