Developer Tools Machine Learning 1 vues

ECNU-SII/MIA: A Memory Framework for Deep Research Agents

M
Mohamed IDBRAHIM
Auteur
ECNU-SII/MIA: A Memory Framework for Deep Research Agents

ECNU-SII/MIA: A Memory Framework for Deep Research Agents

Deep research agents face a critical bottleneck: they can process vast amounts of information yet fail to retain and strategically deploy what matters. Memory bloat dilutes attention, irrelevant noise corrupts reasoning, and computational costs spiral as context histories grow unchecked. Worse, most agents memorize what results were found without learning how to find them again. ECNU-SII/MIA addresses this gap directly.

ECNU-SII/MIA (Memory Intelligence Agent) is a memory framework developed jointly by the Shanghai Institute of Intelligence (SII) and East China Normal University (ECNU). Rather than treating memory as passive storage, MIA restructures it through a Manager-Planner-Executor architecture that transforms agents from "passive record-keepers" into "active strategists." With 790 GitHub stars and active development through May 2026, MIA represents a concrete engineering response to the memory crisis in agent systems.

This article examines what ECNU-SII/MIA does, how it works, and whether it fits your deep research pipeline.

What is ECNU-SII/MIA?

ECNU-SII/MIA is an open-source agent memory framework written in Python↗ Bright Coding Blog, targeting developers building deep research agents that operate across long-horizon, open-world tasks. The project sits at the intersection of reinforcement learning, memory-augmented architectures, and multi-agent coordination.

The framework emerged from collaboration between SII (an industrial AI research institute) and ECNU (a top-tier Chinese research university). This dual academic-industrial lineage shows in MIA's design: it pairs theoretical rigor (evidenced by an arXiv paper, 2604.04503) with deployment-ready tooling including pre-trained model checkpoints, datasets, and integration with the OpenClaw agent platform.

MIA's core premise is that current agent memory fails on four fronts: unbounded growth without optimization, static retrieval strategies, inability to learn from execution history, and poor separation between memory storage and action planning. The framework responds with three coordinated components:

  • Manager: Optimizes memory storage to eliminate bloat, functioning as an "ultimate librarian"
  • Planner: Evolves retrieval and research strategies through Continual Test-Time Learning (TTRL), acting as a "tactical brain"
  • Executor: Interprets and executes complex research blueprints with minimal friction

The framework's Alternative Reinforcement Learning paradigm ensures these three components operate as a cohesive system rather than isolated modules—a design choice that distinguishes MIA from memory layers bolted onto existing agents.

Notably, MIA achieves strong empirical results with efficient parameter counts. The README documents a Qwen-2.5-VL-7B-based Executor outperforming closed-source general models including GPT-4o and Gemini-2.5-Pro in non-tool-calling settings, approaching Gemini-3-Flash performance. This "small-to-great" leap suggests MIA's architectural innovations compensate substantially for model scale limitations.

Key Features

Manager-Planner-Executor Architecture MIA replaces monolithic memory with explicit role separation. The Manager compresses and organizes experience into structured workflows; the Planner queries this compressed memory strategically; the Executor grounds plans in concrete tool use. This separation of concerns prevents the common failure mode where a single model must simultaneously remember, reason, and act.

Continual Test-Time Learning (TTRL) Unlike static memory systems, MIA's Planner adapts during inference. The TTRL mechanism updates both explicit memory (compressed workflows) and implicit memory (policy parameters) as the agent encounters new tasks. Two variants exist: TTRL for supervised settings where ground-truth answers are available after each question, and TTRL-streaming for production deployments with customizable reward signals from end users.

Alternative Reinforcement Learning MIA trains its Planner and Executor through RL based on the veRL framework, with substantial modifications for multi-turn tool interaction. The training paradigm uses GRPO (Group Relative Policy Optimization) rather than standard PPO, with explicit reward shaping for research task completion. This RL approach enables the Manager-Planner-Executor loop to co-evolve rather than freezing any component.

Multi-Modal Tool Integration The framework supports three search modalities out-of-box: online text search via Serper API, offline text search via local Wikipedia retrieval (wiki25), and image-to-image search with cached embeddings. Tool implementations live in verl.tools.search_tool and verl.tools.web_image_to_image_search_tool, with clear extension points for additional modalities.

Production-Ready Serving Infrastructure MIA's deployment architecture assumes multi-node GPU clusters with explicit service separation: vLLM-served LLMs for Planner/Judger and Executor, FastAPI-based memory services, and veRL-based training coordinators. The TTRL-streaming variant further decouples into server-side policy hosting and client-side interaction handling, enabling real-time user feedback integration.

Use Cases

