Report Abuse

Basic Information

This repository implements MemAgent, a research and engineering framework for training and running memory-augmented agents that enable long-context processing for large language models. It provides the MemAgent architecture and a multi-conversation reinforcement learning framework (RLVR and an extension of DAPO) to optimize agent workflows end-to-end without changing underlying model architectures. The codebase includes training scripts for RL-MemAgent models, quickstart utilities for local vLLM deployment and online LLM services, dataset preparation and evaluation pipelines based on HotpotQA and synthetic long-context QA, and engineering components such as sync/async agent interfaces and Ray-based process pools. It also documents reproducibility steps and offers pretrained RL-MemAgent-14B and RL-MemAgent-7B checkpoints. The repo is aimed at researchers and developers who want to build, train, evaluate, and reproduce RL-driven memory agents for arbitrarily long-context tasks.

Links

App Details

Features
MemAgent"s key features include a novel memory mechanism that allows arbitrarily long input processing within fixed context windows and achieves linear time complexity with respect to text length. The project implements a multi-conv RL training framework using Reinforcement Learning from Verifiable Rewards and extends the DAPO algorithm to support multi-turn, context-independent conversations. The repo supplies quickstart scripts for local vLLM serving and for configuring online LLM endpoints, end-to-end training and evaluation scripts for 7B and 14B agents, data processing and filtering tools for HotpotQA-based long-context QA, and evaluation suites for in-distribution and out-of-distribution tests. Engineering utilities include sync and async agent interfaces that let users write agents as functions in an OpenAI-style format and a RayActor process pool to offload CPU-intensive reward computation and tool calling.
Use Cases
MemAgent helps researchers and practitioners develop and evaluate LLM agents that handle ultra-long contexts by providing both algorithmic design and practical tooling to reproduce published results. It supplies pretrained RL-MemAgent models demonstrating low performance degradation on tasks up to millions of tokens and scripts to run local or online inference and full training pipelines. The repository streamlines dataset download, preprocessing, filtering and conversion to evaluation formats for long-context QA, and documents verifier differences for reproducible scoring. Its async agent-as-function API reduces boilerplate for multi-step workflows and tool calling, while Ray and vLLM integration enable scalable distributed evaluation and reward computation. Overall, it lowers the barrier to experiment with RL-driven memory mechanisms and integrate long-context agents into research pipelines.

Please fill the required fields*