Manuscript Offprint

arXiv:2609.10144

Kernel-Managed Shared Memory for System-Wide Personalization

Ryan Lum, Yongfeng Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

AI systems become more useful when they can adapt to the people using them, but in multi-agent systems, useful context learned by one agent often remains unavailable to others. We present kernel-managed shared memory, a system-level abstraction in which specialized agents write structured, tagged memories while the agent-system kernel – not individual agents – governs retrieval, privacy enforcement, and prompt injection. We implement and evaluate this design on AIOS and compare it against three alternatives across three assistant models (GPT-4o, Llama-3.1:8B, Qwen-2.5:7B) and 1,800 total trials. Against an unmanaged external memory backend (Mem0) using identical underlying storage, kernel-managed retrieval and injection improve personalization scores by 2.4–4.0 points on a 5-point scale (e.g., 1.05 → 4.69 profile usage on GPT-4o), with every comparison significant at p<10−18p < 10^{-18}. Against standard retrieval-augmented injection, gains are similarly large and consistent across all three models. Against full, unfiltered context concatenation – a soft ceiling on available context rather than on response quality – kernel-managed injection statistically matches performance on two of three models and shows a small, model-specific deficit on the third, while using substantially shorter prompts: end-to-end latency is 15–61% lower across all three models, with corresponding reductions in per-call token usage and inference cost. These results indicate that centralizing memory management in the agent-system kernel, rather than leaving retrieval and privacy enforcement to individual agents, delivers most of the personalization benefit of unconstrained context at a fraction of its cost.

1 Introduction

Personalization is a key ingredient for making AI systems useful: a system that remembers a user's preferences, current work, and past interactions produces more relevant responses over time. This is especially true in multi-agent systems, where different agents learn different parts of a user's context – one agent may learn stable preferences, another current task context, a third may respond directly to the user – and if that information stays isolated, the system cannot behave coherently as a whole.

Figure 1 contrasts two ways of organizing this. Under agent-managed memory (Figure 1a), each agent independently retrieves, filters, and injects its own memory, duplicating logic across agents and leaving privacy enforcement to per-agent convention – a design that is easy to get wrong in exactly the way we describe in Section 3.3. We instead propose kernel-managed shared memory (Figure 1b): agents write structured, tagged memories, while a runtime layer distinct from any individual agent – the agent-system kernel – centralizes write ordering, privacy enforcement, retrieval, ranking, and injection. This makes personalization a systems capability rather than repeated application-level logic. We instantiate and evaluate this design on AIOS, an existing operating-system-style framework for LLM-based agents, though the underlying abstraction is not specific to AIOS.

Preprint.

Figure

Figure 1: Kernel-managed shared memory centralizes retrieval, privacy enforcement, and prompt injection at the agent-system kernel instead of leaving them to individual agents (left vs. right), matching full-context personalization quality at a fraction of the latency and token cost (Section 4.4).

We evaluate this approach against three alternatives – an unmanaged external memory backend, standard retrieval-augmented injection, and full unfiltered context concatenation – across three assistant models and 1,800 total trials. Kernel-managed shared memory substantially and significantly outperforms the unmanaged memory backend and standard retrieval-augmented injection on every model tested. Against full unfiltered context, a soft ceiling on available context rather than on response quality, kernel-managed injection statistically matches performance on two of three models and shows a small, model-specific deficit on the third, while using substantially shorter prompts and correspondingly lower latency and token cost. These results support the paper's main claim: centralizing memory retrieval, privacy enforcement, and injection in the agent-system kernel delivers most of the personalization benefit of unconstrained context at a fraction of its cost, and does so more reliably than either an unmanaged memory backend or standard retrieval augmentation.

References (26)