|
Some checks are pending
CI / macOS sandbox / Seatbelt - clt (push) Waiting to run
CI / macOS sandbox / Seatbelt - xcode (push) Waiting to run
CI / Python packages / Build and verify distributions (push) Waiting to run
CI / Python quality / GitHub Actions (push) Waiting to run
CI / Python quality / Pre-commit (push) Waiting to run
CI / Python tests / Unit Tests - py3.11 (push) Waiting to run
CI / Python tests / Unit Tests - py3.12 (push) Waiting to run
CI / Python tests / Unit Tests - py3.13 (push) Waiting to run
CI / Python tests / Unit Tests - py3.14 (push) Waiting to run
CI / ReMe Studio / Studio checks (push) Waiting to run
CI / Windows / CLI smoke - py3.11 (push) Waiting to run
Deploy / Documentation / Build documentation (push) Waiting to run
Deploy / Documentation / deploy (push) Blocked by required conditions
CI and Release / Docker / Build and test / amd64 (push) Waiting to run
CI and Release / Docker / Build and test / arm64 (push) Waiting to run
CI and Release / Docker / Publish multi-platform tags (push) Blocked by required conditions
Security / CodeQL / Analyze javascript-typescript (push) Waiting to run
Security / CodeQL / Analyze python (push) Waiting to run
* Add sandboxed Python execution and home AutoBash plugin * Harden read-only shell commands and filesystem sandboxes * Group file sandbox backends in one package * Fix macOS file sandbox isolation and runtime access * Refine file sandbox limits and executor checks * Harden AutoBash policy and macOS sandbox supervision * fix(home): require ReMe release with file sandbox * refactor(home): simplify sandbox calls and redundant tests * fix(execution): bound output and clean up cancelled sandbox startup * fix(tests): mock Seatbelt platform requirements on Linux * fix(home): block Git help helpers and harden sandbox cleanup * Fix sandbox runtime links and subprocess cleanup * ci: cover Home plugin tests * test: wait for pipeline descendants to exit after cancellation * fix: align Home dependencies and preserve cleanup cancellation Require ReMe 0.4.2.1 and verify isolated Home wheel installation in package CI. Share cancellation-safe cleanup with thread calls, retain AnyIO cancellation semantics, and record Bubblewrap mount targets during argument construction. * feat(home): prepare self-evolution workspaces and benchmark inputs * fix(home): load only selected cases for debug derivation * feat(home): evaluate candidates with benchmark judges and prepare workspace docs * refactor(home): organize workflows and unify debug evaluation mode * fix(home): align Docker runtime and preserve evaluation failures * refactor(home): align evaluation summaries with dev_meta * feat(home): migrate agent, sampling and evidence inspection tooling * feat(home): add case-study agent and query evidence tracing tools - Add home_case_study job with CaseStudyAgentWrapper and a read-only sandboxed investigation step for per-case diagnostic reports - Add home_trace_query_evidence job/step to locate a query's source evidence sessions, memory checkpoints and answer/score previews - Compact evaluation summaries: record per-query failure errors, round scores to four decimals, expose scoring_enabled and observed means - Slim run manifests: drop schema_version and trusted_judge fingerprint, exclude debug/sampling_policy options, keep construction_source only for query-only replay - Simplify history index internals and update guide docs and tests * feat(home): support multi-case case-study runs with dedicated LLM and Git sandbox - Allow home_case_study to investigate up to eight ordered cases per invocation with a shared focus, one isolated agent per case, while keeping the legacy single-case selector as a deprecated alias - Configure a dedicated home_case_study LLM component instead of the shared judge backend - Wrap ReMe's OS file sandbox with a Home-specific Git runtime grant (developer directory on macOS) and argv-based child environment - Tighten case-study prompts around evidence certainty, code-tool path scoping, citation form, and unresolved-cause reporting - Extend evidence tracing and expand case-study/sandbox tests and docs * feat(home): run case studies with bounded concurrency and fix sandbox test * feat(home): guard repeated evaluations and preserve retry selections * feat(home): migrate optimization workflows and evaluation budgets * feat(home): add candidate admission gate and construction-equivalence replay Add host-side candidate gate agent that reviews committed changes before sampling, and construction-equivalence agent that compares a candidate against its nearest reusable ancestor to select query-only replay with 60% probability when construction is unchanged. Wire both into plugin.yaml application defaults, update optimizer prompt to explain the new host behaviors, extend snapshot/evaluation components with reuse support, and add focused tests. * feat(home): add structured-report agent and gate/equivalence test coverage Add StructuredReportAgent wrapper selectable via the _structured_report_model option in BoundedAgentWrapper, plus its dedicated unit tests. Extend candidate gate, construction equivalence, evaluation history, sampling, and validation budget tests, and document the new behavior in the plugin README. * feat(home): add standalone benchmark test evaluation and fix compression recovery * fix(home): preserve top-level answer failure classification * refactor(home): rename max_validations to max_evaluations * refactor(home): extract shared review_report workflow helper and bump version to 0.4.2.2 * fix(home): load runner credentials and localize dataset evaluation * fix(benchmark): propagate Home sandbox memory limits * refactor(home): consolidate Git exports and candidate validation * fix(home): clarify branch and diff tool parameter contracts * feat(home): bound case-study reports and migrate draft tools * fix(home): align benchmark report limits with plugin defaults * Fix Home evaluation recovery and cancellation boundaries * fix(home): tolerate fenced optimizer results and finalize exhausted budgets * fix(benchmark): align Docker runtime with AgentScope 2.0.11 * fix(home): unify history writes and cancellation cleanup * refactor(home): reuse structured report parsing * ci: remove redundant Home compatibility install check * fix(home): preserve literal formatting in structured reports --------- Co-authored-by: jinli.yl <jinli.yl@alibaba-inc.com> |
||
|---|---|---|
| .. | ||
| config.yaml | ||
| config_home.yaml | ||
| config_home_eval.yaml | ||
| download.py | ||
| home_evidence_sessions.jsonl | ||
| kill.sh | ||
| README.md | ||
| README_ZH.md | ||
| run.py | ||
| run_home.py | ||
| run_home_eval.py | ||
LongMemEval Benchmark
LongMemEval is a benchmark for long-term memory over multi-session chat histories. Each item provides a chronologically ordered set of chat sessions between a user and an assistant, followed by a probing question whose answer is only recoverable by reasoning over the user-owned memory. ReMe ingests the sessions into an isolated per-item workspace, answers the question via an agentic (ReAct) mode, and scores the answer with an LLM-as-judge.
Question types include single-session (user / assistant / preference), multi-session reasoning, knowledge update, and temporal reasoning.
Install ReMe and the LongMemEval plugin in editable mode from the repository root:
python -m pip install -e ".[as]"
reme plugins install ./plugins/lme --editable
reme plugins install ./plugins/lme-judge --editable
reme plugins validate lme
The runner explicitly enables the installed lme plugin and combines its defaults with
ReMe's built-in benchmark preset. Editable installation keeps changes under
plugins/lme visible without reinstalling the plugin.
Custom application config paths still work through reme.config and can use extends: benchmark.
This directory continues to own the runner, evaluation settings, dataset and outputs.
Model credentials use the environment variables declared by the shared benchmark configuration.
The shared preset keeps python_execute private (enable_serve: false); in-process benchmark jobs
remain callable. Python sandbox requirements and credential placement are described in the
BEAM benchmark guide.
1. Get the Dataset
ReMe uses only the cleaned-S split, hosted on HuggingFace:
agentscope-ai/ReMe_longmemeval_clean_s_v2.
The download script fetches it via the hf-mirror.com mirror; to use a different
mirror, modify BASE_URL in download.py.
cd benchmark/longmemeval
python download.py # saves dataset/longmemeval_s_reme_cleaned.json; skips if already present
Ground truth is embedded in the data file.
2. Run
From the repository root:
python benchmark/longmemeval/run.py
python benchmark/longmemeval/run.py --config benchmark/longmemeval/config.yaml
python benchmark/longmemeval/run.py -q # quiet: only eval-level logs
python benchmark/longmemeval/run.py --log-level WARNING # reduce eval runner logs
python benchmark/longmemeval/run.py --reme-log-level WARNING # reduce reme internal logs
python benchmark/longmemeval/run.py --eval_only # reuse existing workspaces, query + judge only
3. Pipeline
- Load the dataset (ground truth is embedded in the data file).
- For each item, create an isolated workspace and ingest sessions in chronological order.
- If a custom application configuration enables
auto_dream, trigger it when sessions cross the configured hour (default 23:00). The packaged preset leaves it disabled. - Answer each question via agentic (ReAct) mode.
- Judge the answer (binary yes/no) with the
answer_judgejob and print per-type accuracy.
4. Key config — benchmark/longmemeval/config.yaml
| Key | Meaning |
|---|---|
dataset.path |
Dataset file to evaluate (e.g. longmemeval_s_reme_cleaned.json); ground truth is included. |
dataset.start_index / num_items |
Slice of items to evaluate. |
dataset.question_types |
Filter by question type; empty = all. |
dataset.workspace_root |
Per-item workspace root (benchmark/longmemeval/workspaces/longmemeval-s). |
evaluation.num_workers |
0 = auto (cpu-2), 1 = sequential, >1 = parallel. |
evaluation.filter_future_sessions |
Only ingest sessions with timestamp ≤ question_date. |
reme.config |
ReMe config used (benchmark). |
reme.dream_trigger_hour / dream_scan_days / dream_max_units |
Dream triggering behavior. |
output.dir |
Results directory (benchmark/longmemeval/results). |
5. Outputs
Results are JSON files written to output.dir as results_<timestamp>.json,
with a per-type accuracy summary also printed to the console. Logging
conventions are shared across benchmarks — see the
top-level README.
6. Reference Results
cleaned-s
Basic settings
- Modified auto-memory prompt, auto-dream disabled.
- All sessions in reme-memory are strictly earlier than the question time.
Results
agentscope==2.0.4.post1, conda reme env, 32 workers, eval-only (reusing prebuilt memory) (2026-08-06, 500 items, total 10.0 min)
| Type | Agentic | input tok/q | output tok/q | total tok/q | tool calls/q |
|---|---|---|---|---|---|
| knowledge-update | 0.910 | 31,581 | 589 | 32,169 | 2.90 |
| multi-session | 0.842 | 52,837 | 1,474 | 54,311 | 4.21 |
| single-session-assistant | 1.000 | 15,596 | 279 | 15,875 | 1.89 |
| single-session-preference | 0.633 | 36,802 | 818 | 37,620 | 3.60 |
| single-session-user | 0.986 | 27,433 | 359 | 27,792 | 2.60 |
| temporal-reasoning | 0.902 | 62,674 | 985 | 63,659 | 4.97 |
| OVERALL | 0.894 | 43,448 | 876 | 44,324 | 3.69 |
Prepare a Home experiment
run_home.py prepares the fixed group_1–group_5 training split (250 cases), the workspace, and committed candidate
code. It exits after preparation; it does not evaluate cases or start optimization.
Run from the repository root after obtaining the dataset described above:
reme plugins install plugins/home
python benchmark/longmemeval/run_home.py
# Optional separate workspace (a successful preparation cannot be repeated):
python benchmark/longmemeval/run_home.py --workspace-dir /path/to/new-workspace
config_home.yaml controls the preparation. Its paths are
repository-relative regardless of the current working directory; --config
accepts an alternative runner YAML file. The default workspace is
benchmark/longmemeval/workspaces/home-groups-1-5. The evaluated runtime loads lme;
the host application loads home. source_ref: HEAD exports committed source
only, excluding uncommitted modifications. Preparation failure rolls back its
outputs; after success, another call fails instead of resetting the experiment.
The top-level sampling_policy configures Home evaluation defaults: max_cases,
max_queries (null means unlimited), temperature, ewma_alpha and
uniform_exploration. The runner validates these and passes them to the host
home.evaluation Component. It still only prepares; it does not run evaluations.
Each evaluation controls sampling and record_history separately.
The top-level validation_cycle_time_budget_minutes configures the host optimizer's
advisory time between completed formal evaluations. It defaults to 150 minutes;
set a positive number to change it or null to disable timed reminders.
The top-level max_evaluations sets the optimizer's formal-evaluation budget
(positive integer, default 10). A slot is consumed at first sandbox startup,
including later failures or cancellations; initial baseline and debug are excluded.
The top-level memory_limit_mib sets the host agent sandbox memory limit for
optimization, diagnosis, case studies and evaluation reviews. Set memory_limit_mib: 0
in the runner YAML to disable the Linux cgroup limit. Null or omission keeps platform
defaults (4096 MiB on Linux); macOS does not enforce memory limits.
After preparation, run local one-shot optimization with the same configuration:
python benchmark/longmemeval/run_home.py --optimize
# Use the same --config and --workspace-dir overrides as preparation, if supplied.
python benchmark/longmemeval/run_home.py --optimize --instruction "Improve retrieval quality"
This starts a fresh application, applies both budgets and the sampling policy,
runs home_optimize, and closes the application. It does not repeat preparation.
Python callers can use await optimize(config_path, workspace_dir=...) from the
same module. The default run() and CLI behavior remain preparation only.
Python callers can use the same lifecycle:
from benchmark.longmemeval.run_home import run
result = await run(workspace_dir="/path/to/new-workspace")
The 250 benchmark.case_ids in config_home.yaml are copied
in order from groups 1–5 of dataset/groups.json at dev_meta commit
b53048e44833937df80a52fccceea78d054790e8. The original splitter used seed 42
and type-stratified allocation into ten 50-case groups; groups 6–10 remain held
out. The runner reads the IDs directly from YAML without loading group files.
home_evidence_sessions.jsonl is a byte-for-byte
copy of that revision's dataset/longmemeval_evidence_sessions.jsonl;
reviewed evidence-session annotations are preserved during normalization.
Evaluate a candidate on an independent test set
The default excludes the source experiment's actual training IDs from the full dataset. With the default
250-case training workspace this selects held-out groups 6–10. For an explicit selection, set
exclude_training_cases: false and replace all_cases: true with case_ids: [...] in
config_home_eval.yaml. An empty held-out selection fails before preparation.
The entry point imports a full candidate SHA or unambiguous hexadecimal prefix from an existing Home optimization workspace and copies its prepared fixed runtime. It does not require the original ReMe source repository or change the optimizer's checkout. Paths in the configuration are repository-relative.
Prepare first, then use the service from two terminals (replace CANDIDATE_SHA):
python benchmark/longmemeval/run_home_eval.py --commit CANDIDATE_SHA --prepare-only
# Terminal 1:
reme start workspace_dir=benchmark/longmemeval/workspaces/home-test-held-out 'plugins=["home","lme-judge"]'
# Terminal 2:
reme home_evaluate workspace_dir=benchmark/longmemeval/workspaces/home-test-held-out record_history=false
Local one-shot test evaluation
python benchmark/longmemeval/run_home_eval.py --commit CANDIDATE_SHA
# Optional overrides: --config /path/to/test.yaml --source-workspace /path/to/search --test-workspace /path/to/test
Python callers can use await benchmark.longmemeval.run_home_eval.run(commit="CANDIDATE_SHA").
The runner rebuilds construction and scores every selected query with sampling and history recording disabled.
It uses the existing Docker evaluation runtime and host judge configuration; model credentials are required
for evaluation. Results stay in the test workspace's home/evaluations/, with original candidate provenance
in each manifest's test_evaluation. The exported snapshot has its own local evaluation_commit_sha.
Rerunning the same request reopens unchanged prepared inputs and creates another evaluation result. Use a
new test workspace for another candidate or selection. Source and test workspaces must not overlap.