Memory in the Loop: In-Process Retrieval as ExtendedWorking Memory for Language Agents

· Source: cs.CL updates on arXiv.org · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Robotics & Autonomous Systems, Cloud Computing & IT Infrastructure · Depth: Expert, extended

Summary

The paper "Memory in the Loop: In-Process Retrieval as Extended Working Memory for Language Agents" investigates how memory latency impacts language agents. It argues that moving memory *inside* the agent's reasoning loop, making it in-process, drastically reduces latency from ~100ms (networked) to ~100µs. This three-order-of-magnitude speedup makes per-step memory access feasible, collapsing the "latency tax" that previously forced agents to ration retrieval. The authors demonstrate that store latency is causal to task outcomes: under a fixed 100ms per-turn memory budget, redundant actions rise monotonically with increased store latency, from 0.0 at in-process speed to 7.2 of 12 at 110ms cloud round trip. End-to-end recall improves from 0/5 to 3.6–4.8/5 for GPT-5 class models with in-loop memory, with live store operations at p50 80–165µs. The bottleneck shifts to embedding, which can be resolved with a local embedder for a complete ~40µs operation.

Key takeaway

For AI Architects designing agent systems, you should prioritize in-process memory solutions over networked vector stores. This shift enables per-step retrieval, making capabilities like real-time deduplication and grounding feasible within a 100ms per-turn budget. Implement local embedders to overcome the remaining bottleneck, achieving ~40µs complete operations. This approach allows you to engineer reliable scaffolds around models, improving task outcomes where within-turn state changes are critical.

Key insights

In-process, low-latency memory enables per-step retrieval, transforming external stores into constitutive working memory for language agents.

Principles

Method

The study instantiates in-loop memory as an ephemeral, in-process semantic store, measuring its effect on multi-turn agents under bounded context using GPT-5 class models and a loop-guard task.

In practice

Topics

Code references

Best for: Research Scientist, AI Engineer, NLP Engineer, AI Scientist, Machine Learning Engineer, AI Architect

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.CL updates on arXiv.org.