# LatentMem

A learnable memory framework for LLM-powered multi-agent systems, accepted to EMNLP 2026, that trains a memory composer to distill an experience bank of raw interaction trajectories into compact, role-aware latent memories for each agent.

LatentMem stores raw interaction trajectories from a multi-agent system in a lightweight experience bank, then trains a memory composer to distill those trajectories into compact latent memories conditioned on each agent's role, rather than storing and retrieving raw text. The memory composer is trained with a method the paper calls Latent Memory Policy Optimization, intended to make the resulting memories more useful and more transferable to new situations.

The released code includes training trajectories and a trained model based on Qwen3-4B-Instruct, along with scripts to collect trajectories into the experience bank, initialize the memory composer with supervised fine-tuning, train it with the paper's policy-optimization method, and evaluate the result.

It is a Python research implementation for the paper 'LatentMem: Customizing Latent Memory for Multi-Agent Systems.'

Website: https://arxiv.org/abs/2602.03036
