Event Recap: The AI in Your Pocket: Building Offline Gemini Apps with the Browser at DevFest Bletchley Park

The AI in Your Pocket: Building Offline Gemini Apps with the Browser at DevFest Bletchley Park

It was a privilege to speak at GDG Bletchley DevFest 2025 on Friday, November 15th, where I presented “The AI in Your Pocket: Building Offline Gemini Apps with the Browser.” This session explored how Gemini Nano can be leveraged directly within the browser to create a new generation of offline-first, off-device web applications and Chrome Extensions.

The talk focused on empowering users with instant results, ensuring privacy, and maintaining functionality even in environments with limited or no connectivity.

Olorunfemi Davis presenting at DevFest Bletchley Park
Kicking off the session at the historic Bletchley Park.

The Limitations of Cloud-Based AI

While cloud-based AI offers immense power, it often comes with inherent challenges that can impact user experience. We discussed the critical need for instant results, the hurdles of limited connectivity, paramount privacy concerns when sensitive data leaves the device, and the common barriers of limited usage or paywalls. These factors highlight the need for more robust, on-device solutions.

Challenges of Cloud-Based AI
Visualizing the obstacles: latency, privacy, and connectivity in traditional cloud AI.

Introducing Gemini Nano: The On-Device AI Solution

The solution lies with Gemini Nano, Google’s most efficient AI model, now integrated directly into the Chrome browser. This integration ushers in a new era of offline-first, off-device web applications and Chrome Extensions, prioritizing speed, privacy, and accessibility. The core concept is to run Gemini Nano directly within the user’s browser, bringing powerful AI capabilities to the edge.

Gemini Nano Solution and On-device AI Architecture
Gemini Nano: Bringing advanced AI directly to the device, enabling a new architecture for web applications.

A Suite of Built-in AI APIs

The architecture leverages a powerful suite of built-in AI APIs, which are the key enablers for on-device inference. These APIs allow for local processing and are available offline, ensuring data privacy and instant results. We delved into:

  • The Prompt API: The core of on-device generative AI, enabling seamless, local content generation from natural language requests.
  • The Translator & Language Detector APIs: Providing real-time, on-demand translation of user-generated content without data ever leaving the device.
  • The Summarizer API: Instantly condensing long-form content, perfect for quickly digesting meeting transcripts or forum discussions.
  • The Writer & Rewriter APIs: Empowering users to create new content or refine existing text by adjusting tone, length, or style, all offline.
  • The Proofreader API: Offering interactive, on-the-fly corrections for documents and messages, ensuring grammatically correct communication.

Built-in AI APIs for On-Device Inference
An overview of the powerful built-in AI APIs available with Gemini Nano.

Practical Implementation and Deep Dive

During the session, we explored the practical aspects of implementing these APIs, including how to check for API availability, utilize Chrome flags (chrome://flags, chrome://On-device-internals) for development, and manage the download of AI models with progress monitors.

We then took a deep dive into the specifics of each API:

  • Prompt API: We demonstrated both non-streaming (await session.prompt()) and streaming (session.promptStreaming()) requests, highlighting the flexibility in interacting with Gemini Nano. A key feature discussed was session cloning (languageModel.clone()), which allows for maintaining independent contexts for different topics, ensuring that the original session remains unchanged. We also touched upon constraining the model’s output to a JSON schema for structured responses.

    Session Cloning for Independent Contexts
    Visualizing how session cloning enables multiple, isolated AI interactions.

  • Writer API: This API allows for content creation with fine-grained control over tone, format, length, expectedInputLanguages, and sharedContext. We showed how writer.write() can be used to generate tailored text.

  • Proofreader API: This powerful tool offers corrections for grammar, spelling, and punctuation, provides labels for error types, and even gives explanations in plain language, making it invaluable for ensuring clear communication.

  • Rewriter API: We illustrated its capability to transform text, such as changing the tone of an angry bug report into a professional, positive request. The rewrite() method, combined with options for tone, format, and length, allows for sophisticated text refinement.

    Rewriter API in Action
    Demonstrating the Rewriter API’s ability to transform text, such as refining a bug report.

  • Translator & Language Detector APIs: These APIs enable seamless on-device language understanding and translation. We showed how to create a translator with specified source and target languages, and how the LanguageDetector can identify the language of text with a confidence score.

  • Summarizer API: The summarizer’s capabilities are extensive, including summarizing text, suggesting titles and headings, creating concise summaries, and generating teasers. Options like sharedContext, type, format, and length provide flexibility in how content is condensed.

The Future of On-Device AI

The session concluded with an exciting look into the future. Gemini Nano in the browser ushers in a new era of AI, empowering developers to create next-generation, high-performance, and privacy-centric AI experiences that work seamlessly whether users are online or offline.

The key benefits of this approach are profound:

  • Enhanced User Privacy: Data stays on the device, never leaving the user’s control.
  • Reduced Latency: Near-instant results due to local processing.
  • Offline Accessibility: Functionality persists even without an internet connection.
  • Cost Efficiency: Eliminates server-side costs associated with cloud AI.
  • Seamless Integration: AI features are built directly into web applications and Chrome Extensions.

Attendees left equipped with practical knowledge on how to implement, test, and debug these powerful built-in AI APIs, ready to build the next generation of intelligent web experiences.

Thank You Slide
Concluding the session and opening the floor for questions.

Event Details & Resources

It was a fantastic session, and a huge thank you to GDG Bletchley for hosting!

Event Link: DevFest Bletchley Park 2025

Presentation Slides: The AI in Your Pocket

Speaker: Olorunfemi Davis, Senior Platform Engineer at Inflo

Hashtags: #DevFest #GDGBletchley #Gemini #OfflineAI #EdgeComputing #WebDev #PlatformEngineering


More Moments from DevFest Bletchley Park

Olorunfemi Davis at DevFest Bletchley Park
A candid shot during the event.

Olorunfemi Davis heading from the event
On the way to share insights on Gemini Nano.

Olorunfemi Davis with a fellow GDE Academy member
Connecting with other Google Developer Experts.

Olorunfemi Davis with Philips
A moment with Philips at DevFest.

A giant Christmas tree at Bletchley Park
The festive atmosphere at Bletchley Park.

Related Content