arXiv:2611.01870cs.MANov 2026

Manuscript Offprint

arXiv:2611.01870

Automated Stateful Specialization for Adaptive Agent Systems

Myan Vu, Harrish Ayyanar, Jiang Pang, Anwiketh Reddy, Mayank Goel

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Current automated agent design frameworks produce either static workflows that lack adaptability or per-query optimizers that prevent the accumulation of deep, agent-level task expertise. We propose a new direction that reconciles these paradigms: creating stateful teams of specialist agents that accumulate knowledge over time and can be reconfigured for novel tasks entirely without human intervention. To this end, we introduce ASPEC, a framework that manages this full agent lifecycle by first autonomously discovering specialist archetypes via evolutionary search and then cultivating their expertise through experience, mirroring how human experts learn through practice and reflection. We further introduce a lightweight hierarchical control policy, "retain-then-escalate," which governs when to leverage the established agent system versus when to adapt its structure. Through comprehensive experiments, we demonstrate that this approach leads to significant performance gains on expert-level scientific benchmarks like GPQA while matching the state-of-the-art on broader domain tasks, demonstrating a promising path toward agent systems that are simultaneously expert, adaptive, and efficient. We will release the code at https://github.com/myanvoos/ASpec.

1 INTRODUCTION

Motivation. The emergence of sophisticated multi-agent systems capable of tackling complex problems (Wu et al., 2024; Li et al., 2023; Hong et al., 2024) has marked a significant advance for autonomous agents. While effective, these foundational systems were often manually hand-crafted for specific tasks, which limited their scalability. In response, research has shifted towards automating aspects of these systems, starting with prompt optimization (Khattab et al., 2024; Yuksekgonul et al., 2025; Yang et al., 2024) or inter-agent communication via graph-based workflow representations (Zhuge et al., 2024; Liu et al., 2024; Zhang et al., 2025a), and then, to the designs of agent systems themselves. The automation of agent designs has since largely split into two distinct paradigms: task-level optimization and query-level adaptation. In the case of (I) Task-Level Architecture Search, prior works optimized for a single, static agent workflow for a specific task domain. These approaches, which mirror early approaches in AutoML and Neural Architecture Search (NAS) (Elsken et al., 2019), were pioneered by ADAS (Hu et al., 2025), which uses Meta Agent Search to iteratively program new agents in executable code; AFlow (Zhang et al., 2025b), which similarly adopts code representation but utilizes Monte Carlo Tree Search (MCTS) to efficiently navigate the search space; and AgentSquare (Shang et al., 2025), which employs module evolution and recombination to discover novel configurations in a constrained, modular code-based search space. The primary limitation of these methods is their intrinsic "one-size-fits-all" nature: by searching for a single best design for an entire task domain, they fundamentally lack the adaptability necessary to dynamically allocate inference resources or customize the structure for individual user queries.

To address the rigidity of task-level systems, a recent paradigm shift has focused on generating a unique workflow for each incoming query, (II) Query-Level Architecture Adaptation. MaAS (Zhang et al., 2025c) introduces the concept of an "agentic supernet", optimizing a probabilistic distribution of agent architectures during training and sampling a bespoke architecture from said distribution for each query during inference. This paradigm has been extended by other methods

¹Corresponding author: myanvoos@gmail.com like FlowReasoner (Gao et al., 2025), which uses a reasoning-based meta-agent to generate query-specific agent systems; ScoreFlow (Wang et al., 2025), which introduces Score-DPO, a method that fine-tunes its per-query workflow generator using quantitative evaluation scores; MAS-GPT (Ye et al., 2025), which trains an LLM to treat workflow construction as a generative task; and MAS-Zero (Ke et al., 2025), which employs a meta-agent at inference time to iteratively generate and refine agent configurations based on self-generated feedback. While these approaches offer superior adaptivity, they are challenged by the lack of long-term state. Because the architecture is regenerated or resampled for every query, the system incurs a significant "rediscovery" cost, and the individual components or agents are largely prevented from accumulating deep, persistent expertise over time.

The prior work demonstrate a critical chasm between monolithic, task-level robustness and adaptive, per-query regeneration. The former is static at inference, while the latter incurs "rediscovery" costs by repeatedly invoking meta-agents for architectural search in lieu of leveraging persistent knowledge, a system-level problem that a modular, agent-level memory addition would fail to address. Our proposed framework, ASPEC, reconciles these limitations by integrating the specialized mechanisms of self-evolving agents into a unified lifecycle within agent design automation. This lifecycle establishes stable, persistent agent archetypes deployed by a "retain-then-escalate" control policy, allowing the system to default to efficient and effective execution by relying on the persistent knowledge of its specialist agents.

Contributions. In short, our core contributions are as follows:

  • We propose ASPEC, a framework that manages the full lifecycle of expert specialist agents via an automated two-stage methodology: (I) Discovery, where an LLM autonomously explores the design space of agent archetypes using evolutionary processes, and (II) Cultivation, where selected agents autonomously cultivate their expertise on a training corpus.
  • We introduce "retain-then-escalate", a control policy that, instead of being either fully static or fully dynamic, defaults to retaining a stateful agent team across related queries to leverage expertise and minimize cost, only escalating to architectural resampling when needed.

Related Work. The mechanisms for autonomous discovery and expertise cultivation as seen in self-evolving agents have been explored individually across various research efforts. For instance, parallel to workflow optimization, a distinct stream of research has explored agent specialization via prompt optimization, starting with role assignment via ExpertPrompting (Xu et al., 2025), PromptBreeder (Fernando et al., 2023), and PromptAgent (Wang et al., 2024a). Multi-agent frameworks like EvoAgent (Yuan et al., 2025), which utilizes evolutionary algorithms to automatically generate and optimize multiple specialized agents with diverse settings and roles; MASS (Zhou et al., 2025), which optimizes individual role prompts alongside refining inter-agent communication; and AgentVerse (Chen et al., 2024a) and AutoAgents (Chen et al., 2024b), which dynamically synthesize and coordinate teams of expert roles, validate a critical insight: the identity of the agents is as important as their interaction topology. However, this specialization is often stateless, and the focus remains on generating an optimal team for a single task. In contrast, ASPEC's Discovery process generates persistent specialists whose structures are specifically designed to be retained and cultivated over time rather than generated for transient collaboration or discarded after a single optimization run.

Another stream of research in self-evolving agents is expertise cultivation, focused on endowing agents with non-parametric state (memory and experience) that persists beyond a single task interaction. Such mechanisms are embodied by works like Reflexion (Shinn et al., 2023), which allows agents to record natural-language critiques of their past actions in episodic memory to guide future behavior and avoid recurring mistakes, and Self-Refine (Madaan et al., 2023), which employs a continuous iterative refinement loop where the agent critiques and revises its initial outputs. Furthermore, ExpeL (Zhao et al., 2024) processes past trajectories to generate insights and rules to guide further interactions, AutoGuide (Fu et al., 2024) automatically generates context-aware guidelines from offline experiences, facilitating the provision of relevant knowledge for active decision-making processes, while Agent Workflow Memory (Wang et al., 2024b) records common subtask sequences that can be retrieved and reused without re-planning from scratch. These prior works illustrate how experiential knowledge can be accumulated and generalized into long-term competence.

While memory systems and reflection mechanisms exist, ASPEC proposes a systematic, two-stage lifecycle framework where the Cultivation phase is explicitly linked to the output of the Discovery phase. This linkage ensures that the stateful expertise (memory/reflections) is accumulated within the designated, persistent specialist archetypes, facilitating the emergence of role-specific expertise.