Skip to content

obsession126/leadhunteros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 

Repository files navigation

πŸŽ™οΈ LeadHunterOS

The self-hosted, visual-workflow platform for AI voice agents that call, qualify, and book leads for you

Build an autonomous AI sales rep once. Run thousands of parallel outbound & inbound calls through your own Twilio number, with a drag-and-drop conversation builder, real-time lead marketplace, and usage-based billing built in.

Rust Python Next.js PostgreSQL Redis License

Live demo Β· Features Β· Architecture Β· Workflow Nodes Β· Pricing Β· How LeadHunterOS compares


What is LeadHunterOS?

LeadHunterOS is a multi-tenant SaaS platform for building, deploying, and monetizing AI voice agents β€” autonomous callers that hold real phone conversations over Twilio, qualify leads, extract structured data, book meetings, send follow-up SMS, and hand off to a human when needed.

Instead of writing prompt-engineering spaghetti or gluing together five different vendor APIs, you design the agent's entire conversation logic as a visual node graph (powered by @xyflow/react) β€” branches, conditions, webhooks, variable extraction, loops, transfers β€” and LeadHunterOS compiles it into a live, low-latency phone agent running on a Deepgram β†’ Groq LLM β†’ ElevenLabs voice pipeline.

On top of that, it ships with everything a voice-AI product actually needs to be a business, not just a demo:

  • A credit-based billing engine with Paddle subscriptions and crypto payments (DePay)
  • A public lead marketplace for buying/selling qualified leads
  • Row-Level-Security multi-tenancy at the PostgreSQL level (not just at the app layer)
  • A full admin back-office for support, refunds, and manual credit adjustments
  • A template marketplace ("Workshop") where users publish and sell reusable agent flows

✨ Key Features

🧩 Visual Workflow Builder Drag-and-drop node canvas (React Flow) with 11 node types covering prompts, conditions, webhooks, variable extraction, loops, transfers, SMS, and more
πŸ“ž Real Telephony, Not a Demo Native Twilio inbound/outbound integration with signed webhook verification, test-call trigger, and per-workflow publish/unpublish lifecycle
πŸ—£οΈ Multi-language Voice Native STT/TTS locale support for en-US, uk-UA, pl-PL, and es-ES, modeled as a first-class Postgres enum, not a loose string
πŸ›’ Built-in Lead Marketplace A public catalog of leads alongside a private per-tenant CRM (contacts, intel, lifecycle) β€” buy leads with in-app credits, no separate checkout flow
πŸ’³ Dual Payment Rails Card payments & subscriptions via Paddle (with server-side price computation β€” the client never controls the charge amount) and crypto payments via DePay, both reconciled into a single balance_cents ledger
πŸ” Real Multi-Tenancy Tenant isolation enforced with PostgreSQL Row-Level Security, a dedicated TenantConn for user-scoped queries, and a ServicePool with BYPASSRLS reserved strictly for webhooks/admin/system jobs
🧾 Usage-Based Billing Per-minute call costing reserved at call-start and reconciled at call-end, tiered plans with bundled monthly credits, daily/concurrency caps enforced server-side
πŸ›‘οΈ Security-First Auth Email/password with bcrypt, mandatory 2FA (email code + pre-auth token flow), Google OAuth, JWT sessions, and scoped API keys for machine-to-machine access
πŸ“Š Admin Dashboard Platform-wide stats, user list, and manual credit top-ups, guarded by a dedicated AdminClaims type β€” not just a route prefix
🧠 Agent Analytics Per-agent call analytics and usage stats surfaced straight in the dashboard
πŸ”” Async Notification Pipeline Dedicated Redis-queued email worker + low-balance guard + subscription-expiry background jobs, decoupled from the request/response path
🐳 Production-Grade Ops Docker Swarm-style rolling deploys (start-first, automatic rollback on failure), health checks on every service, Caddy as the TLS-terminating reverse proxy

πŸ—οΈ Architecture

