---
title: 'StructuredAgent: Structured LLM Architectures'
url: https://www.emergentmind.com/topics/structuredagent
type: topic
---

# StructuredAgent: Structured LLM Architectures

Searching arXiv for the most relevant papers on “StructuredAgent” and closely related structured agent frameworks.
STRUCTUREDAGENT denotes a class of large-language-model agent designs in which reasoning, control flow, memory, action selection, or supervision is given an explicit structure rather than being left to unconstrained prompt continuation. In recent arXiv literature, the term appears both as a proper system name and as a broader architectural pattern. One usage refers to a hierarchical web agent with dynamic AND/OR planning and structured memory; another refers to a role-specialized self-evolving agent for strategic gameplay; and closely related work applies the same principle to span-aware distillation, typed execution graphs, explicit ledgers, semantic memory graphs, structured action spaces over ASTs, and deterministic harness programs [2603.05294] [2506.04651] [2505.13820] [2602.17902] [2606.20529] [2601.15709] [2604.05407] [2606.15874]. This suggests that STRUCTUREDAGENT is best understood as a family of structure-aware agent architectures whose shared objective is to improve reliability, efficiency, interpretability, and deployability.

## 1. Named systems and conceptual scope

Recent work uses the label across multiple, non-identical systems. The common denominator is not a single canonical implementation, but the introduction of explicit intermediate representations, typed interfaces, or programmatic control.

| Usage | Primary structure | Domain |
|---|---|---|
| Structured Agent Distillation | `[REASON]` / `[ACT]` spans | ReAct-style agents |
| StructuredAgent / AgentEvolver | Specialist sub-agents in a persistent workspace | Settlers of Catan |
| STRUCTUREDAGENT | Dynamic AND/OR tree + structured memory | Long-horizon web tasks |

In "Structured Agent Distillation for Large Language Model" [2505.13820], teacher trajectories are segmented into reasoning and action spans, and the student is trained with span-specific losses so that compression preserves both reasoning fidelity and action consistency. In "Agents of Change: Self-Evolving LLM Agents for Strategic Planning" [2506.04651], the highest-level architecture comprises six LLM-driven sub-agents exchanging messages in a persistent workspace, with an Evolver agent orchestrating Analyzer, Researcher, Strategizer, Coder, and Player roles. In "STRUCTUREDAGENT: Planning with AND/OR Trees for Long-Horizon Web Tasks" [2603.05294], the core system combines an online hierarchical planner with a structured memory module that tracks candidate entities and the subset of user constraints each satisfies.

Related frameworks broaden the concept. Agentic Problem Frames formalizes structured specification through the Agentic Job Description and the Act–Verify–Refine loop [2602.19065]. Agentic Programming moves all loops, branches, sequencing, retries, and parallel dispatch into ordinary code and treats the LLM as an invoked component rather than an orchestrator [2606.15874]. LedgerAgent externalizes task state into an explicit ledger and uses deterministic policy gates before environment-changing tool calls [2606.20529]. AgentSM stores prior Text-to-SQL trajectories as structured programs rather than raw scratchpads [2601.15709]. El Agente Gráfico embeds an LLM router inside a typed execution environment backed by a dynamic knowledge graph [2602.17902]. CODESTRUCT reframes repository interaction as a structured action space over AST entities [2604.05407]. TabAgent replaces closed-set generative decision heads with a compact textual-tabular classifier trained on execution traces [2602.16429].

## 2. Planning and control-flow organization

A central theme in STRUCTUREDAGENT work is that long-horizon reliability depends on how control flow is represented. The web-oriented STRUCTUREDAGENT models browsing as a POMDP $(O,S,A,R,T,p_0,\gamma)$ in which observations include the task description, past summaries, the current HTML DOM, and metadata, while actions include both atomic browser operations and higher-level “think” outputs [2603.05294]. Its planner maintains an explicit tree whose nodes are typed as AND, OR, or ACTION. AND nodes represent conjunctive subgoals; OR nodes represent alternative strategies; ACTION nodes are leaves corresponding to browser commands. Execution proceeds through a modified DFS over stack entries $(n,\sigma)$ with $\sigma \in \{\text{ENTERING}, \text{EXITING}, \text{FAILED}\}$, plus node-status labels UNVISITED, VISITED, SUCCESS, FAIL, PRUNED, and DELETED. For OR nodes, the highest-scoring unexplored child is selected by $i^\*=\arg\max_i s_i$ [2603.05294].

