How yar-malik/saudi-retail-voice-agent works
This is a self-hostable Saudi retail voice-agent example, with scripted order, return, and win-back conversations plus recorded reference scenarios. The phone workflow starts at Twilio’s webhook: the server creates an agent, returns spoken turns, receives speech results, and serves synthesized audio clips. The internal engine selects and advances a flow, invoking registered tools or replaying recorded results. README capabilities include direct Node and Python speech examples and configurable speech recognition; their implementation details were not sampled, so those links are documented rather than inferred from source.
Main entry points: server.py Phone webhook · flows.json Flow scenarios · agent.py Conversation engine · tools.py Tool registry
Components 18
Conversation runtime
- Phone webhook
server.py - Conversation engine
agent.py - Tool registry
tools.py
Speech services
- Speech recognition
stt.py - Speech client
voho.py
Retail scenarios
- Flow scenarios
flows.json - Order status
flows.json - Returns exchange
flows.json - Cart win-back
flows.json - Reference workflows
flows.json
Direct examples
- Node speech example
examples/node/index.mjs - Python speech example
examples/python/main.py
Other components
- Caller
- Twilio
- Voho Speech API
- OpenAI Whisper
- Custom recognizer
- Retail systems
Connections 20
- Caller → Twilio: calls
README.md - Twilio → Phone webhook: posts speech
README.md - Phone webhook → Conversation engine: starts and replies
server.py - Phone webhook → Tool registry: lists stubs
server.py - Phone webhook → Speech client: synthesizes clips
server.py - Conversation engine → Flow scenarios: loads scenarios
agent.py - Conversation engine → Tool registry: runs tools
agent.py - Phone webhook → Twilio: returns TwiML
README.md - Twilio → Phone webhook: posts transcript
README.md - Phone webhook → Caller: serves audio
server.py - Speech client → Voho Speech API: requests speech
voho.py - Speech recognition → OpenAI Whisper: transcribes audio
stt.py - Speech recognition → Custom recognizer: sends audio
stt.py - Node speech example → Voho Speech API: requests speech
README.md - Python speech example → Voho Speech API: requests speech
README.md - Tool registry → Retail systems: integrates systems
README.md - Flow scenarios → Order status: defines
README.md - Flow scenarios → Returns exchange: defines
README.md - Flow scenarios → Cart win-back: defines
README.md - Flow scenarios → Reference workflows: records
README.md