DeepHorus is an innovative tech media and intelligence platform focused on AI, blockchain, startups, and emerging technologies.
Published on

New agentic memory framework uses 118K tokens per query. LangMem burns through 3.26M

Authors
  • avatar
    Name
    DeepHorus
    Twitter

Researchers at the National University of Singapore have developed a novel framework called MRAgent that dramatically reduces token consumption in AI agent memory management. According to the study, MRAgent uses only 118,000 tokens per query, compared to LangMem's 3.26 million tokens—a staggering 27-fold reduction. This breakthrough addresses a critical bottleneck in long-horizon reasoning, where context windows fill up rapidly and traditional retrieval pipelines return noise instead of signal.

Current AI agents rely on passive retrieval pipelines, where documents are fetched via vector search or graph traversal and passed to a large language model for reasoning. This approach suffers from three major flaws: it cannot revise retrieval strategies mid-reasoning, fixed similarity scores flood context windows with irrelevant noise, and reliance on pre-constructed structures limits scalability for unpredictable, long-horizon interactions. The researchers argue that these limitations stem from treating memory as a static database rather than an interactive environment.

MRAgent abandons the static 'retrieve-then-reason' paradigm in favor of active and associative memory reconstruction, a concept inspired by cognitive neuroscience. Instead of retrieving large text blocks, the system begins with small triggers from the user prompt—such as a name, action, or place—and follows metadata stepping stones to gather evidence piece by piece. This sequential recall allows the agent to adjust its search based on intermediate findings, avoiding the noise of massive retrieved blocks.

To implement this efficiently, MRAgent organizes its database using a 'Cue-Tag-Content' mechanism with three node types: Cues (fine-grained keywords), Content (actual memory units divided into episodic and semantic layers), and Tags (semantic bridges summarizing relational associations). The LLM first navigates from Cues to candidate Tags, evaluating these short summaries to judge relevance before retrieving full content. This two-stage process ensures that only pertinent information enters the LLM's context, significantly cutting token usage.

The implications are substantial for fields requiring long-horizon reasoning, such as virtual assistants, research tools, and customer service bots. By reducing token consumption and runtime costs, MRAgent could enable more efficient and cost-effective deployments of AI agents. The framework demonstrates that dynamic memory management, rather than static retrieval, is key to handling complex queries without overwhelming context windows.

The researchers emphasize that this shift toward active reconstruction is necessary for agents to scale across unpredictable user interactions. While other frameworks exist in the agentic memory space, MRAgent's token savings stand out as a practical advantage. The study provides a concrete implementation that balances computational efficiency with reasoning accuracy.

Looking ahead, MRAgent represents a step forward in making AI agents more intelligent and resource-efficient. Future work may explore scaling the framework to even larger memory graphs or integrating it with reinforcement learning for adaptive search strategies. As long-horizon tasks become more common, such active memory systems could become a standard component of agent architectures.

Read original article →Source: venturebeat