AI Integration
feedpipe can pipe reviewer feedback directly to AI coding agents, enabling automated analysis and fixes.
Supported Agents
feedpipe supports several AI coding agents out of the box:
| Agent | Command | Description |
|---|---|---|
claude | claude | Anthropic’s Claude CLI |
codex | codex | OpenAI Codex CLI |
gemini | gemini | Google Gemini CLI |
opencode | opencode | OpenCode CLI |
custom | (your command) | Any custom agent |
Basic Usage
feedpipe 3000 --ai claudeWhen a reviewer adds a comment, it’s automatically sent to Claude:
💬 Comment from Reviewer /checkout Element: .price-total "This should show the discounted price"
AI agent: claude AI agent connectedEvent Format
Events are sent to the AI agent’s stdin as JSON, one per line:
{ "type": "feedback", "source": "feedpipe", "tunnel": { "url": "https://abc123.feedpipe.dev", "slug": "abc123" }, "annotation": { "id": "ann_123", "type": "pin_comment", "comment": "This should show the discounted price", "pagePath": "/checkout", "element": { "selector": ".price-total", "innerText": "$99.00" } }, "reviewer": "Reviewer 42", "timestamp": "2026-01-25T10:30:15.000Z"}Custom Agents
Use --ai custom with --ai-command for custom agents:
feedpipe 3000 --ai custom --ai-command "node my-agent.js"Your agent receives events on stdin and can process them however you like.
Example Custom Agent
import readline from 'readline';
const rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false,});
rl.on('line', (line) => { const event = JSON.parse(line);
console.log(`Received feedback: ${event.annotation.comment}`); console.log(`On element: ${event.annotation.element?.selector}`); console.log(`Page: ${event.annotation.pagePath}`);
// Process the feedback...});Filtering Events
By default, all annotation events are piped. Use --ai-filter to limit:
# Only pipe comments, not highlightsfeedpipe 3000 --ai claude --ai-filter pin_comment
# Only pipe highlightsfeedpipe 3000 --ai claude --ai-filter rect_highlight
# Both (default)feedpipe 3000 --ai claude --ai-filter pin_comment,rect_highlightWorking Directory
Set the working directory for the AI agent:
feedpipe 3000 --ai claude --ai-cwd /path/to/projectThis is useful when the AI agent needs to access project files.
Best Practices
1. Use Specific Selectors
The more specific the element selector, the better the AI can understand context:
{ "element": { "selector": "form.checkout button[type='submit']", "innerText": "Place Order" }}2. Write Clear Comments
Reviewers should write actionable comments:
- ❌ “This is wrong”
- ✅ “The price should show the 20% discount applied”
3. Include Context
The AI receives the page path and element, but additional context in comments helps:
- ❌ “Fix this”
- ✅ “On mobile, this button is too small to tap easily”
4. Filter Noise
If you’re getting too many events, use --ai-filter to focus on what matters.