SlotGuard: Stop Oversharing Private Local Context in LLM Agent Transcripts

summary

The gist

LLM agents can leak privacy (e.g., paths, emails) and credentials (e.g., API keys) as agent observations (e.g., tool outputs, shell logs…

In short

LLM agents leak sensitive data like paths and API keys through their conversation logs. SlotGuard introduces a local transcript boundary that hides this private information while keeping agents functional. It achieves this by rewriting structural elements into typed slots and replacing secrets with synthetic, format-preserving values, creating a robust privacy layer.

Key concepts

Structural Bindings
These are specific pieces of data in an agent's transcript, such as file paths, workspace roots, or hostnames. SlotGuard identifies these elements because they represent sensitive context that could reveal the agent's environment or internal structure.
Format-Preserving Synthetic Values (FPS)
Instead of completely hiding secrets like API keys, SlotGuard replaces them with new values that look and behave like the original secret in terms of format. This allows the system to maintain the structural integrity needed for agent reasoning while ensuring the actual sensitive data is never exposed.
Session Graph (SEG)
This lightweight graph tracks relationships between protected values across different parts of a conversation. It helps protect against leakage even when exact string matches are missed, by recording conservative links between a secret and its observed variants within a single session.

Terminology used across episodes

This episode discusses

The paper

SlotGuard: Stop Oversharing Private Local Context in LLM Agent Transcripts · Read on arXiv

Haocheng Xia, Yongjoo Park

Siebel School of Computing and Data Science, University of Illinois Urbana-Champaign

LLM agents can leak privacy (e.g., paths, emails) and credentials (e.g., API keys) as agent observations (e.g., tool outputs, shell logs, and file reads) are appended to provider-bound transcripts. Existing placeholder redaction is brittle: it can miss embedded or cross-turn references, over-redact benign lookalikes, and destroy the structure useful for reasoning. We present SlotGuard, a local transcript boundary that can hide sensitive data while retaining agents' performance. SlotGuard rewrites structural bindings as typed, suffix-aware slots, replaces secrets with format-preserving synthetic values, links cross-turn references with a lightweight session graph, and restores raw values only inside the trusted runtime. On controlled repository-oriented agent transcripts, SlotGuard removes all 20,814 annotated structurally sensitive characters across 9,229 paths and reduces credential leakage to 0.0% across 852 planted values. It remains close to raw-transcript task success across four upstream models, while generic redaction drops to 2.5%. Transcript rewriting takes a median of 14.424 mu s per agent turn. The code is publicly accessible at https://github.com/illinoisdata/SlotGuard.

Transcript

Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.

Nadia: I'm Nadia.

Elias: And I'm Elias, here with Priya.

Nadia: We're looking at the paper: "SlotGuard: Stop Oversharing Private Local Context in LLM Agent Transcripts".

Elias: Here's the gist of the paper. LLM agents can leak privacy (e.g., paths, emails) and credentials (e.g., API keys) as agent observations (e.g., tool outputs, shell logs, and file reads) are appended to provider-bound transcripts <ref:2607.17147#pg2>.

Nadia: SlotGuard presents a local transcript boundary that can hide sensitive data while retaining agents’ performance <ref:2607.17147#pg3>.

Elias: Pruning redundant reasoning tokens SlotGuard rewrites structural bindings as typed, suffix-aware slots, replaces secrets with formatpreserving synthetic values, links cross-turn references with a lightweight session graph, and restores raw values only inside the trusted runtime <ref:2607.17147#pg4>.

Nadia: The system identifies structural bindings and secret values as two orthogonal privacy surfaces in provider-bound LLM agent transcripts <ref:2607.17147#pg4>.

Paper summary: Nadia: So we’ve seen how SlotGuard tackles the problem of LLM agents leaking private local context when their tool outputs or file reads get added to transcripts. The main thesis is that existing redaction methods are too fragile because they miss references across turns and can over-redact harmless things that actually help the agent reason.

Elias: SlotGuard proposes a local transcript boundary that acts as a filter between the agent's runtime and the upstream model provider. Its core claim is that by rewriting structural bindings into typed slots and substituting secrets with format-preserving synthetic values, we can hide sensitive data while keeping the agents’ performance intact.

Priya: Before we get into the technical how do they define what constitutes a structural binding versus a secret value? It sounds like a lot of different kinds of sensitive data are involved here.

Nadia: They identify these as two separate surfaces. For structural bindings, they’re things like paths and workspace roots. For secrets, it’s credential-shaped strings, like API keys or tokens that can grant permissions if leaked.

Elias: They handle the structural ones by making them deterministic typed slots where the hash of the value and some secret key stays stable within a session but doesn't leak across different sessions. For those secrets, they use format-preserving synthetic substitution to create fresh, safe values from that same format class.

Priya: That sounds like they’re trying to maintain a functional representation for the model while destroying the actual sensitive information. But what happens when the agent needs that raw data back later?

Nadia: SlotGuard restores those raw values only inside a trusted runtime when a local tool call actually requires them. This is guarded rebinding, which rejects any attempts to spoof or misuse those handles outside of that safe environment.

Elias: They also link cross-turn references using a lightweight session graph. This lets the system track the relationships between different pieces of information over time, extending protection beyond just exact string matches using conservative links between protected values and observed variants.

Priya: So it’s not just about masking; it’s about creating a way for the agent to function securely by managing its context flow as well. That seems like a more robust approach than simple blacklisting or replacement labels, right?

Nadia: Precisely. The key contribution is integrating that typed structural abstraction, the format-preserving synthetic secret substitution, the cross-turn tracking via the session graph, and guarded local rebinding all into one boundary layer. It’s not just one trick; it’s a whole system for managing privacy within agent workflows.

Elias: The authors are showing that this systematic integration of these components results in removing all providervisible structural leakage while preserving execution cues across tested workloads, which is what makes the results compelling.

Priya: It seems they’ve done a lot of work to ensure their method doesn't just hide data but actually preserves the agent's ability to perform its intended tasks. I’m curious how they measure that preservation, specifically for those structural bindings and credentials.

Nadia: They show that on controlled repository-oriented agent transcripts, SlotGuard removes all twenty thousand eight hundred fourteen annotated structurally sensitive characters across nine thousand two hundred twenty-nine paths, while reducing credential leakage to zero point zero percent across eight hundred fifty two planted values.

Elias: And they also showed that generic redaction methods they compared against dropped task success to two point five percent, which shows how much better this method is at maintaining the agent’s utility.

Priya: It seems like a significant win for anyone trying to deploy these agents in environments where data privacy is a concern. This moves the conversation toward building local boundaries that mediate both transcript privacy and tool access.

Conclusion: Nadia: So looking at the whole paper on SlotGuard, it’s clear they’ve developed a system that addresses the specific problem of oversharing private local context from LLM agents in transcripts. The authors are Haocheng Xia and Yongjoo Park.

Elias: The implication is that we can have these powerful AI agents interact with our systems more safely knowing that their raw file paths or API keys aren't being broadcast unnecessarily to the model providers every time they make a tool call.

Priya: To put it simply, SlotGuard creates a way for an agent to be useful—to use its tools—while ensuring that the specific details of *where* those tools are pointing or *what* credentials it’s using stay private from external parties.

Nadia: Exactly. It's about creating a local capability boundary that mediates between the agent and the model provider, making sure raw values only come back when they are absolutely needed in the trusted environment where they belong.

Elias: The focus is on making these structural bindings stable and typed references so the model can still understand things like "this is a Python file" without knowing the exact path string. It’s about preserving workflow signals while adding this layer of privacy.

Priya: It seems like this work moves us toward a future where we can deploy agents in more sensitive settings with a concrete, measurable way to control exactly what information leaves our local environment.

Nadia: That’s the direction it points toward—a practical mechanism for managing transcript privacy that is tied directly to the agent's actual operational needs.

Elias: It’s a system that balances utility and security in a way that seems grounded in concrete operations, not just abstract security concepts.

More episodes

← Home