A Rails gem that provides a floating toolbar for annotating web pages and collecting structured feedback for AI coding agents.
This gem is a Ruby/Rails port of Agentation - the original React-based annotation toolkit created by Benji Taylor.
Add to your Gemfile:
gem 'agentation'Run:
bundle install
rails generate agentation:installThat's it! The generator automatically:
- Adds the stylesheet to your application.css
- Adds the JavaScript import to application.js
- Adds the toolbar helper to your layout
If you prefer manual setup or the generator doesn't work for your setup:
1. Add stylesheet to app/assets/stylesheets/application.css:
*= require agentation2. Import JavaScript in app/javascript/application.js:
import "agentation"3. Add toolbar to your layout (before </body>):
<%= agentation_toolbar %>The toolbar appears in the bottom-right corner. Click the sparkle icon to activate.
<%= agentation_toolbar(
output_detail: "standard", # compact, standard, detailed, forensic
annotation_color: "#3c82f7", # hex color for markers
auto_clear_after_copy: false, # clear annotations after copying
dark_mode: true # dark or light theme
) %>- Click any element to add an annotation
- Drag to multi-select elements
- Click marker to edit, Shift+click to delete
- Copy feedback as structured Markdown
- Persistent storage (localStorage)
- Light and dark mode support
- Draggable toolbar position
1. **button "Submit"**: Make this green
### 1. button "Submit"
**Location:** form > .actions > button
**Feedback:** Make this green
### 1. button "Submit"
**Location:** form > .actions > button
**Classes:** btn, btn-primary
**Position:** 100px, 200px (120x40px)
**Feedback:** Make this green
Full debugging information including computed styles, accessibility info, and nearby elements.
- Rails 6.1+
- Ruby 3.0+
This Ruby gem is based on Agentation, an open-source annotation toolkit for AI coding agents.
- Original Project: github.com/benjitaylor/agentation
- Website: agentation.dev
MIT