cs.CEOct 26, 2026

MarkovSim: an LLM Agent Harness with Bounded Context for Long-Horizon Computational Simulation

Authors: Yeui-Lung Lei, Wen-Bo Chen, Pan Zhang

Organizations: College of Civil and Transportation Engineering, Shenzhen University, Shenzhen, 518060, China · Department of Civil and Environmental Engineering, The Hong Kong Polytechnic University, Hung Hom, Kowloon, Hong Kong, China.

Abstract

Recent studies have applied large language model (LLM) agent systems to computational simulation workflows. Such workflows are long-horizon, so the information generated can exceed what an LLM can reason over at once, its context window. Context management is therefore essential, yet existing systems have either neglected it or treated it as a supporting mechanism rather than a subject of study. This paper presents MarkovSim, an LLM agent harness for long-horizon computational simulation, whose core is a context management scheme built into the workflow. The workflow record is written to a memory system with a predefined schema, and at workflow-defined boundaries, namely the state transitions of a finite-state machine a compact representation of the solution progress is constructed from it as the agent's context. Instantiated on finite element analysis and evaluated on six benchmark problems, MarkovSim passed 16 of 18 runs and corrected its own faults in both the solver operations and the model physics. The engineer was consulted only where engineering judgement was needed. The context remained bounded throughout every run, regardless of its length.

Explore similar work

CardsList
  1. Agent-MD: Selective LLM Intervention with Event-Driven Escalation for Stateful GCMC--MD Campaigns

    Aug 7, 2026Yijie Wang, Zhen-Yu Yin, Zhenheng Tang +1LLM Agent OrchestrationScientific Workflow Automation

  2. Learning Agent-Compatible Context Management for Long-Horizon Tasks

    May 29, 2026Lu Yi, Runlin Lei, Liuyi Yao +6Long-Horizon Agent TasksLLM Context Management

  3. Can LLM Agents Sustain Long-Horizon Organizational Dynamics?

    May 31, 2026Xuancheng Zhu, Yang Yue, Shuaibing Wan +4Multi-Agent CoordinationHuman Behavior Simulation