Repository navigation
vapi/agency-routing: per-client Vapi call routing with an async tool via Hookdeck - #44
Merged
Merged
Conversation
…Call Control (pre-live-test) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d signature probe script The CLI's --source-config is silently ignored for VAPI sources, leaving verification off. Setup now PUTs the source auth config directly. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…waiting; say what webhooks a call produces
The assistants asked small-talk questions ("how's your day") while the async
lookup ran and moved on without waiting. The prompt now forbids small talk and
stacked questions and has the assistant say one hold sentence, then wait. Each
client column shows which webhooks a call produces and when.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ystem; probe proves verification is on
setup and listen now use createHookdeckCli(), upsertSource({ auth }), upsertConnection and
runListen from _shared/hookdeck instead of the demo's own CLI wrapper and the auth PUT workaround.
npm run probe sends a correctly signed and a badly signed request to each source and checks both
the HTTP status (200 / 401) and the request record read back from the Hookdeck API.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the shared data-flow drawer _shared/flow-drawer is a bottom drawer (closed by default) that shows each message moving from the platform through Event Gateway (received, verified or rejected with 401), the event, delivery attempts (status, latency, retries) and the app's result, plus the app's own outbound calls. A server module reads requests, events and attempts from the Hookdeck API with the project API key and merges the app's own feed; nothing in it is specific to Vapi. The demo passes its sources, labels and feed, records the controlUrl call, and gains npm run simulate to replay a signed call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…03, slow, include tool calls) and a short-interval retry rule so the drawer shows retries Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng the cards Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s header Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…after ingestion show the 200 the sender gets Defaults to 401 (edge-verified source types such as VAPI). Messages carry an explicit rejected flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 16, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er README) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared scene kit and pane copied byte-identical from the ElevenLabs branch (d771e77). Scene with one row per client, the controlUrl return path, and call, two-client, duplicate, bad-signature and app-down scenes. A dedup rule on both connections. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e and square, light) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e3f4e), byte-identical; vapi/agency-routing uses it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… hover tips), the agent and the caller on each card, Switchboard theme, While you wait panel Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ic and the main view in a browser Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… when verified, keep the Hookdeck API key off the CLI command line and out of errors
- flow-drawer server: an empty HOOKDECK_API_KEY made split('') insert [key] between every character of an error message.
- topology pane: verified null means the source does not verify, so no pill; Verified only for true.
- hookdeck-cli: login passes the key to `hookdeck ci` as HOOKDECK_API_KEY (the CLI reads it) instead of --api-key, so ps does not show it; failed CLI calls have the key removed from their message and output.
Synced copies: deepgram/stt-tts and vapi/agency-routing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stants it created (IDs saved in .env), never one that shares a name Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…duplicate, which the While you wait panel ignores The server-side half is in the next commit; the panel already keys on the log type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed tool calls, controlUrl allowlist and timeout, capped dedupe that retries after a failed post) - Bind to 127.0.0.1 (HOST overrides); warn at startup when an *_ASSISTANT_ID is unset. - Malformed tool calls (bad arguments JSON, non-array toolCallList) return 400 and are logged; runLookup has a .catch; a JSON error handler replaces Express's stack-trace page; express.json limit 50mb -> 2mb. - sendToCall times out after 10 s; the controlUrl must be https and *.vapi.ai (ALLOW_LOCAL_CONTROL_URL=true allows http://localhost for npm run simulate and the tests). - seen_tool_calls is a capped, expiring map; a tool call is removed from it when the result is not posted, so a redelivery retries. The repeat is logged as tool-calls-duplicate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…seful straight away, not "Success." Vapi records an empty tool result for an async tool (seen in a real call log); the old wording told the model something it never receives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… pretending, and the prompt says "Success." again A real call showed the assistant promising to create an account and check availability (it has no tools for either), going silent after "one moment", and guessing the CRM result before it arrived. Vapi does answer an async tool with a placeholder "Success." (both tool_call_result messages in that call), so 17aa9fe's wording was wrong. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d rows, README call-button wording and run notes, all env vars in .env.example, the latest pane and feed polling from _shared, theme test reads the demo's own theme.js Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
vapi/agency-routing: a demo where each client's Vapi assistant sends its call events to its own HookdeckVAPIsource and local endpoint. The CRM lookup tool runs async and answers into the live call through Vapi's Live Call Control (controlUrladd-message). A live topology pane shows every webhook and everycontrolUrlcall.What's in it
VAPIsource per client (vapi-acme-dental,vapi-globex-plumbing), each with its own CLI destination;npm run setupcreates the sources, connections, assistants and HMAC credentials through the APIs.{body});scripts/probe.tssends a signed and an unsigned request to prove verification is on. A bad signature gets a 401.message.type,call.id,statusandtoolCallList) and retry (exponential, 4 retries from 10 s; short so a retry is visible in the pane).controlUrl. Explanations sit behind ⓘ dialogs and hover tips.mainonly, never the Data flow pane, via_shared/theme.controlUrlreturn edge from each endpoint to its own call. Tabs play five scripted scenes (call and tool, two clients, duplicate dropped, bad signature, app down then retry). Clicking a packet shows its attempts and a View in Hookdeck link.scenes/captures/._shared/scenesand_shared/topology-panebyte-identical to elevenlabs/post-call-transcripts: post-call transcripts through Hookdeck with a live topology pane and a shared scene kit #47; the flow drawer's server-side state is kept, its client is replaced by the pane. Design system and CLI helpers from chore: share the design system and Hookdeck CLI helpers across demos via _shared/ and a sync check #43.Live-run facts
controlUrl.lookup-error.hookdeck listenprocesses for the same sources delivers every event twice (one per CLI client); the README says so.Merging
_shared/manifest.json; keep every entry when resolving._shared/theme: vapi/agency-routing: per-client Vapi call routing with an async tool via Hookdeck #44, elevenlabs/post-call-transcripts: post-call transcripts through Hookdeck with a live topology pane and a shared scene kit #47, retell/outbound-lead-calling: outbound lead calling with Retell, verified call events through Hookdeck and a live topology pane #48 and livekit/voice-adventure: The Drowned Bell, a LiveKit voice adventure with room webhooks through Event Gateway #49 all add_shared/theme/theme.jsbyte-identical to livekit/voice-adventure: The Drowned Bell, a LiveKit voice adventure with room webhooks through Event Gateway #49's and the samesharedentry in_shared/manifest.json.Checks
node scripts/sync-shared.mjs --checkand typecheck pass;npm test(32 tests: offline checks, theme copy, the While you wait logic, and browser tests for the scenes, the pane and the page) passes at the branch head.Update 2026-11-18: Switchboard theme, roles on each card, the While you wait panel and ⓘ dialogs (
ecad321..5521483). No code the tutorial (hookdeck/website#992) shows changed.Review fixes: (
5fe85ba..eaa73e1) the server binds to 127.0.0.1 (HOSToverrides); malformed tool calls get a 400 and a JSON error handler replaces stack traces;sendToCallhas a 10 s timeout and thecontrolUrlmust be https and*.vapi.ai(ALLOW_LOCAL_CONTROL_URL=truefornpm run simulate); the dedupe set is capped and a tool call is retried after a failed post; a redelivery after the lookup closed no longer opens a second countdown;setupupdates only the Vapi objects it created; a startup warning for an unset*_ASSISTANT_ID; and one_sharedcommit (5fe85ba: key redaction, Verified pill, API key off the CLI command line) that can be cherry-picked onto the other demo branches. Two lines of code the tutorial shows changed:signal: AbortSignal.timeout(10_000)insendToCall, and a controlUrl check beforerunLookupinhandleToolCalls.Prompt fix (
07fc942): after a real off-script call, the assistants say in one sentence what they can't do (create accounts, book, check availability) and offer a call-back instead of pretending; they don't guess the CRM result before it arrives; the prompt again says Vapi answers the async tool with a placeholder "Success.".Merge readiness (
be84075): root README gets thevapi/directory line and every shared utility row this stack uses; the demo README and.env.examplematch the code; the latest pane and feed polling is synced from_shared; the theme test reads the demo's owntheme.jssonpm testpasses in a standalone copy.🤖 Generated with Claude Code