Build EricBot — AI Clone & Business Development Engine - #7
Draft
hatcheric950 wants to merge 7 commits into
Draft
Conversation
Full implementation of the EricBot system: - FastAPI backend with SQLite persistence - Claude-powered AI engine using Eric's voice profile - Voice learning system that extracts style patterns from real samples - Lead pipeline management across all 4 ventures (Hatch, Eric.Digital, Ancient Coast, NEXUS) - Accountability tracker with AI nudges - AI-powered outreach drafting that sounds like Eric - APScheduler for daily nudges (7AM) and follow-up checks (every 2hrs) - React dashboard (ericbot.jsx) with Chat, Leads, Tasks, Voice, Draft tabs - CLI voice trainer script (scripts/train_voice.py) - Docker Compose for production deployment https://claude.ai/code/session_017AD8eyJ5iZmVXwiwoCQ6aY
Wires up Twilio SMS (Phase 2) with a tiered routing model that decides how each inbound text is handled based on who sent it: - business: drafts in Eric's voice; routine messages can auto-send (opt-in + global switch), everything touching price/scheduling/commitments queues for one-tap approval - personal: NEVER answered in Eric's voice — optional honest away-reply plus a high-priority reminder so Eric replies himself - unknown: logged + flagged, no auto-reply Backend: - contacts, sms_messages, pending_replies tables - services/sms.py (Twilio send + webhook signature verification, degrades gracefully without creds) - services/auto_responder.py (tier routing brain) - services/style_context.py (shared voice-profile loader) - ai_engine: classify_sms, draft_sms_reply, generate_away_reply (honest, never impersonates a live conversation) - routers/sms.py: webhook, contacts CRUD, approval queue, message log, status Frontend: new Inbox tab — approval queue, contact tiering, safety banner. Safety: all auto-send is off by default behind SMS_AUTO_SEND_ENABLED master switch + per-contact opt-in; classification fails closed to manual review. smoke_test_sms.py verifies the routing and the personal-contact guarantees. https://claude.ai/code/session_017AD8eyJ5iZmVXwiwoCQ6aY
Everyone now gets a draft in Eric's voice and at minimum lands in the approval queue. The 'protected' boolean is the single, narrow exception for contacts where in-voice impersonation is off-limits (e.g. spouse). - protected=true: honest away-reply (if away_mode) + reminder to Eric only - everyone else: draft in voice → auto-send if routine business + opted-in, otherwise approval queue Adds protected field to contacts table, ContactCreate/Update models, router, and Inbox tab UI (🔒 Protected toggle per contact, banner update). Updates smoke_test_sms.py to cover the new routing model (18 checks pass). https://claude.ai/code/session_017AD8eyJ5iZmVXwiwoCQ6aY
- Daily nudge now texts Eric at ERIC_PHONE_NUMBER when configured - sms.py: support API Key SID+Secret auth (preferred) alongside Auth Token - is_configured() accepts either auth method https://claude.ai/code/session_017AD8eyJ5iZmVXwiwoCQ6aY
… tab
- zoom_phone.py: Server-to-Server OAuth, webhook HMAC-SHA256 verification,
URL validation challenge/response, voicemail transcript fetch via API
- call_responder.py: mirrors auto_responder routing — protected contacts
get a task reminder only; everyone else gets an AI-drafted follow-up SMS
queued for one-tap approval (nothing auto-sent for calls)
- routers/calls.py: POST /api/calls/webhook (Zoom events), GET /api/calls/logs,
GET /api/calls/voicemails, POST voicemails/{id}/approve|reject, GET /api/calls/status
- database.py: call_logs + voicemails tables (IF NOT EXISTS, safe on existing DBs)
- ai_engine.py: classify_voicemail() and draft_call_followup_sms() added
- models.py: VoicemailApproval pydantic model
- server.py: register calls router
- ericbot.jsx: Calls tab — status banner, voicemail/follow-up queue with
editable drafts + approve/dismiss, recent call log table
https://claude.ai/code/session_017AD8eyJ5iZmVXwiwoCQ6aY
ai_engine.py auto-detects xai- prefix: routes client to api.x.ai and defaults model to grok-4. sk-ant- keys continue using claude-sonnet-4-6. CLAUDE_MODEL env var overrides either default. https://claude.ai/code/session_017AD8eyJ5iZmVXwiwoCQ6aY
- docker-compose.yml: use env_file:.env so all credentials pass through; bind port to 127.0.0.1 only (nginx terminates TLS externally) - nginx/ericbot.conf: HTTPS reverse-proxy template with Let's Encrypt hooks; replace YOUR_DOMAIN to activate - deploy.sh: one-command bootstrap — installs Docker, clones repo, starts compose, configures nginx, runs certbot; prints webhook URLs at the end https://claude.ai/code/session_017AD8eyJ5iZmVXwiwoCQ6aY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
$(cat <<'EOF'
Summary
SMS Auto-Responder
Routes every inbound text by who sent it:
businesspersonalunknownSafety model — all automatic sending is off by default behind the
SMS_AUTO_SEND_ENABLEDmaster switch plus per-contact opt-in. Message classification fails closed to manual review. Personal relationships are never ghostwritten — that design choice is intentional and documented in the README.New backend:
services/sms.py(Twilio + webhook signature verification),services/auto_responder.py(routing brain),services/style_context.py,routers/sms.py. Newai_enginefunctions:classify_sms,draft_sms_reply,generate_away_reply. New Inbox tab in the dashboard (approval queue + contact tiering + safety banner).Test plan
python smoke_test_sms.py— verifies routing + personal-contact safety guarantees (all checks pass)cp .env.example .env, addANTHROPIC_API_KEY(+ Twilio creds for SMS)pip install -r requirements.txt && python -m backend.serverGET /api/healthreturns{"status": "ok"}/api/sms/webhook, add contacts, set tiersSMS_AUTO_SEND_ENABLED=trueonly when readydocker-compose up -dfor productionhttps://claude.ai/code/session_017AD8eyJ5iZmVXwiwoCQ6aY
EOF
)