TrueFoundry is recognized in the 2025 Gartner® Market Guide for AI Gateways! Read the full report

No items found.

Collaborative Web Actions: Building a Smart Movie Co-pilot with TrueFoundry and Google ADK

March 24, 2026
|
9:30
min read
SHARE

Think of the mental gymnastics involved in a simple movie booking. Tabbing between your friend group chat, theater listings, reviews, and dynamic seat maps. Balancing location against showtimes, juggling the ever-changing ticket prices. It’s not just a task; it's a fragmented, multi-stage mental burden that often leads to abandoned carts or settle-for-less options. We end up fighting the dynamic interface of complex websites, just trying to state a single, simple intent.

Instead of navigating the complex terrain of dynamic sites manually, imagine opening a single, focused chat window and stating that intent once. "Let's book two tickets for the new Dune movie at the nearest IMAX theater for tomorrow night." This simple statement triggers a complex and beautifully orchestrated chain of events. A digital guide immediately begins a resilient conversation, interpreting your constraints, dynamically fetching real-time choices from a live site, and leading you effortlessly toward a decisive action.

This is the promise of true, action-oriented AI. It's not a static chatbot; it's a dynamic orchestration of intelligence and action. It’s about creating a seamless handoff between a digital guide and your human decision. To help you build this kind of sophisticated co-pilot experience, we're thrilled to release our newest and most advanced TrueFoundry Accelerator: The Movie Booking Browser Automation Agent.

This accelerator provides a complete, production-ready blueprint for an AI agent that navigates the Fandango website on a user's behalf. Built on a modular, resilient architecture, it stitches together the Google Agent Development Kit (ADK), a robust server-side headless browser setup (agent-browser CLI), and the TrueFoundry LLM Gateway, all while implementing a unique security pattern for the most sensitive tasks.

Understanding the Collaborative Flow: From Chat to Live Site

The single most challenging part of AI browser automation is managing complex states and handling sensitive interactions, like payment processing. The dynamic nature of modern web UIs—where elements shift, load asynchronously, and vary by user—breaks traditional automation scripts. To build a resilient agent, you need an architecture designed from the ground up to self-correct and to intelligently collaborate with the user.

Our accelerator is unique because it adopts a robust, security-focused collaborative handoff model. In this model, the AI handles all the tedious, rule-based steps of finding a movie, but it stops short of handling actual payment information. Control is seamlessly transferred back to the user’s own browser at the most critical step, ensuring user trust and reduced PCI compliance complexity for your application.

This entire ecosystem is encapsulated within a standard FastAPI Server and API layer, making it easy to deploy, secure, and monitor. The diagram you see here is that orchestration blueprint, detailing exactly how context moves from user intent to browser action.

Deep Dive into the Architecture: Resilient State Management and Collaborative Actions

Let's break down the technical components and the four key loops of this state-orchestrated flow, directly referencing our technical blueprint.

The Orchestrator: BookingAgent (State Orchestrator)

This component is the heart of the system. Labelled as the "State Orchestrator," the BookingAgent doesn't just pass text; it transforms high-level intent into a structured, reliable, and conversational workflow. It uses a series of interconnected loops to maintain precise state.

  1. Initial Guided Choices: The agent (informed by the ADK Agent logic) is designed to present structured choices to the user from the outset. Rather than asking a blank "What movie would you like to see?", it immediately offers guided options such as "[Search by movie] [Search by genre]". When the user makes a selection, it doesn't just get text input; it sets the internal context for the agent, directing the entire subsequent conversation. This initial structure is critical for maintaining task focus.
  2. The State Loop: Context Injection and Dynamic List Generation: This loop (pointed out in the diagram’s central gray box) is what makes the conversation dynamic.
    • 1. Context Injection: The Session Manager preserves state, ensuring each turn of the conversation knows the previous constraints. The BookingAgent injects this full context (user zip code, date, preferred movie) into its prompts.
    • 2. Tool Call Execution: The intelligence layer (pointed to by the ADK Agent + LLM Gateway combo) generates a structured JSON response deciding which tool to call (e.g., Maps, click).
    • 3. Dynamic List Generation: This is crucial. When the agent needs the user to select a date, it doesn't just ask. It uses its browser tools to get the actual DOM state from Fandango. It then extracts the valid list of dates directly from the page and generates clickable, guided options in the chat, keeping the user entirely on track and avoiding dead ends. This is illustrated perfectly in the diagram: as the user inputs a zip code and date, the agent presents specific options like "2:30 PM" and "5:45 PM" showtimes, built dynamically from Fandango's real-time DOM snapshot results.
    • 4. Error Recovery: What happens when the dynamic site changes, and a CSS selector fails? This part of the loop is the agent’s resilience engine. Instead of a hard failure, the system captures the error, and the BookingAgent initiates a self-correction step, often prompting the LLM with hints about what failed on the page and how to retry.

