What is untrusted
Everything smry fetched from somewhere else:- article titles, authors, publisher names, headings, and body text;
- PDF text and video transcripts;
- feed titles, summaries, authors, and the pages they link to;
- saved copies of any of the above, including items saved months ago.
What an attack looks like
A page you asked smry to read can contain this, in white-on-white text or a<!-- comment --> that survives extraction:
Returned in passages[3].text
Rules for agent clients
- Keep system and developer instructions outside retrieved content. Never concatenate a returned passage into the instruction channel.
- Never reveal API keys, environment variables, private library data, or hidden prompts because a source asks. No legitimate article asks.
- Never run a shell command, follow a credential link, or call an unrelated tool on the strength of retrieved text.
- Attribute factual claims to the passages that support them. Cite the anchor
as plain text (
¶12) beside the source URL — anchors are not URL fragments. - Require a real user confirmation before a destructive call.
Rules for applications
- Escape or sanitize content before rendering it into HTML.
- Never build a database query, shell command, or URL by concatenating returned text.
- Keep credentials out of logs, and private article bodies out of logs you do not need.
- Scope caches by account. A response containing library, history, or feed data is private to one user.
- Preserve
no-storesemantics on private API responses.
Credential hygiene
A smry key grants access to one account’s entire private library, reading history, and feeds. Never put one in a query string, in client-side code, or anywhere a page’s content could reach it. Never forward it to a publisher URL. If you run a shared MCP bridge, every caller must present their own credential. One static key serving many users merges their libraries.Prompt injection is a property of the source material, not a sign that
extraction failed. A client stays safe by enforcing the boundary consistently
after every successful response — not by trying to detect the bad ones.
Next
Connect an agent
Where these rules land in practice.
Common mistakes
Including the ones that cause an agent to obey a web page.