What it does
A business that puts an AI voice agent on its phones gets hundreds of calls a week and no way to know which ones went badly, why, or what to change. helm-intelligence answers all three. It takes in every completed call, grades it on six categories, finds what keeps going wrong, and writes the prompt change that would fix it, then holds that change behind four quality checks and a budget cap.
Taking in calls
- Two ways in. Calls arrive one at a time or in batches through the REST API, or automatically through a signed ElevenLabs post-call webhook the moment a call ends.
- Platform connections. Each agent can be connected to its voice platform with an API key that is encrypted at rest. The connector can list an agent's branches and deployments, run simulated conversations and merge an approved prompt change back to the platform.
- Transcript adapter. Platform transcripts are converted into one internal format, so the scoring engine never cares which voice platform produced the call.
- Personal data removed first. Phone numbers, email addresses and Social Security numbers are redacted before a transcript reaches any model.
Scoring every call
- Six categories per call. Task execution, conversation quality, compliance, sentiment, technical performance and business outcome. Each agent can carry its own category weights, set through the API, so a booking line and a support line are judged by what matters to each.
- DeepEval metrics. A Python FastAPI sidecar runs DeepEval's conversation metrics: knowledge retention, turn relevancy, turn faithfulness, role adherence and conversation completeness.
- Cascaded judge. Claude Haiku scores the call first. When its confidence falls below 0.8, the call escalates to Claude Sonnet, so roughly 85 percent of calls are scored by the cheaper model and the hard 15 percent get the stronger one.
- Voice failure flags. Deterministic detectors mark the failures that only happen on the phone: silence gaps over three seconds, response latency over five seconds, repeated answers (found with a repetition detector and Levenshtein distance) and other voice-specific faults.
- Usage metering. Every model call is recorded in a usage table, so the cost of scoring each call is known.
Finding patterns
- Per-agent patterns. After every 25 calls, every week and on demand, the worker looks across an agent's recent scorecards and groups its failures into named patterns with example calls.
- Cross-business patterns. A failure becomes a global pattern only when the same flag appears in at least three agents belonging to at least two different organizations. Only the flag label crosses between tenants; example call IDs are filtered so each organization sees only its own calls.
- Weekly report. A per-agent report by ISO week with an ordinary least-squares trend line over 1 to 52 weeks, cached in Redis, shows whether an agent is getting better or worse.
Proposing fixes
- Proposal generator. For each pattern, Claude drafts a specific change to the agent's prompt.
- Budget cap. At most three improvement attempts per 25-call window, so a stubborn pattern cannot burn money in a loop.
- Four-check quality gate. Every proposal must pass a no-op check (a hash comparison that rejects a change that changes nothing), a scope check against the voice platform's prompt length limit, a coherence check and an instruction-preservation check that rejects any fix that drops an existing instruction.
- Learning from failure. An improvement-learnings table records which fixes failed, so the same fix is never proposed twice.
- Human control. Automatic application is off by default. An approved fix is applied by its own queue, and every prompt version is stored so any change can be traced.
- Testing and promotion in the data model. The data model carries A/B testing, a synthetic pre-screen against simulated calls, promotion of a winning prompt and a baseline lock.
The services, queues and data
- Five services in Docker:
helm-api(Fastify),helm-worker(BullMQ),helm-scorer(the DeepEval sidecar), PostgreSQL and Redis. - Four work queues: score a call, analyze patterns, send a webhook and apply an improvement, each with a dead-letter queue and a reaper with a circuit breaker for stuck jobs.
- Eleven tables: organizations, agents, calls, scorecards, patterns, improvements, prompt versions, A/B tests, usage records, platform connections and improvement learnings, all keyed with UUIDv7 and timestamped with time zones, built through eight database migrations.
- API surface: organizations, agents with weights and scorecards, single and batch call ingest, platform connections, per-agent and global pattern analysis, improvements, weekly reports, the ElevenLabs webhook, and health and readiness checks, behind Bearer API-key authentication, rate limiting and a uniform error handler.
Who it serves
It serves the agency running the voice agents and each business whose calls are scored. Scripts push scores and proposals into the Code Rescue client dashboard, so a client sees its call scorecards, patterns and proposed fixes next to its calls and bookings. Three price tiers were designed at $0.02, $0.05 and $0.08 per call for scoring only, scoring with learning, and scoring with automatic evolution.
What it achieved
- 1,413 test cases in 34,097 lines of tests across 117 files, three times the size of the 11,086 lines of application code they cover.
- A five-service stack, four queues and an eleven-table schema built in nine days across 231 commits.
- Cost held down by design: about 85 percent of calls scored by the cheaper model, a three-attempt cap per 25 calls, and metering on every model call.
- Privacy across tenants: patterns are shared between businesses without sharing a single call.
- A closed loop for voice agents: from the raw call to a scored call to a named pattern to a gated prompt fix.
The problem it solves
Voice agents fail quietly. A caller who hangs up after a five-second pause, or an agent that skips a compliance line, never files a complaint; the business only sees fewer bookings. Listening to calls by hand does not scale past a few a day, and generic chatbot evaluation tools ignore what makes a phone call different: silence, latency and repetition. When someone does find a problem, the fix is usually a guess at the prompt, made without knowing whether it breaks something else. helm-intelligence measures every call, separates one bad call from a pattern, learns from failures seen at other businesses without exposing them, and makes sure a proposed fix keeps every existing instruction and fits the platform before it reaches a human.
How he built it
Maxwell wrote the system as ten numbered specifications, from the scoring engine through the improvement loop, and directed AI agents to build each one through a fixed pipeline: specify, plan, break into tasks, audit the plan, build, and review. Twelve hookify rules block known bad patterns as an agent types them, ten ast-grep rules check the code's structure, and session hooks inject the project's rules into every helper agent and stop a task from closing before its gate passes. Reviews ran on every phase, graded red, amber or green, and the critical findings they raised were fixed before the next phase began. The test suite is three times the size of the code, and the review log records each finding and its fix.