# BytedTsinghua-SIA/MemAgent

A MemAgent framework that can be extrapolated to 3.5M, along with a training framework for RL training of any agent workflow.

Repository: https://github.com/BytedTsinghua-SIA/MemAgent
Canonical: https://ross.abutalabs.com/products/memagent
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2026-05-12T15:41:16+00:00

## Health v2 (maintenance only)
Score: 55/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 82, release rhythm 35, longevity 31
- inputs: {"age_days": 435, "days_push": 113, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1100, forks 73 (observed 2026-08-28T04:03:35.425554+00:00)

## What it is
MemAgent is a reinforcement-learning framework for training LLM agents that process arbitrarily long contexts via a memory mechanism within fixed context windows. It extends the DAPO algorithm to support end-to-end RL optimization of multi-turn agent workflows, enabling extrapolation from 32K training contexts to 3.5M-token tasks.

## Use cases
- train an LLM agent to handle multi-million-token documents
- do RL training on multi-turn agent workflows with verifiable rewards
- extend a model's effective context length beyond its training window
- run long-context QA with linear compute scaling
- reproduce RL-MemAgent-7B/14B long-context results

## When to choose
- you need RL training of agent workflows with long-context memory
- you want to extrapolate context length without changing model architecture
- you need linear-time long-text processing

## When to avoid
- you only need inference-time RAG without training
- you lack GPU resources for RL fine-tuning
- you need a plug-and-play long-context model with no training

## Facets
- artifact type: framework
- maturity: active
- function: llm-training, agent-framework, rag, machine-learning
- domain: large-language-models, artificial-intelligence, deep-learning
- platform: python
- tags: reinforcement-learning, long-context, memory-agent, rlvr, dapo, context-extrapolation, ai-agents, gpu, linux

## Member repositories
- BytedTsinghua-SIA/MemAgent (main) score 55

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:35.425554+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:45:45.828569+00:00, confidence not recorded.
  - readme: https://github.com/BytedTsinghua-SIA/MemAgent (fetched 2026-08-28T04:03:35.425554+00:00, sha 1e4064f13419)
- Data as of 2026-08-30T08:39:29.467469+00:00.