Long-Horizon Research Agents MIA directly targets agents conducting multi-step research across diverse information sources. The TTRL mechanism allows such agents to improve their search strategies over a session—learning which query formulations succeed, which sources prove reliable, and how to decompose complex questions into sub-queries. The HotpotQA and LiveVQA benchmarks in MIA's evaluation suite represent this use case explicitly.

Memory-Efficient Multi-Modal Systems Teams running vision-language models on constrained hardware can leverage MIA's 7B Executor results. The framework's ability to approach Gemini-3-Flash performance with a 7B parameter model suggests particular value for edge deployments or cost-sensitive API wrappers where every token and FLOP counts.

Customizable Agent Platforms MIA's OpenClaw skill integrations (Original and Trust-Worthy versions) demonstrate production deployment on third-party agent marketplaces. The Trust-Worthy variant adds explicit judgment mechanisms for safety-critical applications. Teams building proprietary agent platforms can adapt MIA's server-client TTRL-streaming architecture to inject domain-specific reward functions.

Continual Learning Research The explicit separation of explicit memory (workflows) and implicit memory (parameters) makes MIA a practical testbed for researchers studying continual learning in LLM agents. The TTRL code exposes both memory consolidation and policy update mechanisms with clear hooks for modification.

Reproducible Agent Benchmarking MIA provides standardized inference configurations for eight baseline approaches (Base, RAG, mem0, a-mem, Expel, ReasoningBank, Memento, and ablated MIA variants). Researchers comparing memory architectures can run controlled experiments against these implementations with shared Executor and dataset configurations.

Installation & Setup

MIA requires Python 3.10+ and CUDA-capable hardware for training. The setup assumes Linux x86_64 with NVIDIA GPUs.

Create the conda environment:

conda create -n verl python==3.10.12

Install dependencies via the provided script:

# Navigate to train directory and run install script
cd train
bash install.sh

Flash Attention requires separate installation due to wheel specificity:

wget -nv https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.3/flash_attn-2.8.3+cu12torch2.7cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
pip install --no-cache-dir flash_attn-2.8.3+cu12torch2.7cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

For text search tools, configure your Serper API key:

# In web_tools/run.sh
export SERPER_KEY_ID="xxxxx"

Start the online search service:

cd web_tools
bash ./run.sh

For offline search, follow the search-r1 setup instructions, configure paths in local_search/run.sh, then launch:

cd local_search
bash ./run.sh

The offline service exposes retrieval at http://localhost:8001/retrieve.

Real Code Examples

Deploying the Planner & Judger Service

MIA's serving architecture requires explicit vLLM deployment for LLM components. Here's the standard configuration for the Qwen3-32B Planner/Judger on Node 1:

export VLLM_USE_FLASHINFER_SAMPLER=0
CUDA_VISIBLE_DEVICES=0,1,2,3 \
vllm serve /your_path/Qwen/Qwen3-32B \
    --tensor-parallel-size 4 \
    --served-model-name "qwen" \
    --gpu-memory-utilization 0.8 \
    --host 0.0.0.0 \
    --port 8002

This exposes the LLM service at your_url:8002/v1. The VLLM_USE_FLASHINFER_SAMPLER=0 flag disables FlashInfer sampling, which the MIA team found necessary for stable multi-turn interactions. Tensor parallelism across 4 GPUs accommodates the 32B parameter model within reasonable memory bounds.

Executor Training Configuration

The GRPO training script requires multiple service endpoints. Key environment variables in /Executor-Train/Train/local_search/run_mmsearch_grpo.sh:

# Judicial evaluation endpoint
JUDGE_URL="your_url:8002/v1"

# Replanning service for dynamic strategy adjustment
REPLAN_URL="your_url:5000/replan_train"

# Weights & Biases logging (optional)
WANDB_API_KEY="your_key"

# Checkpoint and data paths
SAVE_CHECKPOINT_DIR="/your_path/checkpoints"
DATASET_TRAIN="/your_path/train.parquet"
DATASET_VAL="/your_path/val.parquet"
REF_MODEL_PATH="/your_path/pretrained"

Training launches from the veRL directory:

cd /Executor-Train/Train/
bash ./local_search/run_mmsearch_grpo.sh

Post-training, merge FSDP shards for inference:

python -m verl.model_merger merge \
    --backend fsdp \
    --local_dir /your_path/actor \
    --target_dir /your_path

TTRL-Streaming Client Configuration

For production deployments with user feedback, the client script connects to the veRL server:

# In run_streaming_ttrl_client.sh
TTRL_SERVER="http://127.0.0.1:8765"  # veRL policy server
GT_REWARD_URL="your_url:5000/plan"   # Reward/feedback endpoint
CLIENT_BATCH_SIZE=32                   # Must divide server train_batch_size
SAVE_STEP=100                          # Checkpoint frequency

