
gpui-agentation
io.github.emmanuel-defreitas/gpui-agentation
Read and manage development annotations from a local GPUI app.
Documentation
gpui-agentation
🎯 Point at a running GPUI app, leave a note, and your coding agent gets the element, its bounds, and its Rust source location.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Version: 0.7.0. Debug builds only — release builds expose no annotation API. macOS is the only supported native platform. Pinned to
gpui-pre =0.3.14.
Table of Contents
About The Project
Agentation annotates web pages through the DOM. A native GPUI window has no DOM, so gpui-agentation registers screens (and optional finer targets) with an ID, label, bounds, and Rust call site, then attaches your note to that.
Use it when you would otherwise describe a UI bug to your agent in words or paste a screenshot. Notes persist to a local JSON file, carry a status (pending, acknowledged, resolved, dismissed) and a reply thread, and an agent reads them over a loopback MCP server or REST/SSE.
It is a development tool. It annotates registered targets, not arbitrary pixels (by default, the whole screen), and release builds do not include it. For production telemetry or session replay, use something else.
Built With
Getting Started
Add gpui-agentation to your own GPUI app in three steps: install the crate, initialize once at launch, then mount and wrap your screen.
Prerequisites
- macOS with Xcode command-line tools
- Rust via rustup (the repository pins the toolchain)
GPUI Kit comes from crates.io. Follow the setup guide to share the pinned Kit version with your host.
Installation
-
Add the crate with the native feature set:
cargo add gpui-agentation --no-default-features --features native -
The crate does not exist in release builds, so every call sits behind
#[cfg(debug_assertions)]and release returns your content unchanged:// Launch: serve Agentation's assets, then initialize. let app = gpui::application(); #[cfg(debug_assertions)] let app = app.with_assets(gpui_agentation::Assets); #[cfg(not(debug_assertions))] let app = app.with_assets(gpui::assets::Assets); app.run(|cx| { #[cfg(debug_assertions)] gpui_agentation::init(cx).expect("initialize Agentation"); #[cfg(not(debug_assertions))] gpui::init(cx); // ...open your window }); // Window setup: app name, route, notes file, local port. Keep `feedback` // in a field of your root view that carries the same cfg. #[cfg(debug_assertions)] let feedback = gpui_agentation::Agentation::mount( "My app", "gpui://my-app/home", "target/agentation/feedback.json", 4748, window, cx, )?; // Render: wrap the screen in debug builds; release keeps `content` as is. #[cfg(debug_assertions)] let content = self.feedback.root("home", "Home screen", content, window, cx); content -
Add
target(id, label, child)only where you want finer inspection. Ordinary controls need no wrappers. Use a Kit Root for the host window. Agentation owns its tool windows; an existing Kit host uses explicit initialization and inspector ownership options described in the setup guide.
Want your agent to do this for you? Use the setup skill.
More:
- Example app: all of this in one
devtoolsmodule - Setup guide
- Customization
Usage
Inspect and annotate
The toolbar is its own window, docked to the right edge of your app. It follows your app when you move or resize it.
| Tool | What it does |
|---|---|
| Inspect | Pick an element. Saves its source and properties as a numbered note. |
| Box, Arrow, Pen | Draw on the live window. |
| Comment | Drop a numbered pin with a note. |
| Textbox | Click or drag out a frame, then type plain text on the canvas. |
Drawing tools need the Annotation mode switch on. Inspect does not. With annotation mode on, right-click the canvas to open the same tools and edits as a context menu.
Inspect an element
- Click Inspect, then click an element.
- Optional: change width, height, padding, margin, border, or opacity with the sliders, and the surface or text color with the swatches.
- Click the numbered pin to add a comment.
- Click Stop in the Inspector header, or Stop inspecting in the toolbar, to leave Inspect.
The inspector panel opens in the toolbar window, which grows to hold it; your app's window keeps its size and layout. See External inspector for how that works on stock GPUI and when the panel falls back to the app window.
Press Esc or click elsewhere to pick another element.

