Open benchmark harness for @framers/agentos memory primitives. Source-only repository, clone and run via the local CLI; not published to npm.
85.6% on LongMemEval-S with a per-category reader router (84.2% with
gpt-4oalone) and 70.2% on LongMemEval-M, the 1.5M-token variant.
Leaderboard · Methodology and negative findings · Run it yourself · Benchmark docs · Why memory benchmark numbers don't compare
Covers LongMemEval (S, M, Oracle variants), LOCOMO, BEAM (dataset card), and a suite of cognitive-mechanism micro-benchmarks. Every published number ships with a per-cell run JSON at fixed seed, a 95% confidence interval, judge false-positive rate probed per benchmark, and explicit methodology disclosures for every cross-vendor comparison.
| Configuration | Accuracy | $/correct | p50 latency | p95 latency |
|---|---|---|---|---|
| Canonical-hybrid + sem-embed + reader router | 85.6% | $0.0090 | 3,558 ms | 7,264 ms |
| Tier 3 minimize-cost + sem-embed + reader router (prior) | 84.8% | $0.0410 | ~5,000 ms | 111,535 ms |
| Tier 3 minimize-cost + sem-embed (gpt-4o-only baseline) | 83.2% | $0.0521 | — | — |
At a matched gpt-4o reader the same retrieval scores 84.2%, level with Mastra OM with a gpt-4o actor (84.23%, with gemini-2.5-flash as Mastra's observer and reflector). The 85.6% headline routes four of the six question types (SSA/SSP/KU/MS) to gpt-5-mini and keeps gpt-4o on TR/SSU, so it is not a matched-reader comparison. The wider LongMemEval-S frontier across all reader tiers and judge configurations spans 89-96% (Mastra OM at gpt-5-mini 94.87%, MemMachine 93.0%, Hindsight 91.4%, Neutrally 89.4%, agentmemory 96.2%). The adjacent stress-tests recorded on top of the 85.6% configuration all regress (the negative-finding rows in results/LEADERBOARD.md), so it is a local optimum for this retrieval and reader-router setup.
| Configuration | Accuracy | $/correct | Avg latency |
|---|---|---|---|
| 🚀 M-tuned + sem-embed + reader router + reader-top-K=5 | 70.2% | $0.0078 | 84 sec (p50 18 sec, p95 745 sec) |
| Same config at top-K=50 (prior, superseded) | 57.6% | $0.0505 | 265 sec |
| M-tuned (CharHash baseline) | 45.4% | $0.1348 | 40 sec |
Competitive with the strongest published M results in the LongMemEval paper. Table 3 of Wu et al., ICLR 2025 reports several GPT-4o configurations: round-level Top-5 at 65.7%, session-level Top-5 at 71.4%, round-level Top-10 at 72.0% (the paper's strongest). AgentOS at 70.2% with reader-Top-K=5 (its reader router sends four of the six question types to gpt-5-mini, so this is not a reader-matched comparison) sits between the matched-Top-5 round (65.7%) and session (71.4%) numbers and 1.8 below the paper's overall best (72.0%, Top-10).
The closest published external number is AgentBrain's 71.7% from their closed-source SaaS.
Among open-source memory libraries with publicly reproducible runs (per-case run JSONs at fixed seed, single-CLI reproduction), AgentOS is the only one on the public record above 65% on M. Every other memory-library vendor (Mem0 94.4% on its managed platform at a top_200 retrieval budget, answerer model and LongMemEval variant not named, per Mem0's docs; Mem0's open-source harness runs S by default; Mastra OM 84.2-94.9%, Hindsight 91.4%, Zep 71.2%, EmergenceMem 86%, Supermemory 81.6-85.2%, MemMachine 93%, Memoria 88.78%, agentmemory 96.2%, Backboard 93.4%, ByteRover 92.8%) publishes only the easier S variant. M's 1.5M-token haystacks exceed every production LLM context window, so vendors with prompt-stuffing or compression-based architectures avoid the variant.
git clone https://github.com/framerslab/agentos-bench
cd agentos-bench
pnpm install
pnpm build
# Set OPENAI_API_KEY and COHERE_API_KEY in your environment
# Download the LongMemEval-S dataset into data/longmemeval/longmemeval_s.json
pnpm bench setup --benchmark longmemeval-s
NODE_OPTIONS="--max-old-space-size=8192" pnpm bench run longmemeval-s \
--reader gpt-4o \
--memory full-cognitive --replay ingest \
--hybrid-retrieval --rerank cohere \
--embedder-model text-embedding-3-small \
--reader-router min-cost-best-cat-2026-04-28 \
--concurrency 5 \
--bootstrap-resamples 10000 \
--seed 42Expected wall-clock: ~10-15 min at concurrency 5. Expected cost: ~$3.84 in OpenAI reader and judge fees, plus OpenAI embedding charges and Cohere rerank charges, which the bench does not price.
These commands rerun the headline configuration on this version's defaults, which differ from the recorded 85.6% run in three ways (see Methodology): the classifier, observer, extractor and distractor calls and the presets' gpt-5-mini tier run on gpt-6-luna; abstention questions are graded with the abstention rubric; and the judge prompts are rubric version 2026-11-15.1. A rerun can score differently from 85.6%. The recorded run itself is under Run files.
The bench's routing primitives ship in @framers/agentos under @framers/agentos/memory-router: the MemoryRouter class, which picks a recall backend per query, and selectReader, which maps a question category to a reader tier through a preset table.
import { selectReader } from '@framers/agentos/memory-router';
selectReader('temporal-reasoning', 'min-cost-best-cat-2026-04-28'); // 'gpt-4o'
selectReader('multi-session', 'min-cost-best-cat-2026-04-28'); // 'gpt-5-mini'Methodology, per-category breakdowns, and all documented negative architecture findings (stress-tests of adjacent configs that regress) are at results/eval-matrix-v1/. The validated consumer default classifier is gpt-5-mini; two independent Phase B runs confirmed that upgrading to gpt-4o classifier costs 12× more per query without lifting accuracy on this benchmark's category mix. These numbers were measured on gpt-5-mini, which ends on 11 Dec 2026; runs from this version use gpt-6-luna for the classifier, observer, extractor and distractor calls and for the presets' gpt-5-mini tier.
Abstention questions. LongMemEval marks 30 of its 500 questions as abstention questions by an id ending in _abs (its README, the count); such a question keeps its base question type. The abstention questions in runs recorded before #17 were graded with their type's rubric, not the abstention rubric, and every LongMemEval figure above comes from such a run. The loader now reads the id (src/benchmarks/longmemeval/abstention.ts), so the judge grades an _abs question with the abstention rubric, as LongMemEval's own evaluator does (evaluate_qa.py), and a grading cached before the change is not reused for it.
Judge prompts. The LongMemEval judge prompts in src/judges/rubrics/longmemeval.ts match get_anscheck_prompt in LongMemEval's evaluator character for character (evaluate_qa.py at d6dc8b5), and tests/longmemevalRubricUpstream.spec.ts holds them to it. Runs recorded before #19, every figure above among them, used rubric version 2026-04-18.1, whose prompts differed: the knowledge-update prompt carried two extra sentences from the base prompt, the preference prompt opened with the base prompt instead of upstream's rubric wording, the abstention prompt ended "is not available" where upstream ends "is not", and the base and temporal prompts lacked upstream's space before the question. The version is now 2026-11-15.1, so no judgment cached under the old prompts is read back. LoCoMo and BEAM judge through the same prompts, so their judgments are graded again too.
The full write-up, with the per-category results and the cross-vendor comparison, is AgentOS on LongMemEval: 85.6% on S, 70.2% on M.
Direct apples-to-apples reproductions of vendor-published methods, instrumented with our cost+latency capture and run under our judge harness:
vendors/emergence-simple-fast/— wrapsEmergenceAI/emergence_simple_fast(their Simple Fast variant at 79% / 3.59 s median per their published numbers; we measure cost+latency in our harness so it can be compared apples-to-apples to AgentOS rows in the LEADERBOARD).- (queued)
vendors/mastra-om/—@mastra/memoryObservational Memory recipe - (queued)
vendors/supermemory/— Supermemory TS SDK - (queued)
vendors/mem0/—@mem0ai/mem0Python adapter
- Per-cell run JSON at seed 42 —
results/runs/, stored with Git LFS (see Run files). - 95% confidence interval computed by resampling per-case scores 10 000 times at seed 42 for every reported aggregate
- Judge false-positive rate probe per benchmark — LongMemEval-S 1% [0%, 3%], LongMemEval-M 2% [0%, 5%], LOCOMO 0% [0%, 0%].
- 8 negative architecture findings documented at
results/eval-matrix-v1/transparency-notes.md: Stage L Anthropic Contextual Retrieval, Stage I Mem0-v3-style entity-linking re-rank, Stage H hierarchical retrieval, two-call reader compounded with M-tuned, M-tuned flags compounded on S, all-OM Mastra-architecture clone on S, gpt-4o classifier upgrade, and 7 stress-tested adjacent configurations on the 84.8% baseline. - Per-vendor caveats — every cross-vendor accuracy/cost/latency comparison row footnotes which dimensions are apples-to-apples vs not. Mastra and Supermemory do not publish $/correct or per-case latency, so direct comparisons against them on those axes are unmeasurable until vendor-reproduction adapters land.
The run JSON and CSV files under results/runs/ are stored with Git LFS. A clone with Git LFS installed downloads every run file, about 2 GB; a clone with GIT_LFS_SKIP_SMUDGE=1 (or without Git LFS) holds small pointer files instead.
Fetch one run with Git, skipping the rest:
git lfs install
GIT_LFS_SKIP_SMUDGE=1 git clone https://github.com/framerslab/agentos-bench.git
cd agentos-bench
git lfs pull --include "results/runs/2026-04-28T19-06-42-271--longmemeval-s--gpt-4o--full-cognitive--ingest.json"Or download it directly, without Git:
curl -L -O https://media.githubusercontent.com/media/framerslab/agentos-bench/master/results/runs/2026-04-28T19-06-42-271--longmemeval-s--gpt-4o--full-cognitive--ingest.jsonThat file is the 85.6% LongMemEval-S run (passedCases 428 of totalCases 500).
Four run files are not published, because their per-case error text holds local build paths. Their pointers stay in the tree and their downloads answer 404. Three are crashed runs (the BEAM 100K and two LongMemEval-S runs below); the fourth is the superseded LongMemEval-M top-K=50 run (57.6%, 288/500) that results/LEADERBOARD.md and results/eval-matrix-v1/comparison-table.md cite:
2026-04-27T02-57-10-370--beam-100k--gpt-4o--full-cognitive--ingest.json2026-04-28T23-35-11-601--longmemeval-m--gpt-4o--full-cognitive--ingest.json2026-04-29T02-41-18-648--longmemeval-s--gpt-4o--full-cognitive--ingest.json2026-04-29T02-48-19-633--longmemeval-s--gpt-4o--full-cognitive--ingest.json
The run files quote questions, conversations and answers from the benchmark datasets, which keep their own licences:
- LongMemEval: MIT, Copyright (c) 2024 Di Wu (licence)
- LOCOMO: CC BY-NC 4.0 (licence); the LOCOMO run files are for non-commercial use
- BEAM: CC BY-SA 4.0 (dataset card); the BEAM run files are shared under the same licence
src/
benchmarks/ Benchmark adapters (LongMemEval-S/M/Oracle, LOCOMO, BEAM, micro-bench)
core/ Shared infrastructure: BenchmarkRunner, judge, cost tracker, cache
observational-memory/ OM-v10/v11 ingest pipeline
cognitive/ Embedders + cognitive-memory wiring
drivers/ --driver gmi: answers through an AgentOS agent (replay proxy, capture)
memory-router/ Reader router calibration tables (mirror of agentos's MemoryRouter)
readers/ HTTP reader adapters (OpenAI, Anthropic) + MockReader for tests
docs/ Blog post and architecture notes
results/
LEADERBOARD.md Top-level results table for all benchmarks
eval-matrix-v1/ v1 publication artifacts (transparency-notes, comparison-table)
runs/ Per-cell run JSONs and CSVs (Git LFS)
tests/ Vitest unit + contract tests (~80 tests pinning shipping behavior)
vendors/ Vendor-reproduction adapters (run their methods in our harness)
The CLI surface is the primary user-facing API; entrypoint at src/cli.ts. Programmatic API surfaces:
BenchmarkRunner(src/core/BenchmarkRunner.ts): orchestrates a benchmark run with configurable readers, judge, retrieval, and concurrency.MemoryRouterandselectReadership in@framers/agentos(@framers/agentos/memory-router) so consumer apps share dispatch logic with the bench.- Cognitive embedder factory at
src/cognitive/createCognitiveManager.ts. - Per-benchmark adapters under
src/benchmarks/implement a common runner contract.
Every public entrypoint has TSDoc; type-checked via pnpm exec tsc --noEmit -p tsconfig.json.
-
Rerun the LongMemEval-S 85.6% headline configuration: see Quickstart above.
-
Rerun the LongMemEval-M 70.2% headline configuration (on this version's defaults, as the Quickstart note describes):
# Download the LongMemEval-M dataset into data/longmemeval/longmemeval_m.json pnpm bench setup --benchmark longmemeval-m NODE_OPTIONS="--max-old-space-size=8192" pnpm bench run longmemeval-m \ --reader gpt-4o \ --memory full-cognitive --replay ingest \ --hybrid-retrieval --rerank cohere \ --rerank-candidate-multiplier 5 \ --hyde \ --embedder-model text-embedding-3-small \ --reader-router min-cost-best-cat-2026-04-28 \ --reader-top-k 5 \ --concurrency 5 \ --bootstrap-resamples 10000 \ --seed 42
-
Vendor reproduction (EmergenceMem Simple Fast): see
vendors/emergence-simple-fast/README.md.
--driver gmi answers each LongMemEval case through an AgentOS agent instead of the bench's own retrieve-then-read path: agent({ runtime: 'gmi' }) from @framers/agentos, with cognitive memory and the run's recall settings (src/drivers/gmiDriver.ts).
pnpm build
pnpm bench run longmemeval-s --driver gmi --reader gpt-4o-mini \
--embedder-model text-embedding-3-small --judge-model gpt-4o --budget 1600 --case-ids ids.json
# Hybrid recall, reranked by a cross-encoder in this process at a pinned commit of its repository
pnpm bench run longmemeval-s --driver gmi --reader gpt-4o-mini \
--embedder-model text-embedding-3-small --judge-model gpt-4o --budget 1600 --case-ids ids.json \
--recall hybrid --rerank local:cross-encoder/ms-marco-MiniLM-L6-v2@233902d25c440f23af6f7d6e94d2946bac0bee0aHow a case runs:
- One agent and one session per case. Each user turn of each haystack session goes through
session.send, in order. A local replay proxy at the agent's base URL (src/drivers/replayProxy.ts) answers each of those model requests with the dataset's own assistant turn (Noted.when the user turn has none), so the agent files the dataset's conversation and filing spends no reader tokens. - The agent files each replayed assistant turn as its own reply. When recall brings one back, the memory block shows it as a line in the agent's own words,
You said: ..., not as a fact: under Recent Experiences with--recall dense, in the one recall section with--recall hybrid(AgentOS #830, in@framers/agentos0.18.0). On 0.17.x the block showed those replies as facts, so a 0.17.x run's answers are not comparable with a 0.18.0 run's. The case-run cache keys by the installed release and never mixes them. - The session's history is cleared after every haystack session. At the question the reader's context holds no haystack turn: what the model knows of the haystack is what recall puts in the memory block.
- The first user turn of a haystack session is prefixed
(Conversation of <date>)and the question(Today is <question date>.). An agent files what it hears when it hears it, so the dates travel in the text. - The question reaches the model exactly as the driver asks it. On
@framers/agentos0.19.0 the reader request's last user message is two text parts: the application's note (one fixed line,[Note from the application, not from the person. It is for this reply only: never quote it or mention it.], then the memory block whole), then the question with its date line, unchanged (AgentOS #834). On 0.18.0 it was one string, the memory block afterContext:and the question afterUser Query:, so a 0.18.0 run's answers are not comparable with a 0.19.0 run's either; the case-run cache keeps them apart. - Runs made with
@framers/agentos0.19.0 and 0.19.3 are not comparable. Both case-run and case-result cache keys include the installed release, including for runs without a driver. - The question is the one request the proxy forwards to the provider, and only under the case's own key, which carries 128 random bits.
What reaches the provider: an embedding request for every filed line and every turn's query, plus one test embedding as each agent starts; the model list, which the OpenAI provider reads as it starts (the proxy forwards that read); one reader request per case, which offers the model no tool (the GMI agent builds its tools without the library's built-in date tool, which the full runtime also leaves out from 0.19.0 on, AgentOS #832); the judge's request, through the bench's own client as on every run. The agent and its embedder read OPENAI_API_KEY. OPENAI_BASE_URL may name https://api.openai.com or a stub on this machine (127.0.0.1, localhost, ::1), with no query or fragment (not even a bare trailing ? or #), and a dry run takes the stub alone: the key, the question and its memory block go to that host, so any other host, and the provider over plain http, is refused.
A local reranker (--rerank local:<model>@<revision>) downloads its weights from Hugging Face on first use, in a dry run too, and runs in this process; nothing about a memory leaves it. It runs on Transformers.js (@huggingface/transformers), which @framers/agentos installs as an optional dependency: an install without optional dependencies has no local reranker. Each case's agent loads the model as it starts, and no turn waits for the load. The library bounds each rerank in time and, after failures or timeouts in a row, skips rerank for a while; the turns that file a haystack rerank too, so a pause that begins while a case files can reach its question. A turn's rerank that has not run says why in memoryRecall.reranker (loading while the model loads, unavailable, timeout, error, backoff), and the turn keeps recall's order, so read that field on each case before taking a run as reranked. The models AgentOS lists, with the licence each repository states as AgentOS's reranking docs give it:
| Model | Licence |
|---|---|
cross-encoder/ms-marco-MiniLM-L6-v2 (AgentOS's default; its docs pin commit 233902d25c440f23af6f7d6e94d2946bac0bee0a) |
apache-2.0 |
cross-encoder/ms-marco-MiniLM-L12-v2 |
apache-2.0 |
BAAI/bge-reranker-base |
mit |
What a case's metadata holds:
memoryRecall: the turn's recall capture (memory-recall-capture/1), with ids, ranks, scores, outcomes, tokens and timings, never a memory's text or the query's. It is the record of the model call that answered the question: itsbudgetnames that call (hop), and itsdeliverygives what reached the model (memoryBlockTokens, the memory block as the prompt engine counted it).ingest: haystack sessions, user turns filed, assistant turns replayed, turns skipped, model requests beyond one per filed turn (extraModelRequests), and the filing time.upstream(the endpoint the case's requests went to),agentosVersion(the installed@framers/agentos),forwardedRequests,modelListReadsand the run'sgmiRecallsettings.
A driver case carries no retrieval score (Recall@K, NDCG, MRR): its recall is recorded in memoryRecall by memory id, not as retrieved haystack sessions.
A driver run records the same memoryMode and replayMode as a bench-path full-cognitive/observe run, so results/summary.json keys its row with the driver appended (longmemeval-s|gpt-4o|full-cognitive|observe|gmi) and the entry carries driver: "gmi". The two rows stand side by side: neither replaces the other. pnpm bench leaderboard names the driver in the row's System column, pnpm bench runs lists it in a driver column and the sweep report's cells table in a Driver column, and the sweep report's champion and footprint lines name it. The run file's name ends in the driver too (<started>--longmemeval-s--gpt-4o--full-cognitive--observe--gmi.json). Rows and run files of the bench's own path keep the names they always had.
The run file's config records gmiUpstream: scheme, host, port and base path, without credentials. A run built on BenchmarkRunner that names its endpoint is recorded in that form too, and a name that is not a URL or carries credentials, a query or a fragment is refused before the run starts. The case-run cache keys a driver run by the driver's version, the installed @framers/agentos release, that endpoint and the recall settings, so answers a stub gave never serve a run against the provider or against another stub, and answers one release gave never serve another. A run built on BenchmarkRunner without the CLI that names no endpoint is keyed by the one OPENAI_BASE_URL gives when it starts, and its run file records that endpoint. When a run names an endpoint in gmiUpstream other than the one OPENAI_BASE_URL gives, the run is refused before any case sends anything, and nothing is cached or saved for it: the driver sends where OPENAI_BASE_URL points, so the answers would otherwise be recorded and cached under an endpoint that never gave them. A run whose answers the cache already holds in full under the named endpoint sends nothing and is answered from the cache, since that endpoint gave the answers; when the cache holds only some of them, the whole run is refused. Each case sends through a replay proxy for the endpoint and key the environment names when it starts, so a second run in the same process with other values never reaches the first run's upstream. The reader's cost is priced from the provider's usage. The embedding cost is an estimate from the filed text, recorded under the tag <case id>:gmi-embedding-estimate.
| Flag | Effect |
|---|---|
--driver gmi |
Answer through the agent. The run file records memoryMode: full-cognitive and replayMode: observe. |
--budget <tokens> |
memory.recall.budget.totalTokens, the whole memory block a turn sends; 1 or more. Unset: the library default. |
--gmi-store memory|sqlite |
Keep memory in the process (the default) or in one SQLite file per case under the run's scratch directory, removed when the case ends. |
--recall dense|hybrid |
memory.recall.retrieval: dense finds a turn's memories by meaning; hybrid by meaning, by the turn's exact words and by recency, fused into one deduplicated pool. Unset: the library default. The capture records which ran (memoryRecall.retrieval) and each leg (memoryRecall.legs). |
--rerank none|local:<model>@<revision> |
memory.recall.rerank: no reranker, or a cross-encoder in this process, named by its Hugging Face model id and pinned to a whole commit id of its repository in lower case (40 or 64 hexadecimal characters; a branch, a tag or a shortened id can name other weights later). Unset: the library default. |
--case-ids <file> |
Run only the listed cases, in the list's order: a JSON array of question_id values, or an object with a tuning array. An id the dataset lacks fails the run. Works on any LongMemEval run; on the bench's own path the cost preflight counts the listed cases. |
--reader-snapshot <id> |
The dated snapshot every answer must come from (gpt-4o-mini-2024-07-18). Unset: the --reader id when it is itself dated, else no check. Part of the case-run cache key when set. See "Pinned snapshots and setup faults" below. |
--agent-memory default|on|frozen|gold, --frozen-from <file> |
What the agent has at the question; see "The agent driver and memory modes" below. |
--keep-prompts, --spend-stop <usd> |
Keep every forwarded request; stop starting cases at a spend limit. Both work on the bench's own path too; see "Kept prompts and the spend stop" below. |
Beside those, a driver run takes the options that do not belong to the bench's own retrieval and reading: --reader, --embedder-model, --judge-model, --sample, --sample-per-type, --stratified, --concurrency, --seed, --bootstrap-resamples, --judge-adversarial and its two settings (not in a dry run, on any path: the probe's synthesizer calls a provider), --data-dir, --results-dir and --dry-run. --embedder-model names an OpenAI embedding model (text-embedding-*, bare or openai:-prefixed); unset, the driver embeds with text-embedding-3-small.
The driver refuses, by name:
- every other option of
rungiven on the command line (--hybrid-retrieval,--hyde,--rerank-model,--rerank-candidate-multiplier,--reader-top-k,--retrieval-k,--profile,--ablate-mechanism,--observational-memory,--memory,--replayand the rest), since the agent does its own recall and reading and such an option would have nothing to act on; - a
--rerankother thannoneorlocal:<model>@<revision>at a whole commit id:cohereand any other remote provider, and an LLM judge, since a driver run sends memory text to no second vendor and measures what can become the library's default; - a reader router or a reader other than an OpenAI
gpt-*model, since a run measures one named model; - an embedder other than an OpenAI
text-embedding-*model, since the agent embeds through OpenAI's API at the same endpoint; --max-usd, since the driver has no cost projection yet: bound a run with--case-idsand--spend-stop;- a benchmark other than LongMemEval;
--budget,--gmi-store,--recall,--reader-snapshot,--agent-memoryand--frozen-fromwithout a driver (without one,--rerankis the bench's own Cohere reranker).
A run built on BenchmarkRunner without the CLI gets the same checks that hold for the whole run (the embedder, a gmiUpstream the environment does not give, OPENAI_API_KEY, the endpoint OPENAI_BASE_URL names) once, before any case runs, unless the cache answers every case. A refused run throws and writes no run file and no summary row, so it never replaces a driver row with a row of zeros. A case that errors in a run that goes ahead is scored zero, and neither its answer nor its score is cached; a zero cached for an errored case by an earlier release is scored again, so the case's next successful run is judged. A case whose judge failed (scoreMetadata.scoringError) is graded again on the next run from its cached answer: a failed grade is never served from the cache. Every case records where its answer and its grade came from in this run, answerFrom and gradeFrom (fresh or cache).
--driver agent answers each case through agent() on its default (legacy) runtime (src/drivers/agentDriver.ts). It files the haystack exactly as the GMI driver does (one session per case, the replay proxy answering each filing turn with the dataset's reply, the history cleared after each session) and asks the question last. --agent-memory says what the agent has at the question:
| Driver and mode | The agent | Memory at the question |
|---|---|---|
agent, default |
agent() with no memory option (it ignores memory; a provider is memoryProvider) |
none |
agent, on |
agent() with a Memory store of the case's own (SQLite under the run's scratch directory, graph and selfImprove on, as a souled agent opens its store) as its memory provider, its traces under the conversation scope key the library builds for the case's user |
keyword (FTS5) recall, at most 8 traces, within the hooks' 2,000-token budget |
agent, frozen |
agent() handed the block a --driver gmi run delivered on the same case (--frozen-from <that run's file>, made with --keep-prompts) |
that block, whole, as one record |
agent, gold |
agent() handed the case's gold sessions (answer_session_ids) |
those sessions, whole, one record each |
gmi, default |
agent({ runtime: 'gmi' }) with no memory option |
none; nothing is embedded |
gmi, on (the default) |
as above, with cognitive memory | the run's recall settings |
- The memory store's provider (
src/drivers/storeProvider.ts) makes the calls a souled agent's own provider makes in@framers/agentos0.21.5: each side of a turn remembered as an episodic trace of the conversation's scope with its speaker, and at most 8 traces recalled by the turn's text, best first, each a line[<speaker>, <age>] <text>while the lines fit the budget. It has no soul, no wiki pages and no policy hook. Whether its block matches a souled agent's byte for byte is not tested here, so a table labels this row "library store". - A provider's recall reaches the model as
agent()sends any: a<memory_recall>JSON block in a user-role message before the question, each item's text with^in place of each run of whitespace. A frozen block is sent as one such item; the GMI runtime sends the same text in its application note. --frozen-frommust be a--driver gmirun with memory on, which the run checks before any case; a case it kept no request for (it errored, or the run was made without--keep-prompts) errors and sends nothing. The run file's SHA-256 is part of the case-run cache key.--budget,--gmi-store,--recalland--rerankset cognitive memory's recall and are refused unless the run is--driver gmiwith memory on;frozenand--frozen-fromgo together.- A filing turn whose result carries
memoryWriteis waited for before the next is sent, so recall at the question reads every filed side.metadata.ingest.writescounts the sides written, skipped and failed, andmetadata.filingMapmaps each written trace id to its dataset session id; a kind whose turns report no writes (cognitive memory under--driver gmi) leaves both empty. A memory-store case also recordsmetadata.storeRecalls: each recall's candidates by trace id, with rank, score and whether the block kept it. - A run file, its summary row and its row in
pnpm bench runscarry the driver and the mode:agent-default,agent-on,agent-frozen,agent-gold,gmi-default, andgmifor--driver gmiwith memory on, as before. The case-run cache keys the mode, except for--driver gmiwith memory on, whose keys are unchanged. - The embedding estimate of a case that embeds (
--driver gmiwith memory on) is booked even when the case fails partway, for the text it filed.
--keep-promptskeeps what the model saw. Under a driver, each case'smetadata.keptRequestsholds every forwarded request's body and themodelits response named; on the bench's own path (LongMemEval, the two-call reader included, BEAM and LOCOMO),metadata.keptPromptholds the reader's system and user text and the answering model. A kept request carries the memory block and the question, so a run file grows by them. The flag is part of the case-run cache key, so a run that keeps prompts never takes an answer cached without them.--spend-stop <usd>bounds a run's spend from inside the process. Before a case starts, the run's booked spend (every case's, failed ones too) plus a reserve for each case in flight and for this one must stay under the limit; the reserve is the largest cost a finished case of the run has booked, $0.02 before any has. A case that does not fit beside the running ones waits for one of them to finish and is checked again; it is given up only when none is running. A case past the limit is not started: the run file lists it innotRunCaseIds, apart from itscases, so it counts nowhere in the run's statistics, and a run it cut short holds fewer cases and never replaces a fuller summary row. The reserve estimates a case's cost from the cases before it; it does not cap one, so the cases already running can still carry the run past the limit.
An alias such as gpt-4o can move to a newer snapshot between two runs of one commit, so a run that is compared with another pins the snapshots it reads (src/core/snapshots.ts):
- A dated id (
--judge-model gpt-4o-2024-08-06,--reader gpt-4o-mini-2024-07-18) is sent as written and priced as its model (gpt-4o,gpt-4o-mini). The bench's OpenAI client records themodeleach response names; a response that names none is recorded asunreported:<requested id>, never as the requested id alone, and is priced by the requested id wherever a response's model is booked. - Where a run pins a snapshot (a dated
--judge-model, a dated--readeron the bench's own path, a dated--readeror--reader-snapshotunder the driver), a response that names no model, or another snapshot, stops the run before that case is graded. Under the driver the replay proxy reads themodelof every forwarded response, and each case records them asreturnedModels. - A refused key (HTTP 401 or 403,
invalid_api_key) and an exhausted quota (insufficient_quota) stop the run the same way: every later case would meet them, and a wrong answer is the wrong place for them (src/core/setupFault.ts). They are read from the response's status and error code (the bench's readers throw aProviderHttpErrorthat carries both), never from words its body echoes; free text is read only inside AgentOS's wrap of a provider's own message (LLM provider error ...: You exceeded your current quota,... Incorrect API key provided). Under the driver the replay proxy reads the status and error code of each response it forwards, since the agent's error keeps only the provider's message (a 403 reads "Project does not have access to model.").
A stopped run starts no further case, lets the cases already running finish, and then throws setup fault: <reason> (the CLI exits 1 with that line); a setup fault outranks any other error a running case met. It writes no run file and no summary row. Answers already cached stay cached; no grade is cached for a case its judge stopped. A dated judge's grades are cached under a tag of their own (judge-snapshot-checked/1, in the case-result key and the judgment memo), so a grade kept before the snapshot check existed never serves a pinned run.
CI runs the type check, the suite, the build and the built CLI on every ready pull request (.github/workflows/ci.yml), against the published @framers/agentos named in package.json. The lockfile is resolved by the Lockfile workflow and committed from its artifact; package.json and pnpm-lock.yaml change together. The suite needs the BEAM 100k files queries.json.gz and documents.json.gz under data/beam/100k/. CI fetches them from a pinned commit of the vectorize-io/agent-memory-benchmark mirror, the source the CLI and the BEAM loader name in their setup messages, and verifies their sizes and SHA-256 checksums, and caches them. To get the same files locally, run the following from the repository root (the CLI's setup command does not yet register BEAM):
mkdir -p data/beam/100k
beam_source=https://raw.githubusercontent.com/vectorize-io/agent-memory-benchmark/28b644bd4dd653c0207c7507280439390c829155/data/beam/100k
for file in queries.json.gz documents.json.gz; do
curl --fail --location --retry 3 --output "data/beam/100k/$file" "$beam_source/$file" || exit 1
doneThe expected sizes are 56,681 and 2,745,433 bytes respectively; the pinned checksums are in the CI workflow. BEAM is CC BY-SA 4.0; the dataset files are downloaded for testing and are not redistributed by this repository.
Apache 2.0 — see LICENSE.