GOOGLE CLOUD / CONVERSATIONAL AI

Dialogflow CX
Virtual Agent.

Maya is a business phone solution for a working technology firm. It captures caller details, uses Gemini on Vertex AI to understand project needs, and routes callers toward a consultation, an accepted live transfer, or a message for follow-up. BigQuery adds structured event and lead storage.

BIGQUERY INTEGRATION DEPLOYED · POWER BI NEXT

REQUEST → UNDERSTANDINGET / CX–02
EXAMPLE CUSTOMER REQUEST

“My website is unstable. I need to move from AWS to Google Cloud without downtime.”

VERTEX AI / GEMINI

Context that carries forward.

Relevant questions. Corrections remembered.

PROJECT TYPE
Website migration
PLATFORMS
AWS → Google Cloud
CUSTOMER PROBLEM
Website instability
REQUIREMENT
No downtime
THE PROJECT
CLOUD STACK
Twilio+Dialogflow CX+Cloud Run+Vertex AI+BigQuery+Python / FastAPI

SOLUTION ARCHITECTURE / AT A GLANCE

One conversation.
A connected cloud system.

Twilio handles the call, Dialogflow CX manages the conversation, and authenticated Cloud Run fulfillment coordinates AI answers, customer actions, and structured BigQuery writes.

MAYA / SYSTEM ARCHITECTURE
Voice + actionsAIDataHandoff
Maya architecture: voice, fulfillment, data, and screened handoff Twilio Voice and Studio connect callers to Maya in Dialogflow CX. Maya invokes FastAPI on Cloud Run. The backend uses Gemini on Vertex AI, writes events and leads to BigQuery, and sends booking links through Twilio Messaging. A separate handoff path uses a protected Twilio Function to screen calls to the owner. Press 1 accepts; unaccepted transfers return to Maya for a message. VOICE + CONVERSATION AI + DATA + ACTIONS Live handoff Press 1 Return for a message Twilio Voice Studio call routing Dialogflow CX Maya · intake + dialogue Cloud Run FastAPI fulfillment Gemini Vertex AI BigQuery Events + lead history Twilio Messaging Calendly booking link Call screening Protected Twilio Function Owner’s phone Accept before connecting Maya architecture, mobile layout Twilio Voice and Studio connect callers to Maya in Dialogflow CX. Maya invokes FastAPI on Cloud Run. The backend uses Gemini on Vertex AI, writes events and leads to BigQuery, and sends booking links through Twilio Messaging. A separate handoff path uses a protected Twilio Function to screen calls to the owner. Press 1 accepts; unaccepted transfers return to Maya for a message. Fulfillment Live handoff Press 1 Twilio Voice Studio call routing Dialogflow CX Maya · intake + dialogue Cloud Run FastAPI fulfillment Call screening Twilio Function Gemini Vertex AI Owner’s phone Accept to connect BigQuery Events + lead history Twilio SMS Calendly booking link Dashed path: return to Maya for a message.
Solid arrows show service calls and handoffs. The dashed path returns an unaccepted transfer to Maya for a message.Explore the design decisions ↘
CREDENTIAL STORAGE

Google Secret Manager

The documented deployment stores the Twilio Auth Token in Secret Manager and supplies it to Cloud Run through a secret-backed environment variable. The source reads the value at runtime.

IDENTITY & ACCESS

Service identity

The setup grants the backend identity access to the Twilio secret. Dialogflow’s exported webhook configuration uses service-agent ID tokens for Cloud Run invocation.

TELEPHONY BOUNDARY

Protected call screening

The transfer Function uses Twilio’s Protected visibility. Unsigned requests are checked by the platform before the call-screening handler runs.

01 / THE CUSTOMER PROBLEM

The first conversation
should move the
project forward.

The first call should help a customer move forward without making them repeat their story or navigate a long menu.

I built Maya for a real business workflow: understand the inquiry, connect the caller to the right next step, and preserve context for follow-up. Dialogflow manages the conversation while the backend keeps actions separate from generated replies.

BigQuery is deployed as the project’s event and lead data layer. The next milestone is Power BI reporting, connecting that data to clearer business follow-up.

02 / INSIDE THE PHONE EXPERIENCE

From Maya
to a real conversation.

The Twilio Studio flow connects callers to Maya, then screens live handoffs with a private press-1 prompt. I confirmed the transfer works after correcting the destination number. Unaccepted transfers have a return route to Maya’s message-taking session.

  • 01 Native Dialogflow CX voice connection
  • 02 Owner answers and presses 1 to accept
  • 03 Published return route to Maya for messages

Press-1 transfer confirmed. Fallback and delivery checks next.

Published Twilio Studio flow: Maya hands off to screened_transfer, whose Return connects to missed_call_message. Legacy transfer widgets remain visible.View full size ↗
Published Studio flow: Maya → screened transfer → message-taking Return path. The older transfer/status widgets remain visible beside the active route. The owner’s phone number is masked as xxx-xxxx. Click to enlarge.

03 / EXPLORE THE CONVERSATION

A request becomes
something actionable.

Step through an illustrative call. The example explains the current design and does not contact the live assistant, place calls, or send messages.

EXAMPLE CONVERSATION · ILLUSTRATIVE CONTENT · NO LIVE REQUESTS

MAYAHey there, and thank you for calling Cloud Systems Direct. I’m Maya. Great ideas deserve the right team behind them. Who do I have the pleasure of speaking with today?
CALLERThis is Maria.

TWILIO → DIALOGFLOW CX

Start with the caller.

The phone experience introduces the business, captures a name, and collects or confirms a callback number.

assistant
Maya
intake
Name + confirmed callback
permission
SMS permission is collected separately

Dialogue is illustrative. Model evaluations and phone tests are recorded separately in the validation section below. A booking-link text is not a completed appointment.

Step 1 of 4: Contact

04 / THE PROJECT ARCHITECTURE

Conversation in front.
Cloud engineering behind it.

Twilio handles the phone channel and live transfer. Dialogflow manages state, and an authenticated Cloud Run webhook coordinates Gemini, customer actions, and BigQuery event and lead writes.

  1. 01 / PHONE CHANNEL

    Twilio Studio

    Connects incoming calls to Maya and routes live handoffs to the owner.

  2. 02 / CONVERSATION

    Dialogflow CX

    Manages intents, contact intake, conversation pages, and outcome routing.

  3. 03 / FULFILLMENT

    Cloud Run + FastAPI

    Coordinates authenticated fulfillment, notifications, and structured writes to BigQuery.

  4. 04 / UNDERSTANDING

    Vertex AI + Gemini

    Uses conversation context for service answers, corrections, and project summaries.

Authenticated service boundaries

Dialogflow invokes the private Cloud Run backend using service-agent ID tokens. A dedicated runtime service account accesses Vertex AI, and the Twilio Auth Token is referenced from Google Secret Manager as a runtime secret. Current IAM grants, secret versions, and caller-data retention remain operational verification items.

Latency and operational choices

A minimum Cloud Run instance is kept warm to reduce startup pauses. Conversational model requests use minimal thinking, an eight-second limit, and no automatic retries. This controls one part of the call’s latency.

05 / CURRENT BUILD STATUS

Working milestones.
A clear next phase.

A working phone integration with screened transfers, a published message-return route, and deployed BigQuery ingestion. Power BI is the next milestone.

IMPLEMENTED + EXERCISED

Conversation and actions

  • Branded Maya greeting, caller-name intake, and callback confirmation.
  • Contextual Gemini discovery, corrections, and service-question handling.
  • Booking-link SMS and owner lead alerts, observed in received texts.
  • Owner-confirmed live handoff with a private press-1 acceptance prompt.

WIRED / VALIDATION NEXT

Missed-call messages

  • Backend message capture, summarization, and notification handlers are built.
  • Protected call screening requires the owner to press 1 before connecting.
  • The screened transfer’s Return output is connected to Maya’s message-taking session.
  • End-to-end message delivery and email alerts still need verification.

NEXT MILESTONE

Power BI reporting

  • Connect the BigQuery reporting views to Power BI.
  • Visualize observed call activity and requested services.
  • Surface leads needing follow-up in a business dashboard.

DEPLOYED / BIGQUERY

A data foundation for better follow-up.

BigQuery is now part of Maya’s cloud architecture. Event and lead tables, deduplicated reporting views, and Cloud Run ingestion are deployed. The backend captures structured observations for service demand and business follow-up, with Power BI reporting as the next milestone.

Deployment confirmed November 1, 2026. The first live database write remains to be verified. Booking-link sends, accepted transfers, and confirmed appointments remain distinct outcomes.

Checkpoint: November 1, 2026. Phone-transfer and SMS observations are owner-reported tests. The Studio screenshot shows published return wiring. BigQuery tables, views, and backend ingestion are deployed; live data writes remain unverified. Appointment selection happens in Calendly. View the current project checkpoint ↗

06 / DEVELOPMENT TIMELINE

From intake flow
to a phone assistant.

Built in stages, with API checks, model evaluation, and real calls shaping the next change. October–November 2026.

  1. Consultation intake

    Built the intent, required form capture, welcome response, and booking-link ending.

  2. Backend foundation

    Added FastAPI, structured Gemini discovery, Docker packaging, and local health checks.

  3. Authenticated cloud + voice

    Deployed Cloud Run fulfillment and connected Dialogflow CX to Twilio’s native voice channel.

  4. Caller experience

    Added contact intake, shorter prompts, booking texts, lead alerts, and message/handoff handlers.

  5. Context and validation

    Added conversation history, correction handling, reviewed policy answers, and live model evaluation.

  6. Working transfer

    Tested the cell transfer and added transfer-status routing.

  7. Screened transfer

    Published press-1 screening and the Return route to Maya. Corrected the destination number and confirmed the transfer works.

  8. BigQuery integration deployed

    Created event and lead tables, reporting views, and dataset access. Deployed the ingestion-enabled backend to Cloud Run.

07 / VALIDATION & DESIGN DECISIONS

Show the behavior.
Respect the boundaries.

I’m validating the conversation and its cloud integrations together: what the customer says, which details are captured, and what actually happens next.

LATEST CHECKPOINT
November 1, 2026

01

74 offline tests passed

The backend suite covers contact intake, conversation orchestration, booking and message actions, failure paths, generated configuration, and BigQuery analytics. Model, notification, and database responses are mocked in these tests.

02

13 real model requests, zero errors

The latest shared Vertex evaluation completed 13 requests in 1.20–5.32 seconds each. It exercised correction memory, clarification, booking, and message requests. These are generation times from one evaluation, not full-call latency or a production benchmark.

03

Phone behavior tested separately

The owner confirmed the press-1 transfer works and previously shared received booking and handoff texts. Ignored/declined calls through the new route and full message delivery remain to be verified. Provider acceptance is tracked separately from delivery, and an SMS link does not create an appointment.

CONTINUE EXPLORING / AWS + GOOGLE CLOUD

Another side of customer experience.

Explore Enterprise Connect, my Amazon Connect contact center project with IVR routing, Lambda integrations, and call-data logging.