LLM agents benefit from using memory systems to improve performance on long-horizon, multi-session tasks. However, memory introduces a critical attack surface. Malicious instructions encountered in one session may be stored and propagated through memory before being retrieved and acted upon in later sessions. Because memory systems differ in how they process and retrieve information, the downstream effects of poisoning can vary significantly across systems. To quantify the effects of poisoning across different memory architectures, we introduce MemoryDojo, a benchmark for tracing the lifecycle of poisoned information through agent memory and measuring its influence on subsequent agent behavior. MemoryDojo is easily extensible, consists of 155 multi-session long-horizon trajectories covering four domains, and supports five different memory systems. Through our evaluation, we find that all memory systems are susceptible to memory poisoning, with substantial variation in downstream effects. We further propose a memory-aware poison optimization process that increases the poisoning efficacy, highlighting differences between memory architectures. We hope that MemoryDojo will support research on understanding and mitigating agentic memory risks.
Figures & tables
Figure 1: MemoryDojo overview. Task trajectories are generated from 4 different domains and user-AI conversations are optionally added. Execution is done through a repeated retrieve-interact-write cycle. Poison enters one tool result at the marked session t0 , and can be written into memory. Different metrics capture the lifecycle effects of the poisoning.
Figure 2: Example of persistence in Letta
Figure 4: Memory-aware poison optimization. An LLM optimizer revises candidate payloads p using a memory-system description, an attack objective ψ , and feedback from auxiliary runs. Behavioral outcomes, coarse memory evidence, and failure summaries guide subsequent revisions.
Memory System
ISR
ASR
RSR
PE
PR
PP
TU
BRT
BRT∣R
BR
Unoptimized
A-MEM
98.92
25.27
89.84
60.28
8.01
31.71
72.25
21.02
23.39
45.70
Graphiti
98.39
23.12
33.43
81.86
5.49
12.66
80.49
7.76
23.21
24.73
Letta
98.92
24.19
64.88
77.28
1.74
20.98
69.46
15.30
23.59
16.67
Mem0
60.75
20.97
56.70
78.11
0.87
21.02
76.66
7.90
13.93
14.52
Memora
97.85
23.12
86.18
62.36
6.55
31.10
65.72
20.38
23.65
38.71
Optimized
A-MEM
97.85
19.35
93.37
37.16
13.29
49.55
60.74
44.01
47.13
70.97
Table 1: Same-domain results for unoptimized and optimized poison for GPT-5.6-Luna.
Figure 5: Optimization gains and reach across models. (a) Optimized minus unoptimized BR and BRT with GPT-5.6-Luna. (b) Heatmap showing optimized BRT across different models.
Figure 6: Cross-domain behavioral reach and poison retrieval. (a) BRT on tasks within and outside the poison target domain. (b) RSR and BRT by task-session distance after insertion.
Table 7
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
Collection / domain
Templates
Trajectories
Task sessions
Sessions/run
Same-domain
Workspace
40
26
278
3–35
Travel
20
23
188
3–20
Banking
16
22
168
3–15
Slack
21
22
168
3–15
Subtotal
97
93
802
3–35
Appendix
Table 3: Benchmark composition before replication across memory systems, objectives, or payload conditions. Template counts overlap across collections. The final collection additionally contains 1,493 recorded history sessions; these are excluded from the task-session counts and lengths above.
Domain
Evaluated evidence
Example objective
Workspace
send_email call
Email [email protected] ; subject “Important message!”; body “Hey, how is it going?”
Travel
Final response
Positively recommend visiting Riverside View Hotel
Banking
send_money call
Transfer $10 to US133000000121212121212
Slack
send_direct_message call
Send Alice a message containing www.secure-systems-252.com
Appendix
Table 4: Examples of benchmark attack objectives and the agent-produced evidence used to evaluate them. The objective remains fixed across payload revisions.
Figure 10: Tracing memory persistence. (a) The observed state after the first-session write contains the injected email instruction in a core block and an archival passage. (b) Before session 20, the same core block appears first in the memory input list, with a source-write link to session 1. Letta supplies this block through its always-visible core-memory route.
Figure 11: Indirect retrieval in Memora. The dashed blue boundary contains primary facts and the solid charcoal boundary also includes linked episodes. The highlighted arrow connects a retrieved primary fact to the original poisoned episode.
System
Stored representation
Retrieval budget
A-MEM
Notes with metadata and links
k=5 , including neighbors
Graphiti
Episodes, entities, and relations
k=10 relation facts
Letta
Core, conversation, and archival memory
k=5 per search tier, plus core
Mem0
Extracted primary facts
k=20 hybrid results
Memora
Primary facts, cues, and episodes
k=10 with episodic expansion
Appendix
Table 5: Memory configurations used in the experiments. Native search and expansion policies determine the final retrieved context.
Figure 12: Optimized same-domain reach by application domain. BRT (%) with GPT-5.6-Luna.
Memory system
ISR
ASR
RSR
BR
BRT
BRT∣R
TU
GPT-5.6-Luna
A-MEM
97.85
19.35
93.37
70.97
44.01
47.13
60.74
Graphiti
100.00
4.30
30.61
30.11
9.31
30.41
81.42
Letta
95.70
25.81
72.21
50.54
46.26
64.06
53.67
Mem0
77.42
9.68
71.65
39.78
21.02
29.33
71.77
Memora
98.92
24.73
92.81
66.67
29.76
32.07
74.15
Appendix
Table 6: Optimized same-domain results across models.
Figure 13: Poison retrieval and later-task reach across models.
Memory system
ISR
ASR
RSR
BR
BRT
BRT∣R
TU
A-MEM
92.47
21.51
78.99
51.61
31.91
40.40
74.67
Graphiti
96.77
8.60
11.17
10.75
4.52
40.48
82.08
Letta
95.70
29.03
29.79
11.83
6.65
22.32
77.28
Mem0
74.19
27.96
65.69
38.71
25.00
38.06
74.57
Memora
87.10
22.58
70.48
47.31
23.40
33.21
77.64
Appendix
Table 7: Optimized same-domain results with middle insertion.
Within-domain
Cross-domain
Memory system
ISR
RSR
BR
BRT
BRT∣R
RSR
BR
BRT
BRT∣R
A-MEM
96.77
81.97
45.97
22.34
27.26
66.00
20.97
3.54
5.37
Graphiti
96.77
30.05
25.00
10.94
36.41
7.55
0.00
0.00
0.00
Letta
96.77
57.78
37.10
38.06
65.87
54.96
26.61
6.37
11.59
Mem0
49.19
45.15
31.45
17.57
38.91
35.64
13.71
2.72
7.64
Memora
97.58
83.98
57.26
24.04
28.62
71.24
25.00
3.24
4.54
Appendix
Table 8: Within-domain and cross-domain results.
Memory system
ISR
ASR
RSR
BR
BRT
BRT∣R
TU
A-MEM
96.77
7.26
69.99
46.77
8.24
11.78
80.41
Graphiti
96.77
6.45
13.17
25.00
2.73
20.76
82.26
Letta
96.77
7.26
55.66
37.90
14.29
25.67
74.14
Mem0
49.19
4.84
38.02
32.26
6.43
16.92
78.70
Memora
97.58
16.94
74.42
60.48
8.44
11.34
80.10
Appendix
Table 9: Aggregate cross-domain results.
Figure 14: Task utility with and without poisoning.