Repository for the paper "mem-agent: Equipping LLM Agents with Memory Using RL".
-
Copy environment file:
make copy-env
and add the relevant values w.r.t. what you want to do in the repo. The
OPENAI_API_KEY
,WANDB_API_KEY
andWANDB_PROJECT
are required for training and theOPENROUTER_API_KEY
is required for evaluation. -
Check if uv is installed and install if needed:
make check-uv
-
Install dependencies (root and agent project):
make install
-
Prepare memory from instances:
make setup-memory
-
IMPORTANT: For the training of Qwen2.5 and upwards, use this make target to remove a potential error vLLM might throw mid-training:
make remove-vllm-error
-
Review configuration:
- Edit
config.json
to adjust model and hyperparameters.
- Edit
-
Start training:
make train
Notes:
- On macOS, GPU-specific packages are automatically skipped during install and train.
Runnign the evaluation is very simple, uses OpenRouter by default and thus accepts OpenRouter model names.
# Basic (set your preferred model)
make eval MODEL=qwen/qwen3-8b
# Use vLLM or LMStudio for local inference
make eval MODEL=qwen/qwen3-8b USE_VLLM=1
Evaluation reads data from data/eval/
.