Skip to main content

View Phone & RAG Example on GitHub

Check out the complete Phone & RAG example in our GitHub repository
In this example, we build both inbound and outbound calling agents using Twilio for the phone network, Stream for edge transport, and RAG backends (Gemini FileSearch or Turbopuffer) for knowledge retrieval. The inbound agent answers calls and uses a knowledge base to provide product information. The outbound agent makes calls programmatically — like booking a restaurant reservation.
Vision Agents requires a Stream account for real-time transport. Most providers offer free tiers to get started.

What You Will Build

  • Answer inbound phone calls with an AI agent powered by Twilio voice
  • Make outbound calls programmatically for tasks like booking reservations
  • Retrieve real-time knowledge using Gemini FileSearch or Turbopuffer RAG
  • Handle bi-directional audio via Twilio media streams over WebSocket
  • Run on Stream’s low-latency edge network

Next Steps

RAG Guide

Learn more about RAG backends and knowledge retrieval

HTTP Server Guide

Deploy your phone bot with the built-in HTTP server