Source-linked AI summary

FlowState: Execution State as Memory for Long-Horizon LLM Agents

Minghao Li, Bangyan Li, Zifan Wang, Yulong Li, Hu Xu, Gan Zhang, Jingtong Wu, Wenqiang Xu

arXiv:2609.34565v2cs.AI

TL;DR

Long-horizon agents need to reuse information from earlier interactions, but whether execution state can unify current decisions with long-term memory remains an open question. FlowState makes execution state persistent and revisitable; against a full-context baseline, it improves average benchmark performance while reducing token consumption.

  • Problem

    Whether execution state can unify current decisions with long-term memory remains an open question, despite long-horizon tasks depending on accumulated information across subtasks and requests.

    Source: §1 · pp. 1–2
  • Method

    FlowState treats semantically typed execution states, their relations, and references to tool observations as reusable memory, updated incrementally and accessed progressively within one execution loop.

    Source: §1 · p. 2
  • Results

    4.55 and 13.95 percentage points higher average success rate on MemoryArena and average pass rate on τ 3-Bench, respectively, with 43.2% and 40.6% lower total token consumption versus the same-model full-context baseline.

    Source: §1 · p. 3
  • Takeaways & Limitations

    Experiments on MemoryArena and τ 3-Bench demonstrate the value of unifying state maintenance and historical access for long-horizon decision-making.

    Source: §5 · p. 10

Abstract

from arXiv · show

Long-horizon tasks require LLM agents to continually draw on information from earlier interactions. However, retaining the full history increases context costs, while compressing it risks losing details needed later, and the relevance of historical information often becomes apparent as the task progresses. To address these challenges, we propose FlowState, which treats execution state as memory that can be retained and revisited across requests, unifying current decision-making with the reuse of historical information. FlowState preserves semantically typed state nodes, their relations, and references to raw tool observations, separating persistent retention from on-demand access. Within a single execution loop, Incremental State Update (ISU) maintains the current state based on new inputs and feedback, while Progressive State Access (PSA) progressively reveals historical states and supporting evidence as needed during reasoning. Together, these mechanisms enable agents to reassess prior decisions in light of new information and guide subsequent actions. Compared with a full-context baseline using the same DeepSeek-V4-Flash model, FlowState improves the average success rate on MemoryArena and the average pass rate on $\tau^3$-Bench by 4.55 and 13.95 percentage points, respectively, while reducing total token consumption by 43.2% and 40.6%. These results demonstrate the performance and efficiency advantages of FlowState on long-horizon tasks.

1 INTRODUCTION

FlowState uses persistent execution states as reusable memory, connecting current decisions with historical information and evidence. Its evaluation reports higher benchmark performance with lower token consumption than a same-model full-context baseline.

1 INTRODUCTION

  • Long-horizon agents must preserve information across subtasks and requests, but full histories raise context costs and compression can discard details needed for later decisions.Historical information may become relevant only as reasoning unfolds, and retrieved records may require further examination of related states or original evidence.Source: §1 · pp. 1–2
  • FlowState makes execution states reusable memory units, representing requirements, environmental information, agent judgements, and artifacts as typed nodes linked to raw tool observations.Full contents persist in a repository, while identifiers and concise summaries form a historical index in context, separating retention from visibility.Source: §1 · pp. 2–3
  • Incremental State Update (ISU) revises current states from inputs and feedback, while Progressive State Access (PSA) retrieves historical states and traces linked evidence as needed.Both operate in one execution loop; resulting states and the updated index are retained at the end of each request.Source: §1 · pp. 2–3
  • FlowState improves MemoryArena average success rate by 4.55 percentage points and τ 3-Bench average pass rate by 13.95 percentage points, while reducing total token consumption by 43.2% and 40.6%, respectively.The comparison uses a full-context baseline with the same DeepSeek-V4-Flash model; evaluation spans shopping, travel planning, formal reasoning, and service interactions governed by business rules.Source: §1 · p. 3
  • Analyses find complementary roles for ISU and PSA, strong performance on later subtasks, and sustained performance and efficiency gains in evaluated settings with strong baseline models.The paper examines these findings through ablations, analyses across subtask depths, and experiments across base models.Source: §1 · p. 3

2 FLOWSTATE

FlowState persists execution state across requests so a fixed policy can draw on earlier constraints, observations, outcomes, and assessments when they become relevant. It separates retained history from information disclosed to the model on demand.

2 FLOWSTATE

  • FlowState carries execution state across sequential requests so earlier information can inform later decisions as its relevance emerges.The policy parameters remain fixed throughout the interaction.Source: §2 · p. 3

