An agent that can write and launch web apps from your workspace.
This project is a pre-alpha VS Code extension that runs an agent via an LSP server. Inference goes via GitHub Copilot. The agent can write and launch apps in a webview.
Interaction with the agent goes through the @web-agent chat participant.
The agent can answer questions about running apps and the code it writes and iterate on those (for now each iteration launches a new webview).
The agent can also see a list of open document URIs, but cannot read their contents directly. It also doesn’t have direct access to the internet. In order to process either local or remote content, it therefore must write a web app and make sub-inference calls. Isolating the main agent from actual content limits prompt injection risk.
The app runs in a standard system webview through wry, without additional sandboxing.
The app has access to workspace documents and inference by way of custom protocols.
The main use case is having the agent write an app that does sub inference on data with prompt injection potential.
- VS Code with an active Github Copilot extension.
- Git clone the repo and open it in VS Code.
- Build everything:
- Run the extension in debug mode:
- In VS Code, open Run and select “Start debugging”.
- Open the Chat view in the debugging window and prompt
@web-agent. - The model used, both as the main agent and for app inference, is the one you select in the chat(auto defaults to gpt-5-mini).
- See below for prompt ideas.
vs_code_lspclient: VS Code extension (TypeScript)server: Thin LSP server (Rust)
agent: Core agent logic and Automerge-backed data modelprompts: Prompt templates and buildersshared_document: Shared document types (Automerge schema)
traits: Shared public interfacesweb: Web client that renders HTML apps and handles custom protocols
This project runs as multiple processes with a shared Automerge document as the coordination layer.
- VS Code extension (TypeScript) spawns the Rust LSP server and forwards editor events.
- LSP server (Rust) hosts the agent core, owns the inference client, and writes requests/responses into the shared document.
- Web client (Rust + wry) runs in a separate process, renders HTML apps, and uses custom
wry://protocols to request inference or document reads. It never calls inference directly; it writes requests into the shared document and listens for responses.
Data flow is intentionally split across the process boundary to prevent the webview from directly invoking inference or accessing documents without going through the agent’s request/response flow.
This modular split also makes it possible to swap in other editor front-ends or alternative web runtimes. Note that using a crdt for communication is an implementation detail and not part of the interface.
- “summarize active doc” with an (untitled) document open.
- app to fetch and summarize web pages (prevents prompt injection to the main agent).
- “list open documents” to verify document tracking.
- “create a simple HTML todo app” to validate web app launch.
- Basic AI chat web app using inference through the extension.
- “I want to play tic-tac-toe with an opponent using AI inference.”
- Persist apps like bookmarks
- Clearer data boundaries (when a local doc is used in an app, prevent extraction over the internet?)
- Additional sandboxing for the web app.
- Manage apps through a markdown document in the workspace(ai writes state to doc, if user removes app from list: ai closes or deletes app): browser chrome as markdown doc.
- Endpoint for app to write state to automerge doc.

