Back to Calendar

2026-03-02

Work Log
2026-03-02 — Session Notes
Highlights
  • ## Major Accomplishment: Sales AI Agent Deployed! 🎉
  • Basic spawn: ✅ Working
  • CEO agent spawn: ✅ Accepted (but persona not loaded from custom SOUL.md)

# 2026-03-02 — Session Notes

## Major Accomplishment: Sales AI Agent Deployed! 🎉

After 10 days away, Eugene returned to finish the chatbot and stabilize agents.

### What We Built
- **Conversational AI Sales Bot** powered by Claude + KB semantic search
- Replaced raw KB search bot with intelligent sales agent
- Bot gathers lead info naturally (name, phone, email, product interest)
- Handles objections with built-in sales scripts
- All conversations stored in DB for future training

### Architecture
```
SalesIQ → bot.rollerup.ca → Caddy → localhost:5002 → sales_agent.py
                                          ↓
                              Claude AI + KB Context
```

### Files Created
- `/opt/kb_website/sales_agent.py` — Main sales agent (port 5002)
- `zoho.bot_conversations` table — Stores all chats for learning
- `/etc/systemd/system/sales-agent.service` — Systemd service

### Port Map (Updated)
| Port | Service | Domain |
|------|---------|--------|
| 5000 | kb-website | kb.rollerup.ca |
| 5001 | onboarding.service | - |
| 5002 | **sales-agent** | bot.rollerup.ca |
| 5003 | fsm.service | fsm.rollerup.ca |

### Issues Resolved
1. **OpenAI quota exceeded** — Added keyword fallback, but still needs credits for embeddings
2. **Anthropic API key missing** — Fixed duplicate empty key in .env
3. **Port 5001 conflict** — onboarding.service was using it; moved sales-agent to 5002
4. **DNS missing** — Added A record for bot.rollerup.ca → 68.183.198.0
5. **SSL cert** — Caddy auto-issued after reload
6. **Wrong webhook URL** — Changed SalesIQ from kb.rollerup.ca to bot.rollerup.ca

### Agent Spawn Test
- Basic spawn: ✅ Working
- CEO agent spawn: ✅ Accepted (but persona not loaded from custom SOUL.md)
- Agent-to-agent history: â›” Disabled in config
- **Next step**: Configure agent workspaces with Gerber personas

### Still TODO
1. Add OpenAI credits for semantic search (currently keyword fallback)
2. Deploy persona SOUL.md files to agent workspaces
3. Configure agent spawn allowlist for round table
4. Zoho CRM lead creation when bot gathers info
5. Review stored conversations for training opportunities

### Lessons Learned
- SalesIQ uses `visitor.active_conversation_id` for unique conversation tracking
- Multiple services can silently grab ports — always check `lsof -i :PORT`
- Orphaned processes with parent PID 1 usually mean a systemd service with Restart=always
- DNS propagation for Kinsta is fast (~1-2 min)

---

*Sales bot live at bot.rollerup.ca — Eugene testing in production*