Cooking with Agents in VS Code β€” Liam Hampton

🍳 Cooking with Agents in VS Code

Liam Hampton β€” Microsoft Β· AI Engineer Conference
Video thumbnail
⏱ ~17 min 🎀 Liam Hampton 🏒 Microsoft 🏷 GitHub Copilot · VS Code · Agents · Git Worktrees

1 Introduction & The Agent Landscape

β–Ά 00:16 Liam opens by acknowledging the explosion of AI agents across CLIs, terminals, chat windows, and editors β€” and warns against the "agents can solve the world's problems" mindset. Developers still attempt one-shot prompts expecting complete applications or fixes in a single request.

β–Ά 01:16 From a business perspective, companies are asking about ROI and productivity boosts, yet AI infrastructure spending hasn't delivered proportional returns. The key message: be deliberate about how you use AI tools and be mindful of token spend.

β–Ά 01:42 Fun anecdote: a viral repo gained popularity by making LLMs "talk like a pirate" β€” the compressed language actually reduces token expenditure while maintaining quality.

2 Types of Agents: Local, Background & Cloud

β–Ά 02:38 Three distinct agent categories:

🟒 Local Agents

  • Run inside VS Code on your local machine
  • Use remote models (GPT, Claude) or local ones
  • Side-by-side, hands-on β€” human in the loop
  • Maximum developer control

🟠 Background Agents

  • Via GitHub Copilot CLI (also in VS Code)
  • Isolated via Git worktrees
  • Semi-autonomous (50/50 oversight)
  • Autopilot mode (preview) β€” skips confirmations

🟣 Cloud Agents

  • Scale outside your organization
  • Leverage GitHub cloud services
  • Best for hands-off tasks
  • Run in GitHub Actions (isolated)

Git worktree explained: A branch mapped to an isolated subdirectory β€” its own working copy with an associated branch, similar to a regular Git branch but physically separated.

3 When to Use Each Agent Type

β–Ά 04:07

Local Agent β€” High Involvement

βœ… Writing Tests

  • Hands-on with tests
  • Understand the codebase deeply
  • "In the weeds" approach
Background Agent β€” Medium Involvement

βœ… Building UI / Front-end

β–Ά 04:34

  • 50/50 oversight
  • Arduous, time-consuming tasks
  • Don't want to be fully out of the loop
Cloud Agent β€” Low Involvement

βœ… Documentation

β–Ά 04:59

  • READMEs, contribution guidelines
  • Making repos open-source friendly
  • Fully hands-off

4 VS Code as the Single Entry Point

β–Ά 05:29 The core thesis: VS Code serves as a unified entry point for all AI agent interactions. It supports:

  • Third-party agent integrations (Claude, etc.)
  • Background agents via CLI
  • Local agents in the editor
  • Remote/cloud agents
  • All accessible from a single developer workflow
πŸ’‘ The goal: reduce cognitive load by centralizing agent management in one place.

5 Live Demo: Three Agents, One Codebase

β–Ά 05:56 Liam demonstrates running three different agent types simultaneously on a single Python CRUD (product store) application.

Step 1 β€” Background Agent: Create Front-End UI

  • References GitHub issue #25 ("add a front end")
  • Uses CLI background agent with Autopilot mode
  • Prompt: "Summarize and plan a solution to issue 25"
  • Instructs agent to stop before creating PR for local testing
  • Agent works in a Git worktree (isolated directory)

Step 2 β€” Cloud Agent: Open-Source Documentation

β–Ά 07:24

  • Repo is not open-source friendly
  • Prompt: "Make this open source friendly, add all necessary files"
  • Handles README, contribution guidelines, etc. β€” fully hands-off

Step 3 β€” Local Agent: Write Unit Tests

β–Ά 07:50

  • Uses a custom test-writing agent in VS Code
  • Selects Claude Opus 4/6 with medium reasoning
  • Writes tests β†’ runs them β†’ tests pass
  • β–Ά 08:46 Iterates: updates error handling and tests

Results

β–Ά 09:41 All three agents complete successfully:

  • βœ… Tests pass (local agent)
  • βœ… PR created (background agent via worktree)
  • βœ… Documentation generated (cloud agent)
β–Ά 11:06 "One codebase, three problems, three separate agents fixed all at the same time."

6 How Cloud Agents Work Under the Hood

β–Ά 11:35

  • Run inside GitHub Actions (isolated environment)
  • Extended context via MCP servers:
    • GitHub MCP server (repository operations)
    • Playwright MCP server (screenshot-based front-end testing)
  • Dynamic workflows support
  • Built-in safeguards:
    • Network firewalls with whitelisted access
    • No direct access to main branch (must go through PRs)
    • Restricted and secure by design

7 Customization: Instructions, Skills & Agents

β–Ά 12:33 Four customization layers (applicable to Copilot AND other AI tools):

πŸ“‹ Custom Instructions

Define how the agent behaves

πŸ€– Custom Agents

Specialized agents for specific tasks (e.g., test writing)

πŸ“ Prompt Files

Pre-built prompts for common tasks

⚑ Agent Skills

Newer version of agents.md β€” reusable capabilities

8 VS Code Chat Customization Modal

β–Ά 13:29 Liam walks through the VS Code chat settings (via the cog icon in Copilot chat pane):

  • Agents β€” Custom agents + built-in (Ask, Explore, Plan)
  • Skills β€” Pre-configured actions (Address PR comments, Create PR) β€” editable
  • Instructions β€” Custom instruction files
  • Prompts β€” Built-in templates (e.g., "create an agent")
  • Hooks β€” Event-triggered automations
  • MCP Servers β€” External tool integrations

β–Ά 14:44 Third-party support: Claude plugins, hooks, instructions, and skills are all accessible from the same modal. Not restricted to GitHub Copilot.

9 Resources: Awesome Copilot & MCP Servers

β–Ά 15:14

Awesome Copilot

  • Open-source project: aka.ms/awesomecopilot
  • Collection of skills and customizations
  • Works with Copilot but adaptable to other AI tools
  • Also available as an MCP server

MCP (Model Context Protocol)

β–Ά 15:42

  • Extends LLM capabilities by connecting to external services
  • Authenticated: Azure, GCP, AWS resources
  • Free/open: Playwright, Microsoft Learn documentation
  • Full MCP spec support in VS Code

10 Key Takeaways

β–Ά 16:13

1. Don't rely on one-shot prompts β€” agents work best with iterative, targeted tasks distributed across the right agent type.
2. Three agent types serve different needs: Local (high control), Background (semi-autonomous via Git worktrees), Cloud (fully autonomous in GitHub Actions).
3. VS Code is the hub β€” a single entry point for managing local, background, cloud, and third-party agents simultaneously.
4. Autopilot mode (preview) enables background agents to work without constant confirmation β€” use carefully.
5. Cloud agents are safe β€” network firewalls, no main-branch access, isolated environments.
6. Customization is universal β€” instructions, agents, prompts, and skills work across Copilot AND third-party tools.
7. MCP extends everything β€” connects agents to Azure, Playwright, docs, and more.
8. Token spend matters β€” be deliberate about which agent type you use and how you prompt.

⏱ Timestamp Index

00:16Introduction & agent proliferation warning
01:16ROI & business perspective on AI spend
01:42Token spend & "talk like a pirate" repo
02:38Local agents explained
03:07Background agents & Git worktrees
03:37Cloud agents explained
04:07When to use local agents (tests)
04:34When to use background agents (UI)
04:59When to use cloud agents (docs)
05:29VS Code as single entry point
05:56Demo begins: Python CRUD app
07:24Cloud agent: open-source docs
07:50Local agent: custom test agent
08:46Iterating with local agent
09:41All agents complete
11:06New front-end UI reveal
11:35Cloud agents: GitHub Actions
12:33Customization layers
13:29VS Code chat modal walkthrough
14:44Third-party support (Claude)
15:14Awesome Copilot resource
15:42MCP overview
16:13Wrap-up & closing