---
created: 2026-03-12
source: Rivet
tags: [agent-archive, rivet]
---

# Agent Communication Feeds

A lightweight system for inter-agent communication within the RateRight Clawdbot ecosystem.

## Overview

This system fixes the broken communication feeds between:
- **Research → Sales**: Competitor intelligence and market updates
- **Sales → Builder**: Feature requests and customer feedback

## Quick Start

### 1. Process Research Updates
```bash
# Check for new competitor research and notify Sales
node /home/ccuser/rateright-growth/rivet/agent-feeds/scripts/research-sales-integration.js check
```

### 2. Process Sales Feedback
```bash
# Extract feature requests from call logs and notify Builder
node /home/ccuser/rateright-growth/rivet/agent-feeds/scripts/sales-builder-integration.js process
```

### 3. Deliver Pending Feeds
```bash
# Send all pending notifications
node /home/ccuser/rateright-growth/rivet/agent-feeds/scripts/deliver-feeds.js deliver
```

## Configuration

Edit `/home/ccuser/rateright-growth/rivet/agent-feeds/config.json` to adjust:
- Delivery schedules
- Retention periods
- Feed formats
- Enable/disable feeds

## Directory Structure

```
agent-feeds/
├── config.json              # Feed configurations
├── feeds/                   # Feed data storage
│   ├── research-to-sales/   # Research outputs for Sales
│   ├── sales-to-builder/    # Sales feedback for Builder
│   └── status-updates/      # General status broadcasts
├── scripts/
│   ├── deliver-feeds.js     # Main delivery script
│   ├── research-sales-integration.js  # Research→Sales integration
│   └── sales-builder-integration.js   # Sales→Builder integration
├── logs/                    # Delivery logs
└── weekly-summaries/        # Weekly digest reports
```

## Integration with Agent Profiles

### For Research Agent
Add to research completion workflow:
```javascript
// After completing competitor research
const { execSync } = require('child_process');
execSync('node /home/ccuser/rateright-growth/rivet/agent-feeds/scripts/research-sales-integration.js check');
```

### For Sales Agent
Add to daily routine:
```javascript
// Process yesterday's calls
execSync('node /home/ccuser/rateright-growth/rivet/agent-feeds/scripts/sales-builder-integration.js process');
```

### For Builder Agent
Monitor Sales topic for feature requests:
- High priority requests sent immediately
- Weekly summaries every Monday
- All requests logged in `sales-to-builder/` feed

## Message Formats

### Research→Sales Format
```json
{
  "type": "competitor_update",
  "competitor": "Sidekicker",
  "key_findings": ["Pricing increased to 35%"],
  "objection_handles": ["We're 30% cheaper"],
  "priority": "high"
}
```

### Sales→Builder Format
```json
{
  "type": "feature_request",
  "request": "crew scheduling",
  "frequency": 5,
  "priority_lead": true,
  "lead_context": "Large contractor needs...",
  "objection": "Can't switch without..."
}
```

## Automation

### Cron Jobs
Add to crontab for automatic processing:
```bash
# Process research updates daily at 08:00
0 8 * * * cd /home/ccuser/rateright-growth/rivet && node agent-feeds/scripts/research-sales-integration.js check

# Process sales feedback daily at 09:00  
0 9 * * * cd /home/ccuser/rateright-growth/rivet && node agent-feeds/scripts/sales-builder-integration.js process

# Deliver pending feeds every 15 minutes
*/15 * * * * cd /home/ccuser/rateright-growth/rivet && node agent-feeds/scripts/deliver-feeds.js deliver
```

### Heartbeat Integration
Add to agent heartbeat checks:
```bash
# Check for undelivered feeds
if [ -n "$(find agent-feeds/feeds -name '*.json' -exec grep -l '"delivered": false' {} \;)" ]; then
  echo "Warning: Undelivered agent feeds detected"
fi
```

## Troubleshooting

### Feeds Not Delivering
1. Check Telegram topic IDs in config
2. Verify Clawdbot message tool permissions
3. Check logs in `agent-feeds/logs/`
4. Ensure scripts are executable

### Missing Research Updates
1. Verify research files are in `/memory/plans/research/`
2. Check competitor name detection in filename
3. Run with test flag: `research-sales-integration.js test <file>`

### No Sales Feedback
1. Verify Growth Engine API access
2. Check API key in environment
3. Test with mock data: `sales-builder-integration.js mock`

## Monitoring

### Key Metrics
- Delivery success rate (target: >95%)
- Time to delivery (target: <5 min for urgent)
- Feed backlog (should be 0)
- Agent response rate

### Weekly Review
Check weekly summaries in `agent-feeds/weekly-summaries/` for:
- Most requested features
- Common objections
- Competitor activity
- Communication patterns

## Security

- All feeds stored locally in `/home/ccuser/rateright-growth/rivet/`
- No external API calls except Telegram
- Sensitive data filtered from logs
- Access controlled via file permissions

## Future Enhancements

- [ ] Real-time feed dashboard
- [ ] Cross-feed correlation analysis
- [ ] Machine learning prioritization
- [ ] Voice note integration
- [ ] External API webhooks
- [ ] Mobile notifications

## Support

For issues or questions:
1. Check this README first
2. Review logs in `agent-feeds/logs/`
3. Document findings in `agent-feeds/README.md`
4. Escalate to System topic if needed