2.1 PERSISTENT EXECUTION STATE

  • FlowState separates persistent storage, a lightweight historical index, and the evolving Active State, which holds current and disclosed historical states.State nodes are semantically typed by role, including user preferences, environment knowledge, attributes, agent judgements, and reusable artifacts; referenced raw tool results can also be retained.Source: §2.1 · pp. 3–4

2.2 STATE OPERATIONS

  • Incremental State Update (ISU) and Progressive State Access (PSA) jointly update the Active State, separating persistent retention from historical-state visibility.The model proposes both requests from the same context; validated effects are combined to produce the next Active State.Source: §2.2 · p. 4

2.2.1 INCREMENTAL STATE UPDATE (ISU)

  • ISU commits validated Add, Update, or Remove operations without regenerating the entire state at every step.Add creates a state for the current request, while Update and Remove apply only to states created during that request; unchanged information can remain intact.Source: §2.2.1 · pp. 4–5

2.2.2 PROGRESSIVE STATE ACCESS (PSA)

  • PSA uses historical-state identifiers, summaries, and disclosed relations to access requested states from the repository as information needs arise.Disclosing a relation reveals its type and related-node identifier, not that node’s full contents, allowing later access to proceed incrementally.Source: §2.2.2 · p. 5

2.3 STATE-DRIVEN EXECUTION

  • Each invocation receives the current request, latest tool observation, Historical State Index, and Active State, and outputs a state delta, access request, and execution decision.ISU and PSA combine their effects before the execution decision is carried out; at request completion, retained states, relations, and referenced raw tool results are persisted for subsequent requests.Source: §2.3 · p. 6

3 EXPERIMENTS

Across MemoryArena and τ 3-Bench, FlowState improves task performance while reducing token use. Its performance and efficiency gains also persist across three base models.

3.1 EXPERIMENTAL SETUP

  • The evaluation covers interdependent-subtask reuse in three MemoryArena environments and policy-constrained tool use with simulated users on τ 3-Bench Airline and Retail.The primary comparison uses DeepSeek-V4-Flash across FlowState, Full Context, memory-system baselines, ZipAct, and ZipAct+BM25.Source: §3.1 · p. 6

3.2 MAIN RESULTS

  • ZipAct+BM25 beats both standalone components only on Math PS, while FlowState surpasses it on all nine MemoryArena performance metrics.The authors attribute this consistent advantage on interdependent multi-session tasks to treating execution states as revisitable memory.Source: §3.2 · pp. 6–7
  • FlowState leads on eight of nine MemoryArena task metrics, with Shopping PS of 42.89% and Travel PS of 12.57%.These exceed the strongest memory-system baseline by 11.78 and 5.61 percentage points, respectively; FlowState also achieves the best Math PS and the best SR and PS on Physics.Source: §3.2 · p. 6, Table 1 · p. 7
  • On Airline and Retail, FlowState raises Pass Rate by 20.0 and 7.9 percentage points and DB Accuracy by 7.5 and 5.3 points, while reducing tokens by 61.2% and 22.2% versus Full Context.Retail Action Accuracy decreases by 4.9 percentage points, but task success improves in both domains.Source: Table 2 · p. 7, §3.2 · p. 7
  • Across four MemoryArena environments, FlowState reduces total token consumption by 43.2% versus Full Context using DeepSeek-V4-Flash.The passage reports that these savings accompany improved task success and progress.Source: §3.2 · p. 7, Table 1 · p. 7
  • Across DeepSeek-V4-Flash, GPT-5.6-terra, and Qwen3.5-397B-A17B, FlowState yields higher mean SR and PS and 28.3%–56.3% lower mean relative token usage than same-model Full Context.The averages cover Web Shopping, Math, and Physics; SR and PS are equally weighted, as is normalized relative token usage.Source: §3.2 · p. 7, Figure 3 · p. 8

4 ANALYSIS

FlowState sustains accuracy and relative performance retention across later subtasks, while ablations indicate that continuous state construction and on-demand historical access play complementary roles.

4.1 COMPONENT ABLATION

  • Removing ISU reduces SR to zero in both environments and lowers PS, suggesting execution-updated states support task completion better than rule-generated historical nodes.The comparison retains PSA’s access mechanism in the w/o ISU variant.Source: §4.1 · p. 8
  • Compared with w/o PSA, FlowState uses fewer tokens in both environments and improves all performance metrics in Group Travel Planning.Although w/o PSA has slightly higher PS on Bundled Web Shopping, its SR remains below FlowState’s; PSA progressively reveals relevant states and supporting evidence to limit irrelevant history in the Active State.Source: §4.1 · p. 8

