All articles
forge ai-agents security 4 min read

Your agent's documents shouldn't leave your platform

Every time an agent renders a PDF through a third-party service, your content leaves your perimeter. We built the in-house path so it never has to.

by Dmitry Creed

Here is the failure mode that is easy to miss: your agent produces a beautiful, professional document and hands it back to the user. Everything works. The PDF is there.

What you did not notice is that the content of that document — the client proposal, the contract summary, the research brief — just made a round trip through a public third-party rendering service. It left your infrastructure. It was processed on someone else’s servers, under their data-retention policies, subject to their logging configuration.

This is not hypothetical. It happened to us.

How the gap opens

Building an agent that produces documents is surprisingly easy until you need a real PDF — not a text dump, not a Markdown file, but a styled, paginated document a person can open and use. At that point, most implementations reach for a free web service. There are dozens of them. They accept HTML or a URL and return a PDF. They are fast, well-documented, and completely outside your control.

The practical result is that every agent in your fleet that generates a document has a dependency on an external service you did not choose consciously, did not audit for data handling, and cannot remove without rewriting the generation logic.

Researchers studying AI agent toolchains have started calling this class of problem tool-chain exfiltration: data leaving the system boundary not through an attack, but through a legitimate tool that happens to route content outside the perimeter. A paper published on arXiv this month demonstrates that a legitimately signed, policy-allowed MCP tool can embed sensitive data in outbound requests while doing its advertised job — and that standard runtime defences miss it. The PDF-via-third-party case is structurally identical, except it is not even a concealed attack: the routing is in plain sight.

Meanwhile, the MCP specification itself notes that authorization between an agent and a tool server is optional. The gap is designed-in, not an oversight.

What we built instead

Forge agents can now render PDFs entirely in-house.

The mechanism is straightforward: the agent passes HTML or a URL to a rendering tool, Forge’s own headless browser processes it, and the result comes back as a permanent public download link. The browser is part of the fleet. The rendering happens inside the same infrastructure as the rest of the agent’s work. Nothing leaves the perimeter.

This matters for chat-surface agents in particular. A chat agent has no shell, no file system access, and no way to run a local rendering process. Before this change, producing a real document from a chat agent meant either accepting the third-party routing or not offering the capability at all. Now it means using the same tool that workflow and pipeline agents use — the same code path, the same infrastructure boundary.

The output is a real PDF: multi-page, styled, with the structure and typography that the agent’s HTML specifies. We verified the output file format directly — it is a standard PDF produced by a real browser engine, not a heuristic approximation.

The case for thinking about this now

The industry is in a period where agent capabilities are expanding faster than the security perimeter around them. Tool catalogs are growing. MCP servers are proliferating. Every new integration adds a new surface area.

Most of that surface area is benign. But the pattern of “legitimate tool, external routing, unreviewed data handling” accumulates quietly, and the cost of discovering it is typically paid after a client asks where their proposal went, not before.

The question to ask about any tool an agent calls is not just “does it do what I need?” but “where does the data go, and who controls it?” For PDF generation, the answer used to require an uncomfortable trade-off. Now it does not.

What this looks like for teams building on Forge

If you have agents that produce documents — reports, proposals, summaries, contracts — they can now render PDFs without leaving the platform. The rendering tool is available to all agent surfaces: chat, workflow, scheduled runs. It takes HTML you compose or a URL you specify, and returns a link your users can open immediately.

The link is permanent and publicly accessible. The rendering happens privately. Those two properties are compatible because the access control is on the content the agent produces, not on the rendering pipeline itself.

For teams operating under data-handling constraints — where client content must stay within defined infrastructure boundaries — this removes a category of risk that was previously built into the architecture. You do not have to audit a third-party PDF service’s data-retention policy if the PDF was never sent there.

The goal is not to eliminate all external dependencies — agents are useful precisely because they can reach out and do things. The goal is to make sure the dependencies are intentional. When a tool handles sensitive content, that choice should be deliberate.


Forge’s in-house PDF rendering is available to all agent surfaces. See how Forge handles security and data boundaries →