CaveAgent: Transforming LLMs into Stateful Runtime Operators
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
LLM-based agents are increasingly capable of complex task execution, yet current agentic systems remain constrained by text-centric paradigms that struggle with long-horizon tasks due to fragile multi-turn dependencies and context drift. We present CaveAgent, a framework that shifts tool use from ``LLM-as-Text-Generator'' to ``LLM-as-Runtime-Operator.'' CaveAgent introduces a dual-stream architecture that inverts the conventional paradigm: rather than treating the LLM's text context as the primary workspace with tools as auxiliary, CaveAgent elevates the persistent Python runtime as the central locus of state, with a lightweight semantic stream serving as its orchestrator. Beyond leveraging code generation to resolve interdependent sub-tasks (e.g., loops, conditionals) in a single step, CaveAgent introduces textitStateful Runtime Management: it injects, manipulates, and retrieves complex Python objects (e.g., DataFrames, database connections) that persist across turns, unlike existing code-based approaches that remain text-bound. CaveAgent further provides a runtime-integrated skill management system that extends the Agent Skills open standard, enabling ecosystem interoperability through executable skill injections. This persistence mechanism serves as a high-fidelity external memory that reduces context drift in multi-turn interactions and preserves processed data for downstream applications without information loss. Evaluations show consistent improvement across challenging benchmarks, enabling CaveAgent to handle data scales that cause context overflow in both JSON-based and code-based agents. The accessible runtime state further provides programmatically verifiable feedback, enabling automated evaluation and reward signal generation without human annotation and establishing a structural foundation for future research in Reinforcement Learning with Verifiable Rewards (RLVR).
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 41 of its 51 references that are in the map. First posted on arXiv 4 Jan 2026.
Builds on
41 of 51 references.
Closest ancestors · 3
Same direction, newest first
- 2024Executable Code Actions Elicit Better LLM Agents1 Feb
- 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation16 Aug
- 2023ChatDev: Communicative Agents for Software Development16 Jul
Other references · 38
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2023RT-2: Vision-Language-Action Models Transfer Web Knowledge to Robotic Controlcited by 2,993
- 2023PaLM-E: An Embodied Multimodal Language Modelcited by 2,037
- 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 1,908
- 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,880
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
- 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,348
26 more
- 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,295
- 2024τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domainscited by 1,280
- 2023AgentBench: Evaluating LLMs as Agentscited by 1,211
- 2022WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agentscited by 1,197
- 2023HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Facecited by 1,173
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,057
- 2025DeepSeek-V3.2: Pushing the Frontier of Open Large Language Modelscited by 755
- 2022PAL: Program-aided Language Modelscited by 635
- 2023An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuningcited by 622
- 2023ViperGPT: Visual Inference via Python Execution for Reasoningcited by 591
- 2023API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMscited by 574
- 2025τ2-Bench: Evaluating Conversational Agents in a Dual-Control Environmentcited by 558
- 2023Augmented Language Models: a Surveycited by 398
- 2023Language Models can Solve Computer Taskscited by 371
- 2023Chameleon: Plug-and-Play Compositional Reasoning with Large Language Modelscited by 352
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
- 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 325
- 2023MINT: Evaluating LLMs in Multi-turn Interaction with Tools and Language Feedbackcited by 293
- 2024ToolSandbox: A Stateful, Conversational, Interactive Evaluation Benchmark for LLM Tool Use Capabilitiescited by 272
- 2024Tool Learning with Large Language Models: A Surveycited by 221
- 2023Emergent autonomous scientific research capabilities of large language modelscited by 127
- 2023TaskWeaver: A Code-First Agent Frameworkcited by 85
- 2024If LLM Is the Wizard, Then Code Is the Wand: A Survey on How Code Empowers Large Language Models to Serve as Intelligent Agentscited by 77
- 2024XGrammar: Flexible and Efficient Structured Generation Engine for Large Language Modelscited by 73
- 2024Achieving Tool Calling Functionality in LLMs Using Only Prompt Engineering Without Fine-Tuningcited by 6
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2024MOSS: Enabling Code-Driven Evolution and Context Management for AI Agents
- 2026AgentFactory: A Self-Evolving Framework Through Executable Subagent Accumulation and Reuse
- 2026Formal Skill: Programmable Runtime Skills for Efficient and Accurate LLM Agents
- 2024StateAct: Enhancing LLM Base Agents via Self-prompting and State-tracking
- 2026Stateless Language Agents: Scaling Long-Horizon Automated Research
- 2026Agents Learn Their Runtime: Interpreter Persistence as Training-Time Semantics
- 2026Context as an Environment: Programmatic Context Management for Long-Horizon Agents
- 2026Turn: A Language for Agentic Computation