The Catan system uses a different structural decomposition. Its “evolution” is not gradient-based; it proceeds in discrete cycles. In the PromptEvolver loop, the current prompt is evaluated over $N=5$ games, Analyzer summarizes failures, Evolver and Researcher refine the prompt, and the loop runs for 10 iterations before the final best prompt is tested for 10 games on the full map. In the AgentEvolver loop, Evolver supplies Player code, runs 10 games, Analyzer diagnoses weaknesses, Researcher and Strategizer propose changes, Coder rewrites the code, and the best policy is retained by $\arg\max_i V_i$, where $V_i$ is average victory points after iteration $i$ [2506.04651].

Agentic Problem Frames frames control as a closed-loop engineering problem rather than a prompt-design problem. Dynamic specification is written as
$$
(E_t, C_t)\xrightarrow{M} S_t,
$$
where $E_t$ is the incoming event, $C_t$ is jurisdictional context and injected domain knowledge, $M$ is the stochastic agent, and $S_t$ is the concrete execution specification. Actions are described Hoare-style as
$$
\{S_t\}A\{K_{t+1}\},
$$
and the full Act–Verify–Refine loop is expressed as an execution-verification-refinement state evolution culminating in
$$
\lim_{t\to T}\{S_t,K_{t+1}\}\vdash R.
$$
The associated Agentic Job Description specifies Mission, Workplace, Scope, Operational Context, and Evaluation Method [2602.19065].

Agentic Programming advances a stronger separation between probabilistic reasoning and deterministic orchestration. The harness program implements all loops, branches, sequencing, error handling, retries, and parallel dispatch, while the LLM is invoked only at decorated call sites where uncertain reasoning or generation is needed [2606.15874]. The resulting execution graph is a DAG. The paper contrasts flat-log orchestrator growth,
$$
L_{\text{flat}}(S)=O(S\times \bar t),
$$
with DAG-scoped context,
$$
L_{\text{DAG}}(d)\le d\cdot \bar t + (d-1)\cdot \bar m,
$$
and also contrasts sampled control-flow correctness $P_{\text{success}}=p^S$ with harness-enforced deterministic control $p_{\text{control}}=1$ [2606.15874]. A plausible implication is that a major branch of STRUCTUREDAGENT research treats architectural control allocation, not just prompt quality, as the primary determinant of long-horizon stability.

## 3. State, memory, and knowledge representation

Another defining property of structured agents is that task state is represented explicitly rather than reconstructed from raw transcripts.

In the web-planning STRUCTUREDAGENT, the structured memory module is a candidate-by-constraint table $M$. Each row corresponds to a candidate entity and each column to a user constraint or attribute such as price, rating, color, or brand. Entries are discrete:
$$
M_{i,j}=1 \text{ if candidate } i \text{ is known to satisfy constraint } j,
$$
and candidate ranking uses
$$
\text{score}(i)=\sum_j M_{i,j}.
$$
New observations update the table through an `UpdateMemory` step, and the top-$K$ candidates are selected by total constraints satisfied [2603.05294].

AgentSM generalizes structured memory from tables to program graphs. A memory item $m$ is represented as a labelled directed graph
$$
G_m=(V_m,E_m,\lambda_V,\lambda_E),
$$
whose nodes denote actions such as schema-read or SQL-execute and intermediate results such as a DataFrame. The memory store is $\mathcal{M}=\{m_1,\dots,m_N\}$, indexed by a function $I:(\mathcal{Q}\cup\mathcal{M})\to\mathbb{R}^d$, with retrieval defined as top-$k$ by similarity [2601.15709]. At inference, AgentSM interleaves question understanding, memory retrieval or synthesis, reasoning plus tool use, and final SQL generation. When a new trajectory is completed, it is appended to memory as $\mathcal{M}\leftarrow \mathcal{M}\cup\{\tau\}$ [2601.15709].

LedgerAgent defines state as an explicit typed dictionary, the ledger, formalized as a partial function
$$
L:\mathcal{P}\to\mathcal{R},
$$
from canonical schema paths to tool-returned values [2606.20529]. Only successful read-tool returns are stored, and writes are never assumed; they must be re-observed by a subsequent read. Environment-changing tools are guarded by predicates $\pi_t:(L,\text{args}_t)\to\{\text{allow},\text{revise},\text{block}\}$, and the ledger is rendered into each prompt as a deterministic state block [2606.20529]. This isolates a recurrent agent failure mode: acting on stale or implicit state despite having previously observed the relevant facts.

