mlsanityData to 7 Oct 2026

MOSS: Enabling Code-Driven Evolution and Context Management for AI Agents

arXiv 2409.16120 ↗First posted 24 Sep 2024cs.SE cs.AI cs.CLcited by 2

On the map: LLM agents and tool use → General LLM agent frameworks and benchmarks

Abstract (arXiv)

Developing AI agents powered by large language models (LLMs) faces significant challenges in achieving true Turing completeness and adaptive, code-driven evolution. Current approaches often generate code independently of its runtime context, relying heavily on the LLM's memory, which results in inefficiencies and limits adaptability. Manual protocol development in sandbox environments further constrains the agent's autonomous adaptability. Crucially, achieving consistency in code and context across multi-turn interactions and ensuring isolation of local variables within each interaction remains an unsolved problem. We introduce MOSS (llM-oriented Operating System Simulation), a novel framework that addresses these challenges by integrating code generation with a dynamic context management system. MOSS ensures consistency and adaptability by using a mechanism that maintains the Python context across interactions, including isolation of local variables and preservation of runtime integrity. At its core, the framework employs an Inversion of Control (IoC) container in conjunction with decorators to enforce the least knowledge principle, allowing agents to focus on abstract interfaces rather than concrete implementations. This facilitates seamless integration of new tools and libraries, enables runtime instance replacement, and reduces prompt complexity, providing a "what you see is what you get" environment for the agent. Through a series of case studies, we show how this framework can enhance the efficiency and capabilities of agent development and highlight its advantages in moving towards Turing-complete agents capable of evolving through code.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Placed in General LLM agent frameworks and benchmarks, one of 16 directions in LLM agents and tool use. Builds on 29 of its 33 references that are in the map. First posted on arXiv 24 Sep 2024.

Builds on

29 of 33 references.

Closest ancestors · 3

Same direction, newest first

  1. 2024Automated Design of Agentic Systems15 Aug
  2. 2023A Survey on Large Language Model based Autonomous Agents22 Aug
  3. 2023AgentVerse: Facilitating Multi-Agent Collaboration and Exploring Emergent Behaviors21 Aug

Other references · 26

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023GPT-4 Technical Reportcited by 18,132
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  5. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  6. 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 1,908
  7. 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,880
  8. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
  9. 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
  10. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  11. 2024The AI Scientist: Towards Fully Automated Open-Ended Scientific Discoverycited by 1,002
  12. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 956
14 more
  1. 2022PAL: Program-aided Language Modelscited by 635
  2. 2024Executable Code Actions Elicit Better LLM Agentscited by 537
  3. 2023ToolAlpaca: Generalized Tool Learning for Language Models with 3000 Simulated Casescited by 383
  4. 2023MINT: Evaluating LLMs in Multi-turn Interaction with Tools and Language Feedbackcited by 293
  5. 2024AutoCodeRover: Autonomous Program Improvementcited by 272
  6. 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problemscited by 256
  7. 2024Self-Organized Agents: A LLM Multi-Agent Framework toward Ultra Large-Scale Code Generation and Optimizationcited by 84
  8. 2024MindSearch: Mimicking Human Minds Elicits Deep AI Searchercited by 65
  9. 2024Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Explorationcited by 58
  10. 2024AI-Driven Review Systems: Evaluating LLMs in Scalable and Bias-Aware Academic Reviewscited by 42
  11. 2024Diversity Empowers Intelligence: Integrating Expertise of Software Engineering Agentscited by 35
  12. 2024On the Diagram of Thoughtcited by 16
  13. 2024Natural Language Outlines for Code: Literate Programming in the LLM Eracited by 9
  14. 2024Plan with Code: Comparing approaches for robust NL to DSL generationcited by 1

Built on by

Cited by year

Citing papers per year: 2024: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026From Translation to Superset: Benchmark-Driven Evolution of a Production AI Agent from Rust to Python
  2. 2026AgentFactory: A Self-Evolving Framework Through Executable Subagent Accumulation and Reuse
  3. 2026CaveAgent: Transforming LLMs into Stateful Runtime Operators
  4. 2026Can Large Language Models Implement Agent-Based Models? An ODD-based Replication Study
  5. 2026MOSS: Self-Evolution through Source-Level Rewriting in Autonomous Agent Systems
  6. 2026Codified Context: Infrastructure for AI Agents in a Complex Codebase
  7. 2026Closing the Consistency Gap: Self-Evolving Agents That Learn to Stay on Course
  8. 2026AdaptEvolve: Improving Efficiency of Evolutionary AI Agents through Adaptive Model Selection