SlotGuard: Stop Oversharing Private Local Context in LLM Agent Transcri
SlotGuard is a local transcript boundary system that securely prevents LLM agents from leaking private context and credentials by rewriting sensitive data into format-preserving synthetic slots linked via a session graph, thereby achieving zero credential leakage and near-perfect task success without the brittleness of existing redaction methods.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a super-smart robot assistant that can do almost anything for you: it can read files on your computer, send emails, run code, and even talk to other software. To do these jobs, the robot needs to see your private information, like your file paths, your email address, and even secret passwords. But here's the catch: to figure out what to do next, the robot often has to send a summary of its work to a giant, cloud-based "brain" (a large language model) owned by a tech company. This summary is called a "transcript."
The problem is that this transcript is like a diary entry that gets sent to a stranger. If the robot accidentally writes down your secret password or your home address in that diary, the cloud company might see it, store it, or even use it to train their future robots. It's like asking a friend to help you bake a cake, but you have to send them a photo of your kitchen, and in that photo, your house key is lying right next to the flour. You want your friend to see the kitchen so they can tell you how to mix the batter, but you definitely don't want them to see your key. This paper tackles the tricky question of how to let the robot see your private world without letting the cloud brain peek at your secrets.
Enter SlotGuard, a clever new system designed to act as a "privacy bouncer" right inside your computer. Think of SlotGuard as a magical translator that sits between your robot assistant and the cloud brain. Its job is to rewrite the robot's diary before it leaves your house. Instead of letting the robot write down your actual secret password (like SuperSecret123!), SlotGuard swaps it for a fake, but perfectly shaped, placeholder (like 🔑-SYNTHETIC-KEY-99).
Here is the magic trick: the fake placeholder looks and feels exactly like the real thing to the cloud brain. If the real password was a long string of letters and numbers, the fake one is also a long string of letters and numbers. If the real file path was /Users/Alice/Secrets/Plan.pdf, the fake one might look like [REPO_ROOT_1]/Secrets/Plan.pdf. The cloud brain can still read the structure—it knows it's a file, it knows it's a secret, and it knows how to talk about it—but it has no idea what the actual secret is. It's like giving the cloud brain a map where the treasure is marked with a generic "X" instead of the real coordinates.
But the magic doesn't stop there. When the cloud brain sends back instructions like "Go open that file," SlotGuard catches the message before it reaches your robot. It checks its own secret list, sees that [REPO_ROOT_1] actually means /Users/Alice/Secrets/Plan.pdf, and swaps the fake back to the real thing only inside your trusted computer. The robot then opens the real file, and the cloud brain never knew the real name existed.
The researchers tested this system with some serious homework. They created thousands of fake scenarios where robots were trying to do tasks involving sensitive data, like reading private documents or using secret keys. They found that without SlotGuard, the robots leaked almost everything—100% of the time. Even simple "redaction" methods, which just replace secrets with words like [PASSWORD], were a disaster; they broke the robot's ability to do its job, causing it to fail 97.5% of the time because the robot got confused by the missing details.
SlotGuard, however, was a game-changer. In their tests, the full version of the system (which includes a smart tracking graph) successfully hid all planted credentials and stopped all credential leaks (0.0% leakage). For structural data like paths and emails, it removed 100% of the visible sensitive characters, with the exception of one specific edge case involving root-owned absolute paths that remains a minor gap in the current prototype. Even better, it didn't break the robot's brain. The robots using SlotGuard were almost as good at their jobs as if they had seen the real secrets, keeping their success rates high across different models. The system is also incredibly fast, taking less than a blink of an eye (about 14 microseconds) to rewrite a single turn of conversation, so it doesn't slow anything down.
The paper also points out what SlotGuard doesn't do. It's not a mind-reading shield; if the cloud brain is smart enough to guess your secret just from the context of the conversation, SlotGuard can't stop that. It also doesn't protect you if your own computer is already hacked. But for the specific problem of keeping your private data from leaking into the cloud transcripts, SlotGuard offers a robust, fast, and smart solution that keeps your secrets safe while letting your robot do its work.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.