The client streams user interactions while the server maintains the policy model, enabling memory and parameter updates without reloading the full model per interaction.

Advanced Usage & Best Practices

Multi-Node Deployment Topology MIA's documentation assumes a 3-node cluster: Node 1 hosts Planner/Judger LLMs, Node 2 runs the Executor and tool services, Node 3 executes training. This separation prevents resource contention between inference and gradient computation. For smaller deployments, the Planner and Memory Manager can share a node, but training should remain isolated.

Memory Pre-computation for Training Efficiency The README explicitly recommends collecting "memory content" and "initial plan" or "image caption" in advance during training. This pre-materialization avoids redundant LLM calls during GRPO rollout generation, substantially improving throughput. Production users should implement similar caching for their data pipelines.

TTRL Mode Selection Choose TTRL (supervised) when ground-truth answers are available after each research episode—typical in benchmark evaluation or internal QA systems. Choose TTRL-streaming (unsupervised/custom reward) for end-user applications where feedback arrives asynchronously or in non-standard formats. The gt_reward_core.py file provides the hook for custom reward implementations.

Tool Search Fallback Strategy The call_agent.py module supports switching between offline and online text search via import selection. For robust production deployments, consider implementing automatic fallback: attempt local retrieval first (lower latency, no API costs), then escalate to Serper for queries outside the cached corpus.

FP8 Quantization for Resource Constraints MIA provides FP8-quantized Executor checkpoints for deployment scenarios where full precision inference is prohibitive. These live at Executor-FP8-BLOCK on the HuggingFace repository. Evaluate accuracy degradation against your specific task distribution before committing to quantized serving.

Comparison with Alternatives

Framework Memory Type Learning Multi-Modal RL Training
ECNU-SII/MIA Manager-Planner-Executor Continual TTRL Yes (text + image) Yes (GRPO)
mem0 Layered context Static Text primarily No
RAG External retrieval None Varies No
ReasoningBank Structured experience Offline Text No

mem0 provides simpler integration for developers needing immediate context management without training infrastructure. However, it lacks MIA's explicit Planner optimization and continual learning—mem0 memories are retrieved, not evolved.

Standard RAG remains appropriate for single-turn question answering with stable document collections. MIA's overhead (multi-service deployment, RL training) only pays off for multi-step research where retrieval strategy itself must adapt.

ReasoningBank shares MIA's structured memory philosophy but focuses on offline compilation of reasoning traces. MIA's TTRL enables online adaptation, which matters when task distributions shift or user feedback reveals novel success criteria.

The honest trade-off: MIA requires substantially more engineering investment than these alternatives. Teams without GPU cluster access or RL expertise may find the simpler systems more pragmatic, even if they cap out at lower peak performance.

FAQ

What license covers ECNU-SII/MIA? MIT License. Commercial use is permitted.

What hardware is required for training? Multi-node GPU setup recommended; inference can run on single-node multi-GPU configurations.

Can I use MIA without training my own models? Yes—pre-trained Executor and Planner checkpoints are available on HuggingFace.

Does MIA support languages other than English? The framework is architecture-agnostic; Chinese documentation is provided, and model language capabilities depend on base model choice.

How does TTRL differ from standard fine-tuning? TTRL updates policy parameters during inference episodes using online rewards, not offline gradient descent on fixed datasets.

What base models are supported? Documentation uses Qwen3-32B for Planner/Judger and Qwen-2.5-VL-7B for Executor; other vLLM-compatible models may work with configuration adjustments.

Is there a lightweight deployment option? FP8-quantized Executor checkpoints and the OpenClaw skill integrations provide reduced-resource paths.

Conclusion

ECNU-SII/MIA offers a rigorously engineered solution to agent memory bloat through its Manager-Planner-Executor architecture and Continual Test-Time Learning. The framework rewards teams with the infrastructure to deploy multi-node GPU clusters and the expertise to configure RL training pipelines. For such teams, the empirical results—7B models approaching frontier closed-source performance—represent genuine efficiency gains.

Developers building simpler single-turn systems, or those without access to training hardware, should evaluate whether MIA's complexity overhead aligns with their needs. The pre-trained checkpoints and OpenClaw integrations lower the barrier, but full exploitation requires commitment to the complete serving and training stack.

If your deep research agents suffer from dilated attention, static retrieval, or inability to learn from execution history, explore the implementation at https://github.com/ECNU-SII/MIA. Review the arXiv paper for theoretical foundations, examine the HuggingFace repositories for artifacts, and assess whether the TTRL paradigm fits your operational constraints.

[INTERNAL_LINK: agent-memory-architectures]

Commentaires 0

Aucun commentaire pour l'instant. Soyez le premier à réagir !

Laisser un commentaire