Your agent gets the comment, the property snapshot, and any style changes with
suggested Rust builder calls. Click the last breadcrumb segment to open the
source line in $EDITOR (Zed by default; VS Code, Cursor, and VSCodium work too).
Other editors copy the path instead.
Draw
Point your agent at the exact spot with an arrow, box, or pen stroke.

Shortcuts (annotation mode on)
| Keys | Action |
|---|---|
I B A P C T | Pick a tool |
Ctrl/Cmd+S | Save the draft |
Ctrl/Cmd+Z, Ctrl/Cmd+Shift+Z | Undo, redo |
Delete | Remove the selected note |
Pins, textboxes, mentions
- Drag a pin to move it, separately from its drawing.
- Textbox: drag with the tool to frame a box, or click for one that fits its
text. Click to select, drag to move, pull a grip on the dashed bounding box to
resize, Enter or double-click to edit. Save,
Ctrl/Cmd+S, or clicking away saves; Cancel or Esc discards the edit. Text selection works normally while editing. - In a comment, type
@to pick a note or#12to preview pin 12. Enter or Tab inserts@#12. Esc closes the list. - Right-click a note for Edit, Delete, and Color.
Toolbar, menus, Settings
- Comments, Settings, and Close sit at the bottom of the toolbar.
- Close hides it. Debug → Show Toolbar brings it back.
- Add
gpui_agentation::debug_menu()tocx.set_menus(...)to get the Debug menu. - Settings opens from the macOS menu-bar icon or
⌘⌥S.
Capture feedback
Write a comment and save it. Open Comments → Copy to copy your feedback as Markdown, ready to paste to your agent.

Connect your agent
- Keep the debug app running.
- Open Settings → MCP and turn the server on.
- Copy the config into your MCP client.
The endpoint runs on loopback. Clients that require stdio can use the MCP bridge.
- MCP Registry name:
mcp-name: io.github.emmanuel-defreitas/gpui-agentation
For more examples, please refer to the Reference.
Agent skills
Two skills help your agent set up Agentation and work through feedback. Install them from skills.sh (needs Node.js 22.20+).
| Skill | Use it to | Try |
|---|---|---|
| gpui-agentation-setup | Add Agentation to a GPUI app. | "Use gpui-agentation-setup to add development annotations to this app." |
| gpui-agentation-explore | Read your app's feedback over MCP and act on it. | "Use gpui-agentation-explore to summarize pending feedback without changing notes." |
-
From your app's folder, run:
npx skills add emmanuel-defreitas/gpui-agentation -
Pick the skills and agents when asked.
-
Start a new conversation, then run
/gpui-agentation-setupor/gpui-agentation-explore, or paste a prompt above.
Options:
- One skill only: add
--skill gpui-agentation-setup. - Every project: add
-g. - Update later:
npx skills update.
Skills are instructions only. explore also needs your debug app running with
Settings → MCP on. See Connect your agent.
Try the Example
Clone the repository and run the example app:
git clone https://github.com/emmanuel-defreitas/gpui-agentation
cd gpui-agentation
make example
- Choose Inspect, Box, Arrow, or Pen.
- Select an element or draw, then write a comment and save.
- Open Comments → Copy to copy your feedback as Markdown.
See the example app for the full integration.
Roadmap
- Inspect, Box, Arrow, and Pen annotation tools
- Loopback MCP server plus REST/SSE access
- Add text annotation tool
- Update Comment annotation UX
- Add gpui-devtools features from joris-gallot/gpui-devtools
- Extends AI features from hexuria/gpui-agent
- Stabilize the API toward 1.0
- Port MCP tools to a standalone macOS companion app
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are welcome. Read CONTRIBUTING.md for the workflow, checks, and release steps.
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Emmanuel De Freitas — @emmanuel-defreitas
Project Link: https://github.com/emmanuel-defreitas/gpui-agentation
Acknowledgments
- Inspired by Agentation. Independent GPUI implementation.
- Built on GPUI and the Model Context Protocol.
- GPUI Kit, pinned at 0.11.0; inspector picking compatibility is handled inside Agentation. See distribution.
- gpui-devtools by Joris Gallot. The inspector's style editing and export approach comes from it (MIT), rewritten on GPUI Kit components.
- Best-README-Template
gpui-agentationcargo install gpui-agentation