Toward Formalizing LLM-Based Agent Designs through Structural Context Modeling and Semantic Dynamics Analysis
Haoyu Jia, Kento Kawaharazuka, Kei Okada
TL;DR
The paper addresses fragmentation in LLM-based agent literature by introducing a formal, implementation-agnostic Structural Context Model (SCM) and a complementary Semantic Dynamics Analysis (SDA) to analyze, compare, and iteratively improve agent designs. By modeling agents as sequences of context patterns and employing dynamic semantics, the authors unify memory, RAG, ICL, and multi-agent collaboration within a single framework and demonstrate a closed-loop workflow via ContextCompose. A substantial case study on dynamic monkey–banana scenarios shows that the PlanORN design—combining planning, on-demand reasoning, and notes—achieves robust performance across increasing task difficulty, outperforming several baselines. The work highlights a path toward data-driven, reusable context patterns and principled agent engineering, with implications for scalable, implementation-independent agent science and practice.
Abstract
Current research on large language model (LLM) agents is fragmented: discussions of conceptual frameworks and methodological principles are frequently intertwined with low-level implementation details, causing both readers and authors to lose track amid a proliferation of superficially distinct concepts. We argue that this fragmentation largely stems from the absence of an analyzable, self-consistent formal model that enables implementation-independent characterization and comparison of LLM agents. To address this gap, we propose the \texttt{Structural Context Model}, a formal model for analyzing and comparing LLM agents from the perspective of context structure. Building upon this foundation, we introduce two complementary components that together span the full lifecycle of LLM agent research and development: (1) a declarative implementation framework; and (2) a sustainable agent engineering workflow, \texttt{Semantic Dynamics Analysis}. The proposed workflow provides principled insights into agent mechanisms and supports rapid, systematic design iteration. We demonstrate the effectiveness of the complete framework on dynamic variants of the monkey-banana problem, where agents engineered using our approach achieve up to a 32 percentage points improvement in success rate on the most challenging setting.
