Repository navigation
docs(proposals): web pages the model writes, for the agent and Studio - #2313
Merged
AnishSarkar22 merged 1 commit intoOct 21, 2026
Merged
Conversation
Proposes letting a model at the agent's bar write a web page as HTML, through a new agent tool and skill and Studio's Web page button, run in a viewer frame with no network. ADR 0066 records the decision.
|
@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 3
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A proposal and ADR 0066 for web pages the model writes as HTML, on the two paths Word and PDF already have:
outputs/, taught by a newsurfsense-htmlskill, and saves it with a new tool,surfsense_save_page, as a versioned Studio artifact with screenshots drawn by Electron.writes_script()as Word is. A model at the agent's bar writes the page in one call, checked for structure with up to three attempts; one below it keeps today's template, until the model ladder shows whether it can write pages too.allow-popups, and subframe navigation to other origins refused.Docs only. No code changes.
Why
Today every web page, from Studio or the agent, is plain-text sections escaped into a template with no style or script, so even the strongest models produce an unstyled page. Separately, the viewer's frame can still make requests, open popups and navigate itself, each a way for a page built from untrusted sources to carry their content off the machine.
Fixes #
How to test
python scripts/check_docs.pydocs/proposals/model-written-web-pages.mdanddocs/adr/0066-web-pages-are-html-the-model-writes-without-network.md.High-level PR Summary
This proposal introduces the ability for AI models to generate complete HTML web pages with custom CSS, JavaScript, and SVG, replacing the current plain-text template approach. The change affects both agent threads (via a new
surfsense-htmlskill andsurfsense_save_pagetool) and Studio's Web page button (splitting behavior by model capability). All HTML artifacts run in a hardened sandboxed frame with a Content Security Policy that prevents network access, ensuring pages built from untrusted sources cannot exfiltrate data. The proposal includes versioning, screenshot generation via Electron, and a shared design guide for consistent page styling.⏱️ Estimated Review Time: 15-30 minutes
💡 Review Order Suggestion
docs/adr/0066-web-pages-are-html-the-model-writes-without-network.mddocs/proposals/model-written-web-pages.mddocs/adr/README.md