The AI in Your Pocket: Building Offline Gemini Apps with the Browser – GDG Cloud North West Recap
Recap of a GDG Cloud North West session in Manchester, exploring offline Gemini Nano apps in the browser, AI APIs, and practical developer insights.
I had the absolute pleasure of speaking at the .NET Liverpool meetup on Tuesday, October 28, 2025, joining a fantastic lineup of lightning talks. A huge thank you to the organizers and the engaged audience. In my 15-minute slot, I unpacked a topic I’m incredibly passionate about: the new AI-first strategy shaping up in .NET 9, powered by Microsoft.Extensions.AI and the Semantic Kernel.
For those who couldn’t make it, here’s a recap of the key ideas we covered.
Here was the agenda for our quick dive into the future of AI in .NET:
For years, integrating AI into our applications felt like bolting on an external component. With .NET 9, this is fundamentally changing. The core themes for this release are Cloud Native & AI, signaling a shift to treat artificial intelligence as a first-class citizen within the .NET ecosystem.
The goal is to democratize AI development, providing a standardized, reliable, and type-safe way for every .NET developer to interact with Large Language Models (LLMs) like those from OpenAI and Azure AI.
Microsoft.Extensions.AITo achieve this standardization, .NET 9 is introducing a new set of NuGet packages under Microsoft.Extensions.AI. Think of this as the essential “plumbing” layer. It abstracts away the complexities of different AI provider SDKs behind a unified interface.
This means you can configure your connection to an AI model once and then inject it anywhere in your application using familiar dependency injection patterns.
For example, setting up a connection to Azure OpenAI becomes as simple as this in your Program.cs:
builder.Services.AddAzureOpenAIChatCompletion(
"deploymentName",
new Uri("https://my-azure-ai.openai.azure.com"),
"my-api-key");
// Now you can inject it anywhere!
public class MyService(IChatCompletionService chatService)
{
// ... use chatService to interact with the model
}
This is a game-changer for writing clean, testable, and maintainable AI-powered code.
If Microsoft.Extensions.AI is the plumbing, then Semantic Kernel (SK) is the brain that orchestrates the flow of intelligence. SK is an open-source SDK that bridges the gap between your application’s code and the reasoning power of an LLM.
LLMs are brilliant at understanding language and intent, but they are stateless and have no knowledge of your specific business logic or data. Semantic Kernel solves this by acting as a central coordinator, allowing the LLM to access and execute your C# code.
Semantic Kernel brings three key capabilities to the table that allow you to build truly intelligent applications:
Plugins (Native Functions): These are your regular C# methods that you can “expose” to the LLM as tools. The AI can then decide when and how to call these functions to perform actions, like fetching data from a database, calling an external API, or sending an email.
Memory (RAG): You can provide the LLM with your own data—product manuals, internal documents, chat histories—to “ground” its responses in reality. This technique, known as Retrieval-Augmented Generation (RAG), prevents the AI from making things up (hallucinating) and ensures its answers are relevant to your application’s context.
The Planner: This is where the magic happens. You can give the Planner a high-level goal (e.g., “Book a flight to New York and email me the confirmation”), and it will use the available plugins to automatically generate a step-by-step plan to achieve that goal. It figures out which functions to call, in what order, and how to pass data between them.
Talk is cheap, so let me show you some code! During the presentation, I demonstrated a simple .NET 9 console application that uses Semantic Kernel with the Google Gemini connector. This provides a practical example of the concepts we’ve discussed.
This is a simple .NET 9 console application demonstrating how to use the Semantic Kernel with the Google Gemini connector. The application creates a chat-like interface in the console where a user can enter prompts and receive responses from the Gemini model.
Microsoft.SemanticKernel.Connectors.Google package to connect to the Gemini family of models.Microsoft.Extensions.Configuration to manage the API key securely via user secrets.git clone https://github.com/olorunfemidavis/SKDemo
cd SKDemoConsoleApp
dotnet user-secrets init
dotnet user-secrets set "Gemini:ApiKey" "YOUR_ACTUAL_API_KEY"
dotnet run
Program.cs)Here are the most important parts of the code, showing how to initialize and invoke the kernel. For the full, runnable code, please see the demo repository.
// 1. Initialize the Semantic Kernel builder
var builder = Kernel.CreateBuilder();
// 2. Configure it with the Gemini Chat Completion service
// (The API key is securely retrieved from configuration in the full demo)
builder.AddGoogleAIGeminiChatCompletion(
modelId: "gemini-1.5-flash",
apiKey: "YOUR_GEMINI_API_KEY" // Replace with your key or load from config
);
// 3. Build the kernel
var kernel = builder.Build();
// 4. Invoke the kernel with a prompt
var result = await kernel.InvokePromptAsync("What is the history of the .NET Liverpool meetup?");
// 5. Get the result
Console.WriteLine(result.GetValue<string>());
SKDemoConsoleApp.csproj)The project file includes the necessary NuGet packages for Semantic Kernel, the Google connector, and configuration management.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0-preview.3.24172.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0-preview.3.24172.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.0-preview.3.24172.9" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.11.1" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Google" Version="1.11.1-alpha" />
</ItemGroup>
</Project>
This AI-first strategy in .NET 9 represents a monumental shift. It empowers developers to move AI logic from being a siloed, external service to a deeply integrated part of the application architecture. Building domain-specific “Copilots” and intelligent agents will become a standard pattern, not a niche specialty.
By focusing on business logic (Plugins) and data context (Memory), developers can leverage the power of AI to enhance productivity and create the next generation of intelligent, cloud-native applications on the .NET platform.
For those who want to dive deeper, here are some useful links:
Thanks again to everyone at .NET Liverpool for the great evening. I can’t wait to see what we all build with these incredible new tools!