mlsanityData to 14 Oct 2026

CodeAgents: A Token-Efficient Framework for Codified Multi-Agent Reasoning in LLMs

arXiv 2507.03254 ↗First posted 4 Jul 2025cs.AIcited by 9

On the map: LLM reasoning → Reasoning for agents, planning and code

also in 1 more
Abstract (arXiv)

Effective prompt design is essential for improving the planning capabilities of large language model (LLM)-driven agents. However, existing structured prompting strategies are typically limited to single-agent, plan-only settings, and often evaluate performance solely based on task accuracy - overlooking critical factors such as token efficiency, modularity, and scalability in multi-agent environments. To address these limitations, we introduce CodeAgents, a prompting framework that codifies multi-agent reasoning and enables structured, token-efficient planning in multi-agent systems. In CodeAgents, all components of agent interaction - Task, Plan, Feedback, system roles, and external tool invocations - are codified into modular pseudocode enriched with control structures (e.g., loops, conditionals), boolean logic, and typed variables. This design transforms loosely connected agent plans into cohesive, interpretable, and verifiable multi-agent reasoning programs. We evaluate the proposed framework across three diverse benchmarks - GAIA, HotpotQA, and VirtualHome - using a range of representative LLMs. Results show consistent improvements in planning performance, with absolute gains of 3-36 percentage points over natural language prompting baselines. On VirtualHome, our method achieves a new state-of-the-art success rate of 56%. In addition, our approach reduces input and output token usage by 55-87% and 41-70%, respectively, underscoring the importance of token-aware evaluation metrics in the development of scalable multi-agent LLM systems. The code and resources are available at: https://anonymous.4open.science/r/CodifyingAgent-5A86

Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 21 of its 24 references that are in the map. First posted on arXiv 4 Jul 2025.

Builds on

21 of 24 references.

Closest ancestors · 2

Same direction, newest first

  1. 2025Optimizing Token Consumption in LLMs: A Nano Surge Approach for Code Reasoning Efficiency22 Apr
  2. 2024Language Models as Compilers: Simulating Pseudocode Execution Improves Algorithmic Reasoning in Language Models3 Apr

Other references · 19

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  2. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  3. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
  4. 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,211
  5. 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversationcited by 1,988
  6. 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,808
  7. 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,395
  8. 2023GAIA: a benchmark for General AI Assistantscited by 1,128
  9. 2022Inner Monologue: Embodied Reasoning through Planning with Language Modelscited by 1,081
  10. 2022PAL: Program-aided Language Modelscited by 652
  11. 2022ProgPrompt: Generating Situated Robot Task Plans using Large Language Modelscited by 611
  12. 2024Executable Code Actions Elicit Better LLM Agentscited by 564
7 more
  1. 2023Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Modelscited by 560
  2. 2023Solving Challenging Math Word Problems Using GPT-4 Code Interpreter with Code-based Self-Verificationcited by 166
  3. 2023Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Modelscited by 92
  4. 2024MegaAgent: A Large-Scale Autonomous LLM-based Multi-Agent System Without Predefined SOPscited by 47
  5. 2024Grounding LLMs For Robot Task Planning Using Closed-loop State Feedbackcited by 25
  6. 2024Unlocking Reasoning Potential in Large Langauge Models by Scaling Code-form Planningcited by 25
  7. 2025Talk Structurally, Act Hierarchically: A Collaborative Framework for LLM Multi-Agent Systemscited by 17

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 3; 2026: 6.

9 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024AgentKit: Structured LLM Reasoning with Dynamic Graphs
  2. 2026Hierarchical LLM-Based Multi-Agent Framework with Prompt Optimization for Multi-Robot Task Planning
  3. 2024Textualized Agent-Style Reasoning for Complex Tasks by Multiple Round LLM Generation
  4. 2024Understanding the planning of LLM agents: A survey
  5. 2025HALO: Hierarchical Autonomous Logic-Oriented Orchestration for Multi-Agent LLM Systems
  6. 2025Reasoning-Aware Prompt Orchestration: A Foundation Model for Multi-Agent Language Model Coordination
  7. 2025LLM-based Agentic Reasoning Frameworks: A Survey from Methods to Scenarios
  8. 2026Unifying Temporal and Structural Credit Assignment in LLM-Based Multi-Agent Prompt Optimization