You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part 1 — agentic real-trajectory benchmark at scale:
- fetch-swe-trajectories.sh now STREAMS a bounded N of real mini-swe-agent
trajectories from the 66k-trajectory Kwai-Klear SWE-smith dataset (no full
download); parser handles both the tool-role and user-role observation formats.
- Run at scale: 400 real trajectories, 10,392 real agent steps (637 failed) —
MemTrace eliminates dead-branch contamination 10.2% -> 0.0% at a ~1pt recall cost.
Part 2 — dogfooding A/B, harder scenario + the negative-memory win:
- Redesigned so the fix (a required setup step) is learnable ONLY by running the
check (not readable from files), and each condition gets a fresh project.
- The agent's memory now surfaces MemTrace's failure-aware NEGATIVE evidence
(avoided-attempts), not just what worked. Result (8 trials): A repeated the
mistake 8/8, B (MemTrace) 0/8, and B solved 42% faster (14 vs 24 steps).
plot_benchmarks: benchmark_agentic_trace.png + benchmark_dogfood.png. README §2
now leads with these real agentic wins (real trajectories + dogfooding); sections
renumbered. Deterministic 16/16 intact; both benchmarks opt-in + resource-light
(bounded stream, sandboxed executor with a destructive-command deny-list).
MemTrace is evaluated on a **real large-scale dataset** (LongMemEval — real embeddings + real LLM) plus supporting layers: a **real execution-tree benchmark**where its agentic edge shows, a **deterministic correctness suite**, and additional real-LLM checks — all reproducible.
179
+
MemTrace is evaluated on a **real large-scale dataset** (LongMemEval — real embeddings + real LLM), on **real agent trajectories + live dogfooding**(its agentic home turf), and on a **deterministic correctness suite** — plus supporting synthetic/real-LLM layers. All reproducible.
180
180
181
181
### 1. LongMemEval — real dataset at scale (real embeddings + real LLM)
<sub>Kept light on purpose: embeddings come from the API (not a local model), the 264 MB dataset is stream-parsed, and each question uses a fresh in-memory store — peak RSS ~100 MB, near-idle CPU. Embeddings are cached so floor/config sweeps don't re-embed. Opt-in; needs the dataset + an LLM/embedding endpoint.</sub>
224
224
225
-
### 2. Real execution-tree benchmark — where MemTrace's agentic edge shows
225
+
### 2. Real agent trajectories + dogfooding — MemTrace's home turf
226
+
227
+
Where MemTrace is *built* to win — now measured on **real** data, not synthetic markers.
228
+
229
+
**Real SWE-agent trajectories.**`app/benchmark/agentic_trace_bench.py` ingests real [SWE-agent](https://github.com/SWE-agent/SWE-agent) execution trajectories (agents solving SWE-bench / SWE-smith issues; a failed step = non-zero `<returncode>`) into the real runtime with failed steps rolled back, then A/B compares retrieval over the identical memory. Latest run: **10,392 real agent steps (637 failed) across 400 trajectories**.
|| dead-branch contamination | recall of working commands |
236
+
| --- | --- | --- |
237
+
| A: plain vector | 10.2% | 84.8% |
238
+
| B: **MemTrace**|**0.0%**| 83.5% |
239
+
240
+
A plain vector store re-surfaces the failed commands the agent already abandoned; MemTrace's gate isolates **all** of them (**10.2% → 0%**) at a ~1-pt recall cost — on real traces, at scale.
241
+
242
+
**Dogfooding — does memory stop an agent repeating a mistake?**`app/benchmark/dogfood_agent.py` runs a **sandboxed** coding agent (a real LLM proposes shell commands; a deny-listed executor runs them in a throwaway project) as an A/B: **A = no memory** vs **B = MemTrace**, over 8 trials of a task whose fix (a required setup step) is only learnable by *trying* it.
243
+
244
+
<palign="center">
245
+
<imgsrc="docs/assets/benchmark_dogfood.png"width="560"alt="Dogfooding: MemTrace's negative memory stops the agent repeating a mistake in all 8 trials, 42% fewer steps">
246
+
</p>
247
+
248
+
|| trials it repeated the mistake | steps to solve |
249
+
| --- | --- | --- |
250
+
| A: no memory |**8/8**| 24 |
251
+
| B: **MemTrace**|**0/8**| 14 |
252
+
253
+
With MemTrace's failure-aware **negative memory** (the *avoided-attempts* channel a plain vector store doesn't have), the agent avoids the mistake it made before in **every** trial and solves **42% faster**.
254
+
255
+
```bash
256
+
./scripts/fetch-swe-trajectories.sh # stream N real trajectories (bounded, MEMTRACE_SWE_N)
257
+
uv run python -m app.benchmark.agentic_trace_bench --dir /tmp/swe_trajs --output-dir reports
uv run python -m app.benchmark.dogfood_agent --trials 8 --output-dir reports
260
+
```
261
+
262
+
### 3. Synthetic execution-tree — the mechanism in isolation
226
263
227
264
This is the setting a plain vector store structurally cannot represent. `app/benchmark/trace_bench.py` drives the **real `MemoryRuntime`** to build a long-horizon *execution tree* per scenario: a run of many subgoals, where each subgoal may make one or more attempts that **fail and get rolled back** (dead branches) before a **recovery** attempt succeeds. Memories are created by the real write path, so they carry genuine `branch_status` / state-node provenance, and retrieval runs the full pipeline (state tree → active-path filtering → admission gate → compaction). Deterministic, no LLM. Latest run: **120 runs × 10 subgoals = 1,200 probes**.
228
265
@@ -245,7 +282,7 @@ Every dead-branch fact the run abandoned leaks into a plain-vector store; MemTra
A deterministic **3,000-record** run (`app/benchmark/dataset_bench.py`) isolates the mechanism *and its cost*. It's not a one-sided win: MemTrace's gate removes ~79% contamination plain vector admits, but the *same* isolation over-drops the ~15% of correct facts that happen to sit on a failed branch. Net, it nearly doubles clean context (45% → 85%):
0 commit comments