๐ณ Cooking with Agents in VS Code
Liam Hampton โ Microsoft ยท AI Engineer Conference
โฑ ~17 min
๐ค Liam Hampton
๐ข Microsoft
๐ท GitHub Copilot ยท VS Code ยท Agents
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
00:46One-shot prompt fallacy
01:16ROI & business perspective on AI spend
01:42Token spend & "talk like a pirate" repo
02:07GitHub Copilot agents overview
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
06:26Autopilot mode explained
07:24Cloud agent: open-source docs
07:50Local agent: custom test agent
08:46Iterating with local agent
10:31Testing background agent output
11:06New front-end UI reveal
11:35Cloud agents: GitHub Actions
12:04MCP servers & safeguards
12:33Customization layers
13:29VS Code chat modal walkthrough
14:44Third-party support (Claude)
15:14Awesome Copilot resource