跳到正文
DEV Community· Khushi Chandra·· 4 小時前AI 評分48

Trojan Horse:代你致電汽車維修技工的 AI 智能體,以及 Kane CLI 如何找出程式錯誤

Trojan Horse: AI agents that call mechanics for you, and how Kane CLI caught our bug

AI 導讀

Kane CLI 為 Trojan Horse 生成測試並找出可用狀態錯誤:技工表示不確定是否有空時,應用程式卻顯示「目前不可用」。Trojan Horse 是一款在 Kane CLI Hack Day SF 用一天打造的多智能體應用,可搜尋附近的流動汽車維修技工、同時致電最多 3 人詢價並確認預約。團隊把可用狀態欄位改為可空值並修正介面,最新一次 main 測試通過全部 19 項。

正文

Khushi Chandra

The problem
Your car breaks down at night. You search for mobile mechanics and call them one by one: who’s open, who’s close, who won’t overcharge? That’s exactly when time matters most.

What we built
Trojan Horse (“Engine cooked? Help booked.”) is a multi-agent app we built in one day at Kane CLI Hack Day SF:

  1. A Discovery Agent uses OpenAI web search to shortlist mobile mechanics near you.
  2. A Caller Agent places up to 3 calls at the same time using OpenAI Realtime with Vonage/Twilio, asking about availability, arrival time and price, and streams the transcripts to your screen.
  3. Quotes are ranked by price, and you pick one.
  4. A Callback Agent confirms the job. It’s only booked when the mechanic explicitly says yes.

The stack: a React dashboard, a Node orchestrator with SQLite, separate discovery and voice services, and shared zod contracts.

Why we didn’t trust our own AI
A voice agent can easily invent a price, say “booked” when it isn’t, or dispatch twice. So we tested Trojan Horse with Kane CLI against our own plain-English requirements:

  • Kane read our one-paragraph spec and produced 26 acceptance criteria and 19 requirement-linked browser tests. We didn’t write any by hand.
  • A test-mode scenario switch makes the simulated mechanics misbehave on purpose (a failed call, an unknown price or ETA, a late arrival, a booking that’s never confirmed), so every rule can be checked repeatably.
  • Two tests read the browser’s network traffic to prove it never calls Twilio, Vonage or OpenAI directly.
  • Every run seals an evidence pack: a screenshot per step, network logs, and Kane’s diagnosis.
  • A required CI check replays the suite on every PR. The latest run on main passed all 19 tests.

What Kane caught
We added one rule: if a mechanic doesn’t say whether they’re free, show “Unknown”. Kane designed a test, and it failed. The mechanic said “I’m not sure anyone is free right now”, and our app showed “Available now: No”. Our shared contract stored availability as true or false, so both the simulated and the live voice path turned “unsure” into “unavailable”. A real driver would have been misled. We made the field nullable and fixed the UI, and the same test passed. Both evidence packs are in the repo.

Code: https://github.com/RamyaRamachandran-driod/emergency-caller

KaneCLIHackDay

來源:DEV Community · dev.to