4.2 FLOWSTATE SUSTAINS LONG-HORIZON ADVANTAGES

  • FlowState achieves the highest relative-retention nAUC in all three domains and the lowest DR on Travel Planning and Formal Reasoning.On Web Shopping, its DR is close to ReasoningBank, while its nAUC is higher.Source: Table 4 · p. 9, §4.2 · p. 9

4.1 COMPONENT ABLATION

  • On long-horizon, interdependent multi-session MemoryArena tasks, ISU’s continuous state construction and PSA’s on-demand historical access play complementary roles.The full model uses fewer tokens than the variant that exposes all historical states.Source: §4.1 · p. 9

4.2 FLOWSTATE SUSTAINS LONG-HORIZON ADVANTAGES

  • FlowState maintains the highest accuracy at every reported subtask depth on Web Shopping and Travel Planning, and generally leads at later depths on Formal Reasoning.At the final reported depth on Formal Reasoning, it matches ZipAct+BM25.Source: §4.2 · p. 9, Figure 4 · p. 9

5 CONCLUSION

FlowState makes execution state revisitable memory through incremental updates and progressive access, improving benchmark task performance while reducing token consumption. The section also states the study’s AI-use, ethics, and reproducibility disclosures.

5 CONCLUSION

  • FlowState combines Incremental State Update and Progressive State Access to maintain and revisit execution-state memory, improving task performance while reducing token consumption on MemoryArena and τ 3-Bench.The paper presents this unification of state maintenance and historical access as valuable for long-horizon decision-making.Source: §5 · p. 10

AI USE STATEMENT

  • The authors used generative AI to check literature, write code, create figures, and polish the manuscript, while developing the research questions, methods, experimental design, and results interpretation themselves.The authors take full responsibility for the final paper.Source: AI USE STATEMENT · p. 10

ETHICS STATEMENT

  • The benchmark experiments used no real-user data, participants, annotators, or real-world transactions, but the evaluation does not establish deployment safety.Deployment with real users could expose sensitive information or carry outdated or incorrect assumptions forward; applications would need data controls, provenance and validity checks, and safeguards for consequential actions.Source: ETHICS STATEMENT · p. 10

REPRODUCIBILITY STATEMENT

  • The reproducibility statement points to sections and appendices covering state procedures, benchmarks, runtime prompts, model settings, and baseline implementations, and says the complete source code will be released later.The cited materials include Appendix B.3 on runtime prompt templates, B.4 on state transition rules, and B.5 on settings and implementations.Source: REPRODUCIBILITY STATEMENT · p. 10

A RELATED WORK · A.1 EXECUTION STATE TRACKING FOR LONG-HORIZON AGENTS · A.2 LONG-TERM MEMORY FOR LLM AGENTS

Related work frames long-horizon agents’ challenge as combining compact, evolving execution state with the ability to revisit relevant historical information and judge whether it remains applicable as tasks change.

A.1 EXECUTION STATE TRACKING FOR LONG-HORIZON AGENTS

  • Belief-state and dialogue-state methods recursively update decision-relevant information from actions, observations, and conversation turns.Dialogue State Tracking updates user goals and relevant slot information as a conversation progresses.Source: §A.1 · p. 13
  • Recent LLM agents maintain evolving task or belief states, while ZipAct structures goals, world information, and constraints separately from action generation (Rozanov & Rei, 2025; Singh et al., 2026; Uddin et al., 2026; Guo et al., 2026).These approaches support acting from a compact current state rather than the full interaction history.Source: §A.1 · p. 13
  • Long-horizon execution-state methods leave open how agents can revisit earlier states and their supporting evidence when task focus shifts.The cited state-tracking approaches establish the value of compact execution state, but the passage identifies revisiting past states and evidence as a further question.Source: §A.1 · p. 13

A.2 LONG-TERM MEMORY FOR LLM AGENTS

  • Long-term memory methods preserve information beyond the current context by accumulating experiences, generating reusable reflections, or managing conversation history in tiers (Park et al., 2023; Shinn et al., 2023; Packer et al., 2023).More recent methods organize and update memories through consolidation, dynamic linking, graph structures, and temporal relations (Chhikara et al., 2025; Xu et al., 2026; Rasmussen et al., 2025).Source: §A.2 · p. 13
  • MemoryArena evaluates memory needs in interdependent multi-session agent tasks, where earlier actions and environmental feedback guide later decisions (He et al., 2026).The challenge arises in extended interactions involving multiple related tasks.Source: §A.2 · p. 13
  • Frequent updates can cause multi-target interference, and agents may fail to recognize when updated information makes an older memory invalid (Lee et al., 2026; Chao et al., 2026).MINTEval reveals multi-target interference under frequent updates; STALE shows failures to recognize that older memories are no longer valid and adjust behavior.Source: §A.2 · p. 13
  • Together, long-term memory work underscores the need to select relevant historical information and assess its continued applicability as tasks and environments evolve.Retaining historical information alone does not address relevance selection or whether memories remain applicable.Source: §A.2 · p. 13

