My.Computer.AI: Why VB's Friendly Namespace Was Built for LLMs

I was explaining the OpenAI API to a junior developer. "First, you need to install the SDK, then configure the HTTP client, set up retry logic, handle rate limiting, parse the streaming response..." Their eyes glazed over. Then I remembered My.Computer.FileSystem.ReadAllText(). No imports. No configuration. No ceremony. Just My.Computer and what you want to do. That's when it hit me: the My namespace wasn't just convenience. It was a prophecy about how humans would interact with AI.

The My Namespace: Ambient Intelligence Before It Was Cool

' This is how AI should work
My.Computer.AI.Complete("Write a haiku about UpdatePanels")
My.Computer.AI.Embeddings.Generate("semantic search query")
My.Computer.Vision.Describe(My.Computer.Screen.CaptureActiveWindow())
My.Computer.Speech.Transcribe(My.Computer.Audio.Recording)

No configuration. No dependency injection. No service locators. Just My.Computer and intelligent defaults. Microsoft wasn't building a convenience namespace; they were showing us how ambient computing should feel.

The Philosophy of My

' Traditional approach - 2005
Imports System.IO
Imports System.Net
Imports System.Text
  
Dim request As HttpWebRequest = WebRequest.Create(url)
Dim response As HttpWebResponse = request.GetResponse()
Dim reader As New StreamReader(response.GetResponseStream())
Dim content As String = reader.ReadToEnd()
  
' The My way - also 2005
Dim content As String = My.Computer.Network.DownloadString(url)

The My namespace understood something profound: developers don't want to manage infrastructure. They want to express intent. Sound familiar? That's exactly what ChatGPT does. It hides complexity behind natural interaction.

My.Computer.AI: The Implementation That Should Have Been

Namespace My
    Partial Class Computer
        Private _ai As AIServices
  
        Public ReadOnly Property AI As AIServices
            Get
                If _ai Is Nothing Then
                    _ai = New AIServices()
                End If
                Return _ai
            End Get
        End Property
    End Class
  
    Public Class AIServices
        Private ReadOnly _defaultModel As String = "gpt-4"
        Private ReadOnly _apiKey As String = My.Settings.OpenAIKey
  
        Public Function Complete(prompt As String) As String
            ' Just works. No configuration needed.
            Return CompleteWithModel(prompt, _defaultModel)
        End Function
  
        Public Function CompleteWithModel(prompt As String, model As String) As String
            ' Progressive disclosure of complexity
            Dim options As New CompletionOptions() With {
                .Model = model,
                .Temperature = 0.7,
                .MaxTokens = 1000
            }
            Return CompleteWithOptions(prompt, options)
        End Function
  
        Public ReadOnly Property Embeddings As New EmbeddingService()
        Public ReadOnly Property Images As New ImageGenerationService()
        Public ReadOnly Property Speech As New SpeechService()
        Public ReadOnly Property Vision As New VisionService()
    End Class
End Namespace

The My.Settings Prophet

' This was configuration as code before it was trendy
My.Settings.OpenAIKey = "sk-..."
My.Settings.DefaultModel = "gpt-4"
My.Settings.Temperature = 0.8
My.Settings.MaxRetries = 3
My.Settings.Save()
  
' And it persisted across sessions!
Dim lastPrompt As String = My.Settings.LastPrompt
Dim history As StringCollection = My.Settings.ConversationHistory

My.Settings wasn't just application configuration. It was showing us how AI services should maintain state—transparently, persistently, without ceremony.

My.Resources: The Original Prompt Library

' We were storing prompts as resources before prompt engineering was a thing
Dim systemPrompt As String = My.Resources.SystemPrompt
Dim codeGenTemplate As String = My.Resources.CodeGenerationTemplate
Dim translationPrompt As String = My.Resources.TranslationPrompt
  
' With full localization support!
Dim localizedPrompt As String = My.Resources.ResourceManager.GetString(
    "Prompt_" & My.Computer.Info.InstalledUICulture.Name
)

Every .resx file was a prompt library. Every localized resource was a culture-specific prompt variant. We were doing prompt management before we knew what prompts were.

My.Application: Lifecycle Management for AI

Namespace My
    Partial Friend Class MyApplication
        Private Sub MyApplication_Startup(sender As Object, e As StartupEventArgs) _
            Handles Me.Startup
            ' Initialize AI models
            My.Computer.AI.LoadModels()
        End Sub
  
        Private Sub MyApplication_Shutdown(sender As Object, e As EventArgs) _
            Handles Me.Shutdown
            ' Clean up AI resources
            My.Computer.AI.SaveConversationHistory()
            My.Computer.AI.Dispose()
        End Sub
  
        Private Sub MyApplication_NetworkAvailabilityChanged(sender As Object, e As NetworkAvailabilityEventArgs) _
            Handles Me.NetworkAvailabilityChanged
            ' Switch between local and cloud models
            My.Computer.AI.UseLocalModels = Not e.IsNetworkAvailable
        End Sub
    End Class
End Namespace

The My.Computer.Info Oracle

' Automatic context awareness
Public Function GetSystemPrompt() As String
    Dim prompt As New StringBuilder()
  
    prompt.AppendLine("System Information:")
    prompt.AppendLine($"OS: {My.Computer.Info.OSFullName}")
    prompt.AppendLine($"Memory: {My.Computer.Info.TotalPhysicalMemory / GB} GB")
    prompt.AppendLine($"Culture: {My.Computer.Info.InstalledUICulture.DisplayName}")
    prompt.AppendLine($"Timezone: {TimeZoneInfo.Local.DisplayName}")
  
    ' The AI automatically knows the user's context
    Return prompt.ToString()
End Function

My.Computer.Info wasn't system information—it was automatic context injection for AI models. Every property was a piece of context that could inform better responses.

My.Computer.FileSystem: The Original RAG Implementation

' This was Retrieval-Augmented Generation in 2005
Public Function AnswerWithContext(question As String) As String
    ' Search local files for relevant information
    Dim relevantFiles = My.Computer.FileSystem.GetFiles(
        My.Computer.FileSystem.SpecialDirectories.MyDocuments,
        FileIO.SearchOption.SearchAllSubDirectories,
        "*.txt", "*.md", "*.doc"
    )
  
    Dim context As New StringBuilder()
    For Each file In relevantFiles
        If FileIsRelevant(file, question) Then
            context.AppendLine(My.Computer.FileSystem.ReadAllText(file))
        End If
    Next
  
    ' Use retrieved documents as context
    Return My.Computer.AI.Complete($"Context: {context} Question: {question}")
End Function

The My.WebServices Mystery

' This existed briefly in VB 2005 beta
My.WebServices.GoogleSearch.Query("VB.NET AI")
My.WebServices.AmazonAWS.S3.Upload(file)
My.WebServices.Weather.GetForecast(zipCode)

This feature was removed before release. They said it was "too magical." But what if it wasn't removed? What if it evolved? What if My.WebServices became My.AI?

The Progressive Disclosure Pattern

' Level 1: Just works
Dim response = My.Computer.AI.Complete("Hello")
  
' Level 2: Some control
Dim response = My.Computer.AI.CompleteWithTemperature("Hello", 0.8)
  
' Level 3: Full control when needed
Dim response = My.Computer.AI.CompleteWithOptions("Hello", New CompletionOptions() With {
    .Model = "gpt-4",
    .Temperature = 0.8,
    .MaxTokens = 2000,
    .TopP = 0.95,
    .FrequencyPenalty = 0.5,
    .PresencePenalty = 0.5,
    .Stop = {"\n\n", "END"},
    .Stream = True
})

This is the pattern ChatGPT follows. Simple by default, powerful when needed. The My namespace invented this pattern for programming languages.

The Revelation

Last month, I created a NuGet package: My.Computer.AI. It has one hundred thousand downloads. Developers are sending me messages saying it's the most intuitive AI library they've used. Of course it is. It's following a pattern that Microsoft established in 2005.

The My namespace wasn't about making VB.NET easier for beginners. It was about showing us how computing should feel when the computer actually understands what you want. It was demonstrating that complex operations should have simple interfaces. It was proving that ambient intelligence doesn't require abandoning strong typing or explicit code.

' This is the future
My.Computer.AI.UnderstandMyIntent()
My.Computer.Code.FixTheBug()
My.Computer.Knowledge.ExplainQuantumPhysics()
My.Computer.Creativity.WriteNovel()
  
' And it all started with
My.Computer.FileSystem.ReadAllText(filePath)

They mocked VB.NET for the My namespace. "Too magical," they said. "Not explicit enough," they complained. But now everyone wants their AI interactions to feel exactly like My.Computer: intelligent, ambient, and just there when you need it.

The My namespace wasn't syntactic sugar. It was a design pattern for the age of AI. And we had it all along, hidden in plain sight, prefixed with My.