LeadHunterOS is a polyglot micro-service system: a Rust API for anything transactional (auth, billing, workflow CRUD, leads), and a separate Python worker dedicated to the latency-sensitive job of actually running a live phone call.

flowchart TB
    subgraph Client["Client Layer"]
        WEB["Next.js 16 / React 19<br/>Workflow Builder Β· Billing UI Β· Admin"]
    end

    subgraph Edge["Edge"]
        CADDY["Caddy<br/>TLS termination Β· reverse proxy"]
    end

    subgraph Core["Rust Core API β€” Actix-Web"]
        AUTH["auth<br/>JWT Β· 2FA Β· OAuth Β· API keys"]
        WF["workflows<br/>agents Β· templates Β· analytics"]
        LEADS["leads<br/>catalog Β· CRM Β· contacts"]
        PAY["payments<br/>Paddle Β· DePay Β· credits"]
        USERS["users<br/>profile Β· balance Β· admin"]
    end

    subgraph Voice["Python Voice Worker β€” FastAPI"]
        CALLENGINE["Call Engine<br/>STT β†’ LLM β†’ TTS pipeline"]
        TWILIOWS["Twilio Media Streams<br/>WebSocket bridge"]
    end

    subgraph Async["Async Jobs"]
        EMAILW["Email Worker<br/>Resend"]
        JOBS["Background Jobs<br/>low-balance guard Β· subscription expiry"]
    end

    subgraph Data["Data Layer"]
        PG[("PostgreSQL 15<br/>Row-Level Security")]
        REDIS[("Redis 7<br/>queues Β· cache")]
    end

    subgraph External["External Providers"]
        TWILIO["Twilio<br/>PSTN telephony"]
        DEEPGRAM["Deepgram β€” STT"]
        GROQ["Groq β€” LLM inference"]
        ELEVEN["ElevenLabs β€” TTS"]
        PADDLE["Paddle β€” cards/subscriptions"]
        DEPAY["DePay β€” crypto"]
    end

    WEB --> CADDY --> Core
    CADDY --> Voice
    Core <--> PG
    Core <--> REDIS
    Voice <--> REDIS
    Voice <--> PG
    Voice --> TWILIOWS --> TWILIO
    CALLENGINE --> DEEPGRAM
    CALLENGINE --> GROQ
    CALLENGINE --> ELEVEN
    PAY --> PADDLE
    PAY --> DEPAY
    REDIS --> EMAILW
    REDIS --> JOBS
Loading

Why two backends instead of one? A voice call is a long-lived, latency-critical WebSocket session (audio in, audio out, sub-second turnaround) β€” a completely different runtime profile from a REST API doing CRUD and billing math. Splitting them means the Rust core can stay fast and simple for transactional work, while the Python worker can be scaled and restarted independently (stop_grace_period: 15m in production, so in-flight calls are never dropped mid-conversation).

Request lifecycle for an outbound call

sequenceDiagram
    participant U as User (Dashboard)
    participant API as Rust Core API
    participant DB as PostgreSQL
    participant Q as Redis
    participant W as Voice Worker
    participant T as Twilio
    participant AI as Deepgram / Groq / ElevenLabs

    U->>API: POST /api/agents/start (JWT)
    API->>DB: Reserve balance_cents for estimated call
    API->>Q: Enqueue call job
    W->>Q: Pick up job
    W->>T: Originate call
    T-->>W: Media Stream (WebSocket)
    loop Live conversation
        W->>AI: Audio chunk β†’ STT β†’ LLM β†’ TTS
        AI-->>W: Synthesized voice
        W->>T: Stream audio back
    end
    W->>DB: Write call log + reconcile actual cost
    DB-->>API: Balance updated
    API-->>U: Real-time status via dashboard
Loading

🧩 Visual Workflow Builder

Every agent is a graph of nodes. No YAML, no prompt spaghetti β€” you wire logic visually and LeadHunterOS validates the graph server-side (via Rust validators) before it can ever go live.

flowchart LR
    START(["πŸ“ž Call Start"]) --> PROMPT["πŸ€– AI Prompt<br/>LLM-driven turn"]
    PROMPT --> COND{"πŸ”€ Condition<br/>contains / regex / intent"}
    COND -->|true| EXTRACT["🧠 Extract Variable<br/>regex / llm_extract"]
    COND -->|false| PROMPT
    EXTRACT --> HOOK["🌐 Webhook<br/>call your CRM/API"]
    HOOK --> SMS["πŸ’¬ Send SMS"]
    SMS --> TRANSFER["☎️ Transfer<br/>to a human"]
    EXTRACT --> WAIT["⏱️ Wait"] --> LOOP["πŸ” Loop"] --> PROMPT
    TRANSFER --> END(["πŸ”΄ End Call"])
    HOOK --> END
Loading
Node Purpose
AI Prompt An LLM-driven conversational turn β€” the core building block of every agent
API Trigger Fires the workflow from an external system call
Condition Branches on contains, regex, or LLM-classified intent
Extract Variable Pulls structured data out of the conversation via regex, keyword match, or llm_extract
Webhook Calls out to your CRM/backend mid-call, with configurable method, headers, body template, timeout, and separate success/error branches
SMS Sends a text message mid- or post-call
Transfer Hands the live call off to a human agent
Loop Repeats a sub-sequence (e.g. "ask again until we get a valid answer")
Wait Introduces a deliberate pause/delay
Log Structured logging checkpoint for debugging live flows
End Call Terminal node β€” every path must resolve to one

Finished agents can be published to the Workshop marketplace, where other tenants can preview and buy a working, pre-built flow instead of starting from a blank canvas.


πŸ’³ Billing & Payments

LeadHunterOS treats "money" as a single source of truth: balance_cents on the user record.

  • Subscriptions & one-off top-ups go through Paddle β€” the server computes the charge from user.id + action_type + target_value, so the client can never manipulate the price of a checkout.
  • Crypto payments go through DePay, verified via RSA-signed webhooks.
  • Call costing is reserved in cents the instant a call starts and reconciled the instant it ends β€” no "we'll bill you later and hope the balance was still there" race conditions.
  • Every tier bundles monthly credits directly onto the balance, so upgrading a plan is immediately reflected in what an agent can spend.

πŸ’° Pricing

Free Starter Pro Enterprise
Price $0 $49/mo $149/mo $499/mo
Cost per minute $0.20 $0.15 $0.12 $0.08
Bundled monthly credits β€” $6 $25 $100
Concurrent calls 1 5 20 100
Active workflows 1 3 10 Unlimited
Calls / day 10 50 300 Unlimited
Analytics Basic Basic Advanced AI analytics Advanced AI analytics
Infrastructure Shared Shared Shared Dedicated server & SLA

Effective savings per minute vs. the Free tier: Starter βˆ’25%, Pro βˆ’40%, Enterprise βˆ’60%.


βš–οΈ How LeadHunterOS compares

The AI voice-agent space in 2026 is crowded β€” Vapi, Retell AI, Bland AI, and Synthflow are the most-cited players. Here's an honest, structural comparison rather than a "we win everything" table. Competitor figures below are publicly advertised headline rates as of mid-2026 and change frequently β€” always check the vendor's own pricing page before deciding.

LeadHunterOS Vapi Retell AI Bland AI Synthflow
Model Self-hosted platform you own, deployed with Docker/Caddy BYOK middleware, API-first Managed, all-in-one runtime All-inclusive, outbound-first No-code SaaS, subscription
Headline rate $0.08–$0.20/min (tiered) ~$0.05/min + component costs ~$0.07/min all-in ~$0.09–$0.14/min or bundled plans ~$0.08–$0.09/min, $29–$249/mo tiers
Conversation builder Visual node graph (own React Flow canvas) Prompt/blocks Drag-and-drop + full SDK Graph-based "Pathways" Drag-and-drop, template-heavy
Built-in lead marketplace βœ… Native, public catalog + private CRM ❌ ❌ ❌ ❌
Payments built into the platform βœ… Card (Paddle) + crypto (DePay) native ❌ (billing is the platform's own) ❌ ❌ ❌
Multi-tenancy model PostgreSQL Row-Level Security Account-based Account-based Account-based Account-based, agency tier
Self-hostable βœ… (Docker Compose, own infra) ❌ ❌ ❌ ❌
Best fit Teams that want to own the stack and monetize a lead pipeline, not just place calls Engineering teams wiring a fully custom voice/LLM/TTS stack Teams that want the fastest managed path to production High-volume outbound campaigns at enterprise scale Non-technical teams that want a call flow live in under an hour

Where LeadHunterOS is structurally different: the other four platforms sell you call infrastructure. LeadHunterOS bundles call infrastructure with the commercial layer around it β€” a lead marketplace, credit-based billing, an agent template economy, and multi-tenant isolation β€” because it was built to run a lead-generation business, not just to place a phone call.

Where the others are ahead: all four have larger integration ecosystems, dedicated compliance tiers (HIPAA add-ons), and years more production traffic at scale. If your only requirement is "place a call reliably," they are more battle-tested today.


πŸ” Security Model

  • Row-Level Security everywhere it matters. User-scoped handlers run through a dedicated TenantConn; only webhook/admin/system code paths use a ServicePool with BYPASSRLS, and that distinction is enforced in code review, not convention.
  • JWT secret is mandatory at boot. The API refuses to start without an explicit JWT_SECRET β€” no silent fallback to a public default.
  • 2FA is not optional for email/password auth: every login/registration goes through a pre-auth token + one-time email code before a session token is ever issued.
  • Webhook payment endpoints are signature-verified before any parsing β€” Paddle via HMAC signature, DePay via RSA β€” so an attacker cannot forge a "payment succeeded" event.
  • Admin routes are protected by type, not by path. Admin handlers require an AdminClaims extractor distinct from the regular UserClaims, so a misrouted handler fails to compile rather than silently granting access.

🧱 Tech Stack

Layer Technology
Frontend Next.js 16 (App Router) Β· React 19 Β· TypeScript Β· Tailwind CSS 4 Β· Zustand Β· React Flow (@xyflow/react) Β· Recharts
Core API Rust Β· Actix-Web 4 Β· SQLx (compile-time checked queries) Β· actix-cors Β· jsonwebtoken Β· bcrypt Β· validator
Voice Worker Python Β· FastAPI Β· asyncpg Β· redis.asyncio Β· Twilio SDK Β· OpenAI-compatible client (Groq inference)
Database PostgreSQL 15 with Row-Level Security policies and native Postgres enums
Queue / Cache Redis 7 (append-only persistence)
Telephony Twilio (PSTN + Media Streams)
Speech Deepgram (STT) Β· ElevenLabs (TTS)
Payments Paddle (cards/subscriptions) Β· DePay (crypto)
Notifications Resend, via a dedicated async email worker
Infra Docker Β· Docker Swarm-style rolling deploys Β· Caddy (TLS + reverse proxy)

πŸš€ Getting Started (using LeadHunterOS)

LeadHunterOS is offered as a hosted product β€” no local setup required to start building agents.

  1. Create an account β€” free tier included, no card required.
  2. Design your first agent in the visual workflow builder: drop an AI Prompt node, connect a Condition, add an Extract Variable node for the data you need to capture.
  3. Connect your Twilio number (or use the platform default for testing) and hit Publish.
  4. Trigger a test call directly from the dashboard to hear the agent live before going to production.
  5. Watch leads flow into your dashboard β€” qualified, transcribed, and ready for follow-up β€” or list them on the marketplace.

For platform status, API reference, and webhook documentation, see the Integrations page in-app.


πŸ“„ License

This repository is documentation-only and does not contain the LeadHunterOS source code. LeadHunterOS is proprietary, closed-source software. All rights reserved Β© LeadHunterOS.


leadhunteros.com β€” Autonomous AI sales agents, built visually.

About

AI voice agent platform with a visual workflow builder, real telephony (Twilio), a built-in lead marketplace, and usage-based billing. Rust + Python + Next.js.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors