How imadityarai/vanipilot works
VaniPilot is a voice-first simulator for fictional phone tasks: people speak or type a request, the app interprets it, plans a simulated action or answers a supported question, and presents the result with approval gates where needed. Its domain spans speech and language handling, intent resolution, sample phone records, screen planning, and transaction/session updates. Similarity matching is the default answer path; an optional model-backed assistant adds interpretation and answers. The excerpts establish key module calls, but do not expose every runtime connection, so uncertain links are omitted.
Main entry points: use-pilot.js Pilot controller · model-server.mjs Model assistant · session.mjs Task transactions · scenario.mjs Sample records
Components 18
User interaction
- Simulator UI
app/page.jsx - Pilot controller
app/use-pilot.js - Speech capture
app/automatic-speech.js - Speech recognition
app/speech-worker.mjs
Request understanding
- Intent parser
lib/intent.mjs - Question matcher
lib/similarity.mjs - Language handling
lib/language.mjs - Model validation
lib/model-contract.mjs
Demo task simulation
- Screen planner
lib/screens.mjs - Sample records
lib/scenario.mjs - Task transactions
lib/session.mjs - Reminder replies
app/task-replies.js - Browser storage
Assistant services
- Assistant API route
app/api/assistant/route.model.js - Model assistant
lib/model-server.mjs - Space assistant adapter
lib/space-assistant.mjs
Other components
- User
- Ollama service
Connections 29
- User → Simulator UI: uses
README.md - Simulator UI → Pilot controller: delegates to
app/page.jsx - Simulator UI → Sample records: reads
app/page.jsx - Simulator UI → Screen planner: renders from
app/page.jsx - Simulator UI → Task transactions: summarizes with
app/page.jsx - Pilot controller → Speech capture: starts
app/use-pilot.js - Speech capture → Speech recognition: transcribes via
- Speech recognition → Language handling: loads locales
app/speech-worker.mjs - Pilot controller → Intent parser: interprets with
app/use-pilot.js - Pilot controller → Question matcher: matches questions
app/use-pilot.js - Pilot controller → Model validation: checks credentials
app/use-pilot.js - Pilot controller → Language handling: selects reply locale
app/use-pilot.js - Pilot controller → Screen planner: plans routes
app/use-pilot.js - Pilot controller → Task transactions: commits tasks
app/use-pilot.js - Pilot controller → Reminder replies: formats reminders
app/use-pilot.js - Intent parser → Sample records: matches records
lib/intent.mjs - Intent parser → Model validation: uses operations
lib/intent.mjs - Question matcher → Sample records: formats results
lib/similarity.mjs - Screen planner → Sample records: plans from records
lib/screens.mjs - Task transactions → Sample records: uses sample state
lib/session.mjs - Task transactions → Screen planner: checks goal view
lib/session.mjs - Task transactions → Browser storage: persists changes
README.md - Reminder replies → Task transactions: uses task replies
app/task-replies.js - Assistant API route → Model assistant: routes to
app/api/assistant/route.model.js - Model assistant → Sample records: grounds answers
lib/model-server.mjs - Model assistant → Language handling: uses locale rules
lib/model-server.mjs - Model assistant → Model validation: validates output
lib/model-server.mjs - Space assistant adapter → Model assistant: configures assistant
lib/space-assistant.mjs - Model assistant → Ollama service: requests model
README.md