CaMeL (Debenedetti et al., 2025)
What it is
CaMeL ("CApabilities for MachinE Learning") is a defence against prompt injection for tool-using agents, from Google DeepMind, Google and ETH Zürich (arXiv 2503.18813, March 2025). It wraps the model instead of changing it. A privileged model turns the user's trusted request into a program; untrusted data is only ever handled as values inside that program, so it cannot change what the program does. Every value carries capabilities, and security policies are checked before each tool call.
Model
- Two models. The privileged LLM sees only the user's request and writes a program (in a restricted Python subset). The quarantined LLM reads untrusted data (emails, web pages) and extracts values into a given schema; it has no tools.
- A custom interpreter runs the program and tracks data and control dependencies. Every value carries capabilities: its sources (which tool or person produced it) and its allowed readers.
- Policies: functions written in Python, one per tool, that look at the arguments and their capabilities and return allow or deny (for example, "send_email only if every recipient is an allowed reader of the body").
- Default: as written by each policy; tools without a policy are allowed unless configured otherwise (we did not check the code's exact default).
- Denied calls can be turned into a question to the user.
Formal semantics and what is proved
- The claim is security by design: control flow comes only from the trusted request, so injected text cannot add tool calls; data flows are tracked so policies see where every argument came from.
- The paper calls this "provable security". It is an argument from construction, not a stated theorem with a mechanized proof. Guarantees depend on the policies being right and on the interpreter tracking dependencies correctly.
- Result: on AgentDojo, 77% of tasks solved with the defence versus 84% without (later version; the first version reported 67%).
- Known gaps the authors and others discuss: side channels (for example, the number of loop iterations depending on private data), the quarantined model can still be misled into extracting wrong values within the schema, and writing good policies is hard.
Purpose and use case
None. The user's request plays the role of the trusted purpose.
Uncertainty
None explicit. The quarantined model's output is untrusted but treated as a definite value.
History and state
Within one task, dependencies are tracked across the whole program. No history across tasks.
What we can reuse
- The split between a trusted plan and untrusted values is the agent-level version of our split between facts and readings.
- Capabilities (sources, readers) on every value. Our "form" and "recipient" can travel with released values the same way, so later tool calls are checked against them.
- Turning a denied call into a precise question.
What it lacks for us
- Policies are arbitrary Python: no fixed algebra, no analysis, no proofs about policy sets.
- No forms, purposes or use cases; no owners; no organisation model.
- No probability for readings; no disclosure history.
- Its non-interference is informal.
Key references
- Debenedetti, Shumailov, Fan, Hayes, Carlini, Fabian, Kern, Shi, Terzis, Tramèr, "Defeating Prompt Injections by Design", 2025. https://arxiv.org/abs/2503.18813
- Code. https://github.com/google-research/camel-prompt-injection