Skip to content

Crynge/cascade-cold-calling-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cascade Cold Calling Agent

Stars License Status

Social Preview

Compliance-first B2C AI cold-calling stack with OpenAI and Gemini cascade routing, simulator flows, and Twilio-ready handoff.

GitHub Search Keywords: ai cold calling, b2c calling agent, openai gemini cascade, twilio calling automation, voice ai sales, telephony compliance, call center ai

A compliance-first B2C cold-calling agent with Cascade Mode routing across OpenAI and Gemini. It ships as a full-stack starter with:

  • a FastAPI orchestration backend
  • a React operator console
  • a local conversation simulator
  • compliance gates for disclosure, DNC, opt-out, and quiet hours
  • provider adapters for OpenAI and Gemini with deterministic local fallback
  • Twilio-ready XML response generation for phone workflows

What Cascade Mode means here

Cascade Mode is the routing policy that decides:

  1. which provider should answer a turn first
  2. when to escalate to a stronger provider
  3. when to block the model entirely and hand off to a human or stop the call

Default behavior:

  • Gemini handles low-cost opener, discovery, and summary work
  • OpenAI handles sensitive objection handling, pricing pressure, compliance-heavy turns, and close/handoff moments
  • if confidence drops or policy risk rises, the orchestrator falls through to the secondary provider or blocks the turn

Why this repo is verification-friendly

Real outbound calling needs a PSTN provider and real API keys, which we cannot safely or reliably live-test in a local audit. This repo therefore separates:

  • verified local behavior: simulator, API responses, routing, compliance checks, dashboard, and tests
  • deploy-time integrations: OpenAI API, Gemini API, and telephony credentials

That keeps the repo runnable and auditable without pretending we performed real consumer cold calls in development.

Architecture

apps/
|-- api/
|   `-- app/
|       |-- providers/    OpenAI, Gemini, deterministic fallback
|       |-- services/     Cascade router, compliance, store, TwiML builder
|       |-- config.py
|       |-- data.py
|       |-- main.py
|       `-- schemas.py
`-- web/
    `-- src/              React dashboard and simulator
tests/
|-- test_api.py
|-- test_cascade.py
`-- web_smoke.py

More detail lives in docs/architecture.md.

Dashboard preview

Cascade dashboard preview

Official provider surface verified

This starter was aligned against official provider documentation accessed on April 30, 2026:

Defaults in this repo remain environment-configurable because provider model availability can change.

Default provider configuration

  • OpenAI text model: gpt-5.4-mini
  • OpenAI voice/realtime reference model: gpt-realtime-1.5
  • Gemini text model: gemini-2.5-flash
  • Gemini live reference model: gemini-2.5-flash-native-audio-preview-12-2025

Quick start

1. Backend

python -m pip install -r apps/api/requirements.txt
uvicorn apps.api.app.main:app --reload

2. Frontend

npm install
npm run build:web
npm --workspace apps/web run dev

3. Optional environment variables

OPENAI_API_KEY=
OPENAI_MODEL=gpt-5.4-mini
OPENAI_REALTIME_MODEL=gpt-realtime-1.5
GEMINI_API_KEY=
GEMINI_MODEL=gemini-2.5-flash
GEMINI_LIVE_MODEL=gemini-2.5-flash-native-audio-preview-12-2025
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_FROM_NUMBER=
PUBLIC_BASE_URL=http://127.0.0.1:8000

When API keys are absent, the provider adapters automatically fall back to deterministic offline behavior so the app remains testable.

Verification

python -m pytest tests -q
npm run build:web
python -m playwright install chromium

Then run the live smoke test with the API and web app running locally:

python -m uvicorn apps.api.app.main:app --port 8000
npm --workspace apps/web run dev -- --host 127.0.0.1 --port 5173
python tests/web_smoke.py

The latest audit notes are in docs/audit.md.

Compliance posture

This repo is intentionally not a spam starter. It includes:

  • DNC blocking
  • opt-out phrase detection
  • quiet-hours gating
  • required disclosure prompts
  • call-risk scoring
  • human-handoff recommendations

If a lead is DNC, revoked, or outside allowed hours, the orchestrator blocks the call.

License

MIT

About

Compliance-first B2C cold calling agent with cascade routing across OpenAI and Gemini.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors