Agentic dialler designed for recruitment agencies.
nextjsnodejsexpresstemporalwebrtcsipjsrtpengineexasonarparalleldeepgramgeminisupabaseterraformgcp

Key Facts

  • Role: Lead Engineer & Architect
  • Stack: Next.js 16, React 19, Tailwind CSS v4, Temporal, Supabase, Kamailio/RTPengine, Deepgram Nova-3, OpenRouter (DeepSeek V3.2), Exa, Perplexity Sonar
  • Target: Mid-market recruitment agencies (30+ consultants)
  • Status: Pre-Production (Targeting H2 2026 Deployment)

Executive Summary

Recruitment sales teams waste enormous amounts of time on two things: researching a prospect before picking up the phone, and logging the outcome into their CRM afterwards. I built CallOS to eliminate both, serving as the debut in-house product for Arkwright Solutions.

CallOS is a white-glove, browser-based dialer workspace that plugs into a client's existing CRM (Bullhorn) and telephony stack (any SIP trunk) without a rip-and-replace. It orchestrates parallel web research to synthesize a high-leverage opening brief in under 30 seconds, provides a native WebRTC softphone with real-time AI coaching, and automates post-call transcription, CRM diff extraction, and field-level application—all via a one-click recruiter approval flow.

Engineered for production resilience, the system relies on durable Temporal workflows, a robust real-time media ingestion pipeline, and an exhaustive repo-native evaluation harness for continuous LLM optimization. CallOS recently completed Phase 7 (Full-Stack Target-Workspace Reconciliation) and is slated for production deployment with early design partners in H2 2026.

The Challenge

The "Translation Problem" in outbound recruitment scaling involves several friction points:

  • Pre-call blindness: Recruiters spend 15+ minutes manually hunting across LinkedIn, job boards, and CRM history, or call cold and convert poorly.
  • In-call latency: Traditional AI coaching happens after a call is lost. Real-time situational awareness requires sub-second streaming transcription and low-latency inference.
  • Post-call admin drudgery: Logging activities into legacy CRMs like Bullhorn is tedious. Data degrades, and the CRM's value erodes over time.
  • Telephony lock-in: Agencies are tied to legacy PBXs (3CX, RingCentral, Gamma). Forcing a telephony migration is a sales non-starter.
  • LLM Drift & Reliability: Relying on generative AI for core business workflows requires rigorous testing, strict grounding, and enforced execution latency bounds.

The Stack

I chose a stack capable of handling real-time media, long-running AI pipelines, strict multi-tenancy, and deterministic LLM evaluation:

  • Frontend: Next.js 16 (App Router), React 19, Tailwind CSS v4, shadcn/ui. Chrome Extension (Manifest V3) for Zoom/Teams/Meet video bridging.
  • Telephony & Media: SIP.js (browser WebRTC), Kamailio (SIP proxy/registrar), RTPengine (media relay + dual-channel capture), Coturn.
  • Speech-to-Text: Deepgram Nova-3 (real-time streaming and batch), OpenAI Whisper (fallback).
  • Orchestration: Temporal (durable workflow engine).
  • AI Models: OpenRouter runtime (DeepSeek V3.2 as primary, Gemini 3 Flash as fast fallback).
  • Research: Exa (web search/content), Perplexity Sonar, Bright Data (server-side LinkedIn enrichment).
  • Backend & Database: Node.js/Express API gateway, Supabase (PostgreSQL + Auth + RLS).
  • Infrastructure: GCP (Cloud Run, Compute Engine, Cloud Storage), Vercel (frontend), Terraform (per-client gateway provisioning).
  • AiOps & Testing: Custom 100-run repo-native eval harness, Playwright (E2E flows).

Key Architectural Decisions

1. Robust Runtime Topology & Monorepo Organization

The codebase is organized as a scalable npm workspace to maintain strict boundaries between UI projection, durable execution, and external integrations:

  • apps/web: The Next.js 16 consultant UI. Kept intentionally thin, heavy workflow boundaries are protected behind explicit gateway facades.
  • services/api: The Node.js/Express server owning authorization, workflow dispatch, real-time fanout, and internal route boundaries.
  • services/temporal-worker: Executes the durable Temporal workflow definitions.
  • packages/sync, packages/workflows, packages/domain, packages/adapters: Shared canonical business logic.
  • services/gateway: Docker Compose stack for the Kamailio/RTPengine operational telephony edge.

2. Target Workspace Projection & Canonical Sync Engine

In Phase 7, I explicitly split pipeline-local UI state from shared CRM projection state to ensure absolute data integrity:

  • Canonical CRM Entities: crm_entities serves as the authoritative read projection. The UI never fetches ad-hoc provider data directly.
  • Target Workspace State: Drives queue logic, command availability, and backlog windows from a unified projection fact layer instead of ad-hoc route guesses.
  • Sync Engine (packages/sync): Rebuilds authoritative write intents from persisted state prior to dispatching them to external CRMs (like Bullhorn), gracefully managing conflicts and logging per-operation audit rows.

3. Agent Harness & Repo-Native Evals

Rather than manually testing prompt variants, I engineered a declarative, repo-native 100-run evaluation harness to rigorously control LLM optimizations:

  • Parallel vs. Sequential: Executed matrix tests comparing Exa, Sonar, and parallel provider paths across 10 structural batches with 10 variants each.
  • Bounded One-Pass Synthesis: Pre-call research operates under strict SLAs ("Fast" tier < 30s, "Deep" tier < 60s). The harness relies on bounded prefetch synthesis, enforcing strong source grounding and deterministic fallbacks when models emit malformed JSON.
  • Promotion Gates: Prompt variants are treated as "policy-as-code." Promoting a prep variant requires an active manifest, strict fairness/provenance evidence, and independent automated audit sign-off enforced by CI checks (check:prep-harness-promotion).

4. Real-Time In-Call Intelligence

CallOS bridges the gap between batch transcription and live active assist:

  • Streaming STT: Dual-channel audio is shipped from the RTPengine gateway (or Chrome Extension during video calls) to Deepgram Nova-3 for sub-second latency transcription.
  • Passive Coach: A monologue agent triggers on speaker handoff events, running on high-speed models (Gemini 3 Flash) to flag qualification gaps (e.g., "Probe for timeline before discussing rates").
  • Active Panic Button: A dedicated action for consultants to request immediate, conversation-aware assistance based on live transcripts and the initial prep brief.

5. BYOT Telephony (Bring Your Own Trunk)

To avoid telephony lock-in, I built a BYOT adapter layer:

  • Browser → Kamailio: SIP.js establishes a WSS WebRTC connection securely.
  • Gateway: Kamailio translates WebRTC to standard SIP and proxies to the agency's existing PBX. RTPengine handles codec transcoding and dual-channel capture at the network edge.
  • Per-Tenant VMs: Each client receives a dedicated VM for their gateway provisioned via Terraform, ensuring call audio never traverses shared media infrastructure.

6. Temporal for Durable Orchestration

Every pipeline—from pre-call research to post-call wrap—runs inside Temporal:

  • Idempotency: Workflows survive deploys and browser crashes. A 60-second deep prep doesn't restart from zero if the user closes their laptop.
  • Terminal Settlement: Normalizing degraded metadata (e.g., wrap_voicemail) via Temporal ensures consistent replay and UI projection without state drift.
  • Post-Call Wrap Pipeline: When a call ends, Temporal triggers transcription, extraction, and CRM proposal generation. Updates are applied iteratively via the Sync Engine following human approval.

7. Zero-Trust Multi-Tenancy & Data Retention

Security and compliance are treated as infrastructural guarantees:

  • Postgres RLS: Every tenant table is restricted by ENABLE + FORCE Row-Level Security, scoping every row by org_id derived from the verified JWT.
  • Durable Retention: Rather than relying on simple application-layer TTLs, packages/retention utilizes Temporal cron workflows to enforce explicit org-level data retention windows and orchestrate signed DSAR (Data Subject Access Request) erasure ledgers.

The Workspace & Manager Dashboards

The application replaces fragmented tools with a cohesive three-column workspace:

  • Left: The call queue, driven deterministically by the Target Workspace Projection.
  • Center: The Target Deck, featuring the prep brief, shared context chat, softphone controls, and live-assist coaching cards.
  • Right: The Reflection Panel, previewing extracted CRM proposals and housing the one-click approval flow.

For leadership, the Manager Analytics dashboard offers real-time call volume metrics, prep coverage analysis, and a monthly AI-synthesized coaching report for each consultant, identifying recurring conversation trends and actionable areas for improvement based on aggregated transcripts.

Deployment Architecture

ComponentIsolationProvider
Next.js FrontendShared (org-scoped via auth)Vercel
API & STT IngestShared (containerized)GCP Cloud Run
Temporal WorkerShared cluster, per-org queuesTemporal Cloud
Supabase / PostgresShared, org_id + RLSSupabase Cloud
Telephony GatewayDedicated Per-Tenant VMGCP Compute Engine

Outcome & Future Roadmap

CallOS transforms the outbound recruiter workflow from manual preparation and painful data entry into a highly leveraged, tech-enabled process: "click target → read brief → dial → accept CRM proposals."

Having merged the monumental Phase 7 redesign, CallOS features hardened real-time queues, rigorous LLM evaluation pipelines, and production-ready data reconciliation. The project is currently preparing for initial pilot deployments with 3–5 early-adopter clients in H2 2026, marking a powerful debut for Arkwright Solutions in the AI enterprise software market.