A.3 CONNECTING EXECUTION STATE AND MEMORY ACCESS

FlowState connects current execution with cross-request memory by retaining addressable, semantically typed state and revealing historical states and evidence on demand. This contrasts with related approaches that organize experience as reusable guidance or context-sensitive memory access.

A.3 CONNECTING EXECUTION STATE AND MEMORY ACCESS

  • Related approaches reuse accumulated strategies through evolving memory or playbooks, while SAMem and MRAgent connect memory access more directly to current decision context.SAMem retrieves state-aligned experiential memories; MRAgent uses intermediate evidence to iteratively expand or prune access paths in an associative memory graph.Source: §A.3 · p. 13
  • Unlike MAGE’s hierarchical state tree and active-path context, FlowState unifies current execution and cross-request memory through persistent, semantically typed state nodes.MAGE supports revision through branching; FlowState nodes are individually addressable and retain relations and references to raw tool observations.Source: §A.3 · pp. 13–14
  • PSA discloses historical states and supporting evidence on demand, while ISU creates and revises current-request states using the disclosed information.Together, these mechanisms allow the same state representation to support current decisions and cross-request reuse.Source: §A.3 · pp. 13–14

B SUPPLEMENTARY MATERIALS · B.1 PERFORMANCE AND EFFICIENCY GAINS ACROSS BASE MODELS

Across three evaluated models and nine model–task combinations, FlowState improves PS and reduces token consumption in every combination, while increasing SR in eight and preserving it in one. The gains include large Web Shopping improvements and substantial token savings, including when baseline performance is already high.

B.1 PERFORMANCE AND EFFICIENCY GAINS ACROSS BASE MODELS

  • Across all nine model–task combinations, FlowState improves PS and reduces token consumption, while increasing SR in eight cases and preserving it in one.The evaluation covers Qwen3.5-397B-A17B, DeepSeek-V4-Flash, and GPT-5.6-terra.Source: §B.1 · p. 14
  • On Web Shopping, all three models improve PS by 17.55–21.78 percentage points and achieve nonzero SR from zero-success baselines.Source: §B.1 · p. 14
  • GPT-5.6-terra reduces token consumption by 84.30% on Web Shopping.Source: §B.1 · p. 14
  • On Math, DeepSeek-V4-Flash reduces token consumption by 73.01% and improves SR by 7.50 percentage points.Source: §B.1 · p. 14
  • On Physics, DeepSeek-V4-Flash raises PS from 72.50% to 73.96% while reducing token consumption by 51.69%.This illustrates gains when baseline performance is already relatively high.Source: §B.1 · p. 14

B.2 STATE TYPES AND SEMANTIC SCOPE · B.3 RUNTIME PROMPT TEMPLATES

The appendix defines five semantically scoped state types and shows runtime prompt templates that operationalize FlowState’s state updates and historical access. The templates distinguish FlowState’s execution-state inputs and output protocol from full-context, retrieval, and state-tracking variants.

B.2 STATE TYPES AND SEMANTIC SCOPE

  • The five state types distinguish user requirements, environmental observations, and agent-generated assessments or outputs, and apply to both newly created and accessed historical states.The taxonomy names preference, knowledge, attribute, judgement, and artifacts states.Source: §B.2 · p. 14, §B.3 · p. 15