El Agente Gráfico extends explicit state into typed scientific execution graphs. A workflow is modeled as
$$
G=(\mathcal{N},\mathcal{E}),
$$
with typed nodes such as Start, Action, Router, Validate, and End, and typed edges such as next, on_success, on_failure, parallel, and join [2602.17902]. Each node has a Pydantic schema constraining input and output object types, and each object is associated with a stable IRI and can be persisted in Blazegraph with PROV-O and PAV ontologies. The object–graph mapper binds Python dataclasses or Pydantic models to ontology classes, enabling lazy loading and bidirectional rehydration from RDF triples [2602.17902].

TS-Agent represents financial time-series modeling context as
$$
C_t=(M_t,E,T),
$$
where $M_t=\{(S_v,I_v)\}_{v\le t}$ is experimental memory, $E=\{\text{Case Bank }C,\text{ Code Base }B,\text{ Refinement Bank }R\}$ is a structured knowledge bank, and $T$ is the task description [2508.13915]. Stage 1 uses case-based model pre-selection, Stage 2 applies code edits and accepts only validation-improving changes, and Stage 3 refines hyperparameters. This suggests that structured state is not merely episodic memory; it often functions as a persistent substrate for acceptance tests, provenance, and iterative refinement.

## 4. Structured supervision, action spaces, and typed interfaces

Structure also appears at the level of supervision targets and action representation.

Structured Agent Distillation formalizes teacher trajectories as interleaved reasoning and action tokens. After linearization,
$$
\tau'=[\text{REASON}]\, r_1 \dots r_k [\text{ACT}]\, a_1 \dots a_m,
$$
token masks identify reasoning and action positions by $m_r(t)$ and $m_a(t)$, with tokens outside both spans masked out of all losses [2505.13820]. The student is trained with span-specific KL objectives:
$$
L_{\text{CoT}}=\sum_{t=1}^T m_r(t)\cdot KL(p_T(x_t)\|p_S(x_t)),
$$
$$
L_{\text{Act}}=\sum_{t=1}^T m_a(t)\cdot KL(p_T(x_t)\|p_S(x_t)),
$$
and
$$
L_{\text{total}}=\lambda_r L_{\text{CoT}}+\lambda_a L_{\text{Act}},
$$
typically with $\lambda_r=\lambda_a=1.0$ [2505.13820]. Detection is rule-based: for ALFWorld and WebShop, “Reasoning:” lines belong to $\tau^{(r)}$ and “Action:” lines to $\tau^{(a)}$; for HotPotQA-ReAct, everything before the final “Answer:” is $\tau^{(r)}$ and the “Answer:” line is $\tau^{(a)}$ [2505.13820].

CODESTRUCT imposes structure directly on the action space of code agents. The repository state is the set of full ASTs,
$$
S=\{\tau:\tau \text{ is the full AST of a code repository}\},
$$
and the action set is
$$
A=\{\texttt{readCode}(\sigma),\texttt{editCode}(\omega,\sigma,r)\},
$$
where $\sigma$ is a selector, $\omega\in\{\text{insert},\text{replace},\text{remove}\}$, and $r$ is replacement or insertion code [2604.05407]. The transition function $\phi(\tau_t,a_t)$ either returns a syntactically valid updated AST or the original AST with an error flag. `readCode` returns complete syntactic units or summaries; `editCode` applies syntax-validated transformations to named AST entities rather than brittle text spans [2604.05407].

TabAgent replaces repeated generative decision heads with a learned discriminative head. TabSchema extracts schema, state, and dependency features from decision steps; TabSynth generates a budget of $B=10$ schema-compliant synthetic feature vectors for rare patterns; and TabHead is a 50 M-parameter textual-tabular classifier that scores candidates with
$$
h=\text{Encoder}_{\text{text}}(y_{\text{text}})\,\|\, x,\qquad
p_\theta(o|x)=\frac{\exp(s_\theta(o|x))}{\sum_{o'\in C}\exp(s_\theta(o'|x))}.
$$
The training objective is multi-class cross-entropy over the invoked tools [2602.16429]. This is a structured-agent move in a narrow but important sense: runtime open-ended generation is replaced by a one-shot classifier over explicit feature vectors.

A further example of typed structure appears in AgenticAITA’s Sequential Deliberative Pipeline. Inter-agent communication is mediated by JSON contracts, and the Risk Manager applies hard gates before any execution: the signal must be in `{"long","short"}`, confidence must be at least `0.60`, the relative stop-loss distance must satisfy $|entry-stop\_loss|/entry \le 0.02$, and `size_usd` must be at most `500 USD` [2605.12532]. The pipeline is serialized by a mutex-based Inference Gating Protocol with `GLOBAL_COOLDOWN = 1800 s` [2605.12532]. Across these systems, the recurring design choice is to move from free-form text interfaces toward typed spans, JSON contracts, AST selectors, or feature schemas.

