CodeAgents: A Token-Efficient Framework for Codified Multi-Agent Reasoning in LLMs
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
- 2025Optimizing Token Consumption in LLMs: A Nano Surge Approach for Code Reasoning Efficiency22 Apr
- 2024Language Models as Compilers: Simulating Pseudocode Execution Improves Algorithmic Reasoning in Language Models3 Apr
Other references · 19
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,211
- 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversationcited by 1,988
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,808
- 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,395
- 2023GAIA: a benchmark for General AI Assistantscited by 1,128
- 2022Inner Monologue: Embodied Reasoning through Planning with Language Modelscited by 1,081
- 2022PAL: Program-aided Language Modelscited by 652
- 2022ProgPrompt: Generating Situated Robot Task Plans using Large Language Modelscited by 611
- 2024Executable Code Actions Elicit Better LLM Agentscited by 564
7 more
- 2023Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Modelscited by 560
- 2023Solving Challenging Math Word Problems Using GPT-4 Code Interpreter with Code-based Self-Verificationcited by 166
- 2023Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Modelscited by 92
- 2024MegaAgent: A Large-Scale Autonomous LLM-based Multi-Agent System Without Predefined SOPscited by 47
- 2024Grounding LLMs For Robot Task Planning Using Closed-loop State Feedbackcited by 25
- 2024Unlocking Reasoning Potential in Large Langauge Models by Scaling Code-form Planningcited by 25
- 2025Talk Structurally, Act Hierarchically: A Collaborative Framework for LLM Multi-Agent Systemscited by 17
Built on by
Citing papers per year: 2025: 3; 2026: 6.
9 papers.
- 2026Toward Efficient Agents: Memory, Tool learning, and Planningcited by 16
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 15
- 2025More with Less: An Empirical Study of Turn-Control Strategies for Efficient Coding Agentscited by 8
- 2026EET: Experience-Driven Early Termination for Cost-Efficient Software Engineering Agentscited by 7
- 2026Token Economics for LLM Agents: A Dual-View Study from Computing and Economicscited by 6
- 2026PatchBoard: Schema-Grounded State Mutation for Reliable and Auditable LLM Multi-Agent Collaborationcited by 3
- 2026The Best Programming Language for Tokenmaxxing: An Investigation of Coding Agent Behavior Across Programming Languagescited by 1
- 2025Tractable Asymmetric Verification for Large Language Models via Deterministic Replicabilitycited by 0
- 2026LEGIT: Credentialing Protocol for Trustworthy AI Agent Marketplacescited by 0
- 2026LEGIT: Credentialing Protocol for Trustworthy AI Agent Marketplaces18 Sep 2026
- 2026The Best Programming Language for Tokenmaxxing: An Investigation of Coding Agent Behavior Across Programming Languages24 Jul 2026
- 2026PatchBoard: Schema-Grounded State Mutation for Reliable and Auditable LLM Multi-Agent Collaboration28 May 2026
- 2026Token Economics for LLM Agents: A Dual-View Study from Computing and Economics9 May 2026
- 2026Toward Efficient Agents: Memory, Tool learning, and Planning20 Jan 2026
- 2026EET: Experience-Driven Early Termination for Cost-Efficient Software Engineering Agents9 Jan 2026
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025More with Less: An Empirical Study of Turn-Control Strategies for Efficient Coding Agents19 Oct 2025
- 2025Tractable Asymmetric Verification for Large Language Models via Deterministic Replicability14 Sep 2025
Similar, not cited
Close in wording, no citation either way
- 2024AgentKit: Structured LLM Reasoning with Dynamic Graphs
- 2026Hierarchical LLM-Based Multi-Agent Framework with Prompt Optimization for Multi-Robot Task Planning
- 2024Textualized Agent-Style Reasoning for Complex Tasks by Multiple Round LLM Generation
- 2024Understanding the planning of LLM agents: A survey
- 2025HALO: Hierarchical Autonomous Logic-Oriented Orchestration for Multi-Agent LLM Systems
- 2025Reasoning-Aware Prompt Orchestration: A Foundation Model for Multi-Agent Language Model Coordination
- 2025LLM-based Agentic Reasoning Frameworks: A Survey from Methods to Scenarios
- 2026Unifying Temporal and Structural Credit Assignment in LLM-Based Multi-Agent Prompt Optimization