The Brain: ADK Agent and the TrueFoundry LLM Gateway

This partnership provides the agent’s intelligence. The ADK Agent (Google ADK Runner + InMemorySession) provides the standardized framework, while the TrueFoundry LLM Gateway provides the model flexibility and powerful backend features.

  • The Power of the Gateway: Routing all model calls through the TrueFoundry LLM Gateway (via the ADK Runner) provides instant observability, prompt caching for speed and cost reduction, and the ability to seamlessly switch between top-tier models like GPT-4, Claude, or Gemini. This is critical for optimizing performance for a particular task (like DOM parsing) while managing infrastructure costs.

The Action Chain: Browser Tools, DriverManager, and agent-browser CLI

This component chain executes the commands.

  • Abstraction Layer: Browser Tools abstract the raw interaction, making the orchestration logic clean and modular.
  • Concurrent Scaling: The BrowserManager design is critical. As pointed out by the label, it maintains "Per-session BrowserDriver instances + prewarm," meaning each chat session has its own isolated headless browser instance. This prevents user data collision and allows your application to safely scale concurrently across thousands of users.
  • The Engine: The agent-browser CLI (Playwright-powered Headless Chromium) is the raw execution engine that drives the Fandango website. It passes the all-important DOM Snapshot & Interaction Results back up to the loop for the dynamic list generation.

The Masterstroke: The Collaborative Handoff Model

This is the culmination of the entire architectural design. As you can see from the "Handoff Logic (User Context preserved)" dotted line, after the tedious data-gathering steps are complete (e.g., after the user selected the theater and the showtime), the server-side automation stops.

It triggers the BookingAgent to transfer control. The live Fandango page (or a separate secure frame) is loaded directly in the user’s own browser (the yellow box labelled "Live Fandango Page (User is in direct control)"). Because the context (theater and specific showtime) has been preserved, the user is landed exactly where they need to be.

The user then directly interacts with the complex, visual seating chart and proceeds through the secure payment steps, just like they normally would. This is brilliant because:

  • Security: Your application never handles, processes, or stores sensitive PCI payment data, reducing vast security and compliance overhead.
  • Human Handoff: It lets the human user handle the final, visual seat choice on the dynamic map, which is a task best suited for a person.

This final user-controlled loop of Seat Selection & Payment (Direct Input) leads directly to the final outcome: Booking Confirmed.

👉 Watch the Interactive Supademo of the Entire Collaborative Flow

See how this robust architecture takes the user from a simple genre search to a live seating chart on Fandango in just a few taps, illustrating every step of this orchestrated blueprint.

Why Start with an Accelerator?

TrueFoundry Accelerators are designed to get you to production faster. Web automation with LLMs is notoriously complex, with hidden state management and resilience challenges. By starting with this singular, production-ready blueprint, you:

  • Bypass Complicated Development: Jumpstart your project with proven patterns for state persistence, self-correction, and collaborative human-AI loops.
  • Ensure Concurrent Scale: Leverage the isolated session model of the BrowserManager and DriverManager, which are critical for any enterprise deployment.
  • Reduce Risk: The proven collaborative handoff model is the most effective way to secure web actions, reducing security, legal, and compliance risks related to sensitive data.

Get Started Today

The Movie Booking Accelerator is more than just a demonstration of technology; it's a foundational blueprint for building robust, secure, collaborative agents. Whether you're building a hotel booking co-pilot, an airline automated assistant, or an automated data extraction tool, this architecture shows you how to connect LLMs to web actions reliably.

Dive into the TrueFoundry platform today, access this accelerator repository, and start adapting this technical blueprint for your unique automation needs.

The fastest way to build, govern and scale your AI

Discover More

No items found.
What is an LLM Router
March 24, 2026
|
5 min read

What is an LLM Router? A Complete Guide

LLM Terminology
Agentic AI in enterprises
March 24, 2026
|
5 min read

How To Use Agentic AI in Enterprises in 2026: A Blueprint

No items found.
March 24, 2026
|
5 min read

Cursor AI MCP Server Configuration: A Complete Setup Guide

No items found.
March 24, 2026
|
5 min read

Collaborative Web Actions: Building a Smart Movie Co-pilot with TrueFoundry and Google ADK

No items found.
No items found.
Take a quick product tour
Start Product Tour
Product Tour