## 5. Empirical performance across domains

The empirical literature reports gains along several axes: task success, consistency, constraint satisfaction, token efficiency, latency, and auditability.

For span-aware distillation, experiments on ALFWorld, HotPotQA-ReAct, and WebShop show consistent improvements over token-level distillation and imitation baselines [2505.13820]. In the GPT-2 1.5B to student setting, a 120M student improves Task Success from `39.4` to `43.7`, CoT Match from `59.3` to `62.3`, shortens reasoning length by `∼1.2` tokens, and reduces latency by `∼0.9` steps. OPT-13B to OPT-1.3B improves Success from `47.8` to `52.3`, CoT from `61.5` to `67.2`, and Latency from `7.8` to `7.0`. LLaMA-13B to LLaMA-7B improves Success from `64.2` to `68.0`, CoT from `73.0` to `77.2`, and Latency from `6.7` to `6.4` [2505.13820]. On ALFWorld with a 340M student, removing REASON loss lowers success by `3.6pp`, removing ACT loss lowers success by `6.8pp`, removing segmentation lowers success by `8.1pp`, and random masks are worst; scaling results indicate that span-aware distillation recovers `≥90%` of teacher performance at larger sizes [2505.13820].

For strategic gameplay in Catan, the manually crafted StructuredAgent improves over BaseAgent for GPT-4o from `3.60` to `3.80` (`+6%`) and for Claude 3.7 from `3.70` to `4.10` (`+11%`), while Mistral drops from `3.60` to `2.50` (`−31%`) [2506.04651]. PromptEvolver reaches `4.40` (`+22%`) for GPT-4o and `7.20` (`+95%`) for Claude 3.7. Figure 3a reports that self-evolving agents tend to prolong matches, with Claude 3.7 PromptEvolver at approximately `135` turns versus BaseAgent at approximately `81` [2506.04651]. The paper does not report formal statistical tests beyond averaging and percent-change calculations [2506.04651].

For long-horizon web tasks, STRUCTUREDAGENT achieves `83.3%` on Amazon Easy versus AgentOccam’s `69.2%`, a `+14.1` point gain; on Amazon Hard under human evaluation, StructuredAgentMem reaches `37.8%` versus `28.4%`, a `+9.4` point gain [2603.05294]. On WebVoyager Easy, StructuredAgent records `78.3%` versus AgentOccam’s `79.8%`, a `−1.5` point difference. On WebArena, overall success is `52.6%` versus `46.4%`, with Shopping at `52.8%` versus `38.0%` and Reddit at `72.6%` versus `60.1%` [2603.05294]. Ablation indicates that removing the AND/OR structure lowers overall WebArena performance by approximately `5–7` points, and on Amazon Hard the memory module adds `+5` points under human evaluation while raising multi-item constraint satisfaction from `83%` to `92%` [2603.05294].

AgentSM reports a state-of-the-art execution accuracy of `44.8%` on Spider 2.0 Lite, with `16.4` steps, `300k` input tokens, `5k` output tokens, and `247.1` seconds latency for the Claude-4 configuration in Table 1 [2601.15709]. On the full Spider 2.0 benchmark, AgentSM with Claude-3.7 reaches `38.4%` execution accuracy with `16.8` steps and `299 K` input tokens. Relative to its no-memory baseline, AgentSM reduces average token usage by `25%` and trajectory length by `35%` on Spider 2.0 [2601.15709]. In a 75-question ablation, Full AgentSM records `52.0%` accuracy, compared with `17.3%` for “No trajectory reading” and `16.2%` for “No composite tools” [2601.15709].

Agentic Programming reports `86.8%` overall success on OSWorld with only `15` harness-controlled steps, compared with `80.4` for Holo3-35B-A3B at `100` steps, `78.3` for OpenAPA with Gemini-3.1-pro at `100`, and `72.1` for Claude Sonnet 4.6 at `100` [2606.15874]. Its per-domain breakdown is `93.5` on Chrome, `80.0` on Multi-Apps, and `100.0` on OS [2606.15874]. El Agente Gráfico reports pass@1 of approximately `0.90` versus `0.75`, a `14×` reduction in total tokens from `1.6 M` to `100 k`, `96 %` lower API cost from `\$4.67` to `\$0.17` per run, and at least `6×` speedup in wall time from `1,800 s` to `300 s` [2602.17902].