B.3 RUNTIME PROMPT TEMPLATES

  • Runtime templates use separate system and user messages, populate braced fields at runtime, share ReAct rules, and vary policy and state rules by task and algorithm.FlowState instructions, output protocol, and state input are visually marked as FlowState-specific.Source: §B.3 · p. 15
  • FlowState uses Active State as working memory and requires checking it before actions, while Incremental State Update emits only changes when task-relevant facts, requirements, plans, or results change.State deltas add, update, or remove entries; historical-index entries cannot be updated or removed, so revisions are added and linked to the historical state.Source: §B.3 · p. 15
  • Each state has a semantic id, concise summary, structured value, and evidence or relation references, with directed edges from the changed state to its referenced target.Allowed relation types are supports, derives, follows, and supersedes.Source: §B.3 · p. 15
  • When information is missing, Progressive State Access uses prior queries, historical summaries, and related states to select content, specifying the missing information and the decision it enables.Summaries cannot establish exact facts or identifiers; newly disclosed content is usable only from the next model invocation, so dependent actions must wait.Source: §B.3 · pp. 15–16
  • FlowState’s output protocol requires four ordered JSON blocks for historical access, state changes, tool calls, and assistant messages, with all blocks present and at least one operation nonempty.The protocol supports proposing independent updates, historical requests, and execution decisions together when available information permits.Source: §B.3 · p. 16
  • The templates contrast full-trajectory and retrieved-memory inputs with execution-state inputs, while state-tracking variants pair execution state with the latest observation and query.The full-context template supplies trajectory history; retrieval supplies retrieved memory, and FlowState supplies agent status with the latest observation and query.Source: §B.3 · pp. 17–18

B.4 EXECUTION RULES

FlowState’s execution rules define which proposed state updates and historical accesses are admissible, and the runtime validates both. Update operations must satisfy identifier and reference constraints; requested accesses outside the permitted set are rejected.

B.4 EXECUTION RULES

  • The runtime validates proposed state updates and access requests against execution-rule admissibility conditions.Validation yields the accepted update delta and access set.Source: §B.4 · p. 19

Incremental State Update

  • Adds require unused semantic identifiers, while updates and removals must target nodes present in the active state and created during the current request.Proposed state relations must resolve to valid node identifiers; operations that fail these checks are excluded.Source: §B.4 · p. 19

Progressive State Access

  • Requested identifiers outside the permitted access set are rejected and excluded from the validated access set.The supplied passage does not specify the full definition of that permitted set.Source: §B.4 · p. 19

B.5 EXPERIMENTAL AND IMPLEMENTATION DETAILS

The evaluation covers selected MemoryArena and τ 3-Bench tasks, using benchmark-specific success metrics and controlled comparisons across FlowState, baselines, and ablations. The setup specifies task coverage, model configurations, prompt construction, and what each ablation tests.

Benchmarks and evaluation scope

  • MemoryArena evaluation covers Web Shopping, Travel Planning, Math, and Physics, while τ 3-Bench covers Airline and Retail; Progressive Web Search is excluded because annotation issues undermine answer-based evaluation.The MemoryArena sets contain 150 shopping tasks (900 subtasks), 270 travel-planning tasks (1,869 subtasks), 40 math tasks (354 subtasks), and 20 physics tasks (86 subtasks); τ 3-Bench uses 50 airline and 114 retail tasks.Source: §B.5 · p. 19

Evaluation metrics

  • MemoryArena reports SR, PS, and sPS, while τ 3-Bench reports Pass Rate, DB Accuracy, and Action Accuracy; #Tok counts prompt and generation tokens.SR requires a fully satisfying final bundle or plan in Shopping and Travel, or a correct final subtask in Math and Physics; Action Accuracy measures reference-action matching, not overall action correctness.Source: §B.5 · p. 19

Model configurations

  • FlowState is evaluated with DeepSeek-V4-Flash, GPT-5.6-terra, and Qwen3.5-397B-A17B, while the full-context baseline uses all three and other memory baselines use DeepSeek-V4-Flash.Inference uses temperature=0.1, top p=1.0, max completion tokens=32768, and thinking disabled; no other generation parameters are overridden.Source: §B.5 · p. 19

Benchmark protocol and prompt construction

  • All methods within a domain share benchmark tasks, environment tools, and evaluation procedures, with task prompts adapted to combine benchmark policies and tools with method-specific instructions and context.The benchmark implementations use MemoryArena revision 6cd9de1 and τ 3-Bench v1.0.1 revision fc0055d.Source: §B.5 · p. 20

Baselines

  • Baselines include Full Context, ReasoningBank, BM25, Mem0, ZipAct, and ZipAct+BM25; ZipAct uses task-relevant injectables following Pan et al. (2026).Full Context appends interaction history; ReasoningBank, BM25, and Mem0 retrieve stored information; ZipAct maintains compact execution state, and ZipAct+BM25 adds history retrieval.Source: §B.5 · p. 20

Ablation Design and Scope

  • The ablations replace one component while retaining the other: w/o PSA exposes all historical states in Active State, while w/o ISU builds query-boundary state nodes from final responses and linked tool results.Thus, w/o ISU compares incremental in-execution state maintenance with final-response-based construction, while retaining on-demand access to historical information and evidence; the ablations assess each mechanism overall, not individual design choices.Source: §B.5 · p. 20
Loading 2609.34565v2…