Agentation: NPM Utility for UI Annotations in AI Coding

Agentation allows developers to click UI elements in dev mode to generate precise context and feedback for coding agents like Claude Code and Cursor.

cpaua3 min306

Agentation is an NPM utility designed for use in development mode that allows developers to annotate UI elements directly in the browser and copy that feedback into AI coding tools. By replacing vague descriptions and screenshots with precise technical context, it enables agents like Claude Code, Cursor, Gemini, Grok, and Codex to identify the exact components requiring changes.

shellscript
npm install agentation -D

Technical context provided to coding agents

The utility generates formatted markdown that includes specific technical data based on the page's exposure and output settings. This data allows an AI agent to grep the codebase for CSS selectors and jump to the correct line using source file paths.

The output also provides the React component tree to help the agent understand the structural hierarchy and computed styles to analyze the current visual appearance. This removes the need to describe elements manually, such as specifying a blue button in a sidebar, by providing the exact selector, such as .sidebar > button.primary.

Workflow for annotating UI elements

To start the process, the user activates the tool via an icon in the bottom-right corner of the screen. Hovering over elements highlights their names, and clicking an element allows the user to add a specific annotation.

After writing the feedback and clicking Add, the user can copy the formatted markdown to paste it into their chosen AI agent. For content issues or typos, the tool supports text selection to pinpoint the exact string of text. The utility also includes a feature to freeze animations, allowing the developer to annotate a specific animation frame.

Bidirectional communication via MCP integration

Through MCP integration and the Annotation Format Schema, agents can interact with annotations rather than just reading them. Agents can list all feedback across multiple pages by asking what annotations exist or request clarification on specific values, such as whether a margin should be 24px or 16px.

When a change is implemented, the agent can resolve the issue with a summary, such as stating that padding has been fixed. These follow-up questions and resolutions remain attached to the original annotation. Users also have the ability to dismiss all annotations at once using a clear command.

Guidelines for effective AI feedback

To improve the accuracy of the agent's response, the tool suggests being specific, such as writing "Button text unclear" instead of "fix this". It is recommended to create one annotation per issue to make it easier for the agent to address tasks individually.

Including context regarding the expected result versus the current observation helps the agent understand the intent. This structured approach to modern web interfaces ensures that the AI has the necessary data to execute the requested change without guessing.

Licensing for individuals and teams

Agentation is free for individuals and companies for internal use, including debugging apps and streamlining feedback within a team. A commercial license is required only if the utility is redistributed as part of a product for sale.

Sources

Agentation

Share

Author

cpaua

VibeCode blog admin. Writing about vibe coding, AI and open source.

Related news

Comments

To leave a comment, log in
Loading...

Weekly digest

The best of vibe coding, AI agents and open source — once a week, no spam.