Structured action-space and structured-state interfaces show similar patterns. CODESTRUCT improves Pass@1 on SWE-Bench Verified by `1.2–5.0%` while reducing token consumption by `12–38%` for most models, and GPT-5-nano improves by `20.8%` as empty-patch failures drop from `46.6%` to `7.2%` [2604.05407]. On CodeAssistBench, accuracy gains range from `+0.8%` to `+4.4%` with cost reductions up to `33%` [2604.05407]. TabAgent maintains task-level success on AppWorld while eliminating shortlist-time LLM calls, with latency dropping from `7.5 s` to `2.68 ms` and inference cost from `\$0.052/call` to `\$2\times 10^{-7}`, alongside `P@R \ge 0.88` on every app, `Recall@7 \ge 0.88`, and `Recall@9 \ge 0.92` [2602.16429]. LedgerAgent improves average pass\(^1\) by approximately `+3–7` points on open-weight backbones, adds `+12.2` points for GPT-4.1 and `+15.5` for GPT-5.2 on average in airline and retail, and exceeds IRMA by `+3.7` points in pass\(^1\) and `+7.4` points in pass\(^4\), without any extra LLM calls or token overhead [2606.20529]. TS-Agent reports `100 %` success rate across all runs and LLMs, while improving forecasting RMSE over AutoGluon from `0.223` to `0.206` on Crypto, from `0.0089` to `0.0068` on Exchange, and from `8.430` to `8.017` on Stock; in generation, Correlation $\ell_2$ improves over Optuna from `2.114` to `1.874` on Exchange and from `1.530` to `1.194` on Stock [2508.13915]. AgenticAITA’s five-day dry run records `157` admitted triggers across `76` assets, `13` Analyst self-abstentions (`8.3%`), `5` hard-gate rejections (`3.2%`), `139` completed trades, and an agentic friction rate of approximately `11.5%` [2605.12532].

## 6. Limitations, misconceptions, and future directions

A recurring misconception in agent research is that stronger backbones or better prompts alone suffice to produce reliable agents. Several structured-agent papers explicitly dispute that view. Agentic Programming argues that token explosion, control-flow hallucination, and unreliable completion are architectural consequences of assigning deterministic control flow to a probabilistic system [2606.15874]. Agentic Problem Frames similarly argues that reliability stems from rigorous engineering structures that anchor stochastic AI within deterministic business processes rather than from a model’s internal reasoning alone [2602.19065]. This suggests that STRUCTUREDAGENT research is partly a critique of frameless, prompt-centric agent design.

The limitations are equally explicit. Structured Agent Distillation relies on rule-based, text-only segmentation and does not yet handle multimodal agents or long-term memory or external state [2505.13820]. The Catan self-evolution framework is computationally expensive, depends strongly on backbones such as Claude 3.7 and GPT-4o, and lacks persistent symbolic memory for truly long-term strategy integration [2506.04651]. The web STRUCTUREDAGENT’s DFS search can grow large, repair and expansion depend on LLM quality, and structured memory can add latency or noise on short tasks [2603.05294]. AgentSM uses coarse question-to-trajectory retrieval, faces memory growth and pruning issues, and its single-agent design may limit parallel exploration [2601.15709]. LedgerAgent requires hand-written predicates and path maps, depends on well-defined schemas, and can increase prompt size and infrastructure complexity [2606.20529]. APF notes further trade-offs: overly narrow context can stifle flexibility, external feedback paths may be slow or unavailable, memory stores must be managed, and non-convergent verification loops can stall the system [2602.19065].

Future work follows the same structural logic. Distillation papers propose learned or soft segmentation, hierarchical spans, multimodal distillation, and trajectory-level contrastive or reinforcement objectives [2505.13820]. The Catan work suggests adding roles such as a Negotiator and transferring the architecture to other games and planning domains [2506.04651]. Web planning work points toward admissible heuristics, cost pruning, learning-based child ranking, offline fine-tuning on recorded trees, and richer action wrappers [2603.05294]. AgentSM proposes fine-grained retrieval, hierarchical memory, multi-agent shared memory, and automatic memory curation [2601.15709]. LedgerAgent proposes automatic predicate induction, schema learning, multi-modal ledgers, tighter planning integration, and hierarchical state and memory [2606.20529].

Taken together, these directions preserve the central thesis of STRUCTUREDAGENT research: agent performance on long-horizon, tool-rich, policy-constrained tasks improves when reasoning traces, decision heads, memories, control flow, and state transitions are made explicit, typed, and auditable rather than left implicit in a growing prompt.

Source: https://www.emergentmind.com/topics/structuredagent