Cooking with Agents in VS Code — Liam Hampton, Microsoft
By AI Engineer
Key Concepts
- AI Agents: Specialized software entities that perform tasks (coding, testing, documentation) with varying levels of human oversight.
- VS Code as a Control Plane: Using the IDE as a centralized hub to manage local, background, and cloud-based AI agents.
- Git Worktrees: A feature allowing multiple branches to be checked out into separate directories simultaneously, enabling parallel development and agent testing.
- MCP (Model Context Protocol): An open standard that allows AI models to connect to external data sources, tools, and services (e.g., GitHub, Playwright, Azure).
- Token Expenditure: The cost associated with LLM usage; the speaker emphasizes optimizing prompts and agent selection to manage these costs.
- Human-in-the-loop (HITL): A design philosophy where the developer maintains control and oversight of AI-generated outputs.
1. Categorization of AI Agents
The speaker classifies agents based on their operational environment and level of human interaction:
- Local Agents: Run directly on the machine (e.g., Claude, locally hosted models). Best for tasks requiring high developer involvement, such as writing unit tests.
- Background Agents: Operate in an isolated manner (e.g., GitHub Copilot CLI). Ideal for tasks that are "50/50" in terms of effort, such as building UI components, where the developer wants to monitor progress without constant manual intervention.
- Cloud Agents: Run in isolated environments (GitHub Actions). Best for "hands-off" tasks like generating documentation or making repositories open-source friendly.
2. Practical Workflow: The "Three-Agent" Approach
The speaker demonstrated a real-world application of managing three distinct tasks simultaneously within a single VS Code workspace:
- Front-end Development (Background Agent): Used an "Autopilot" agent to generate a UI for a CRUD application. The agent was instructed to pause before creating a Pull Request (PR) to allow for local testing.
- Documentation (Cloud Agent): Tasked with making the repository open-source friendly by generating
READMEfiles and contribution guidelines. - Unit Testing (Local Agent): Used a custom agent to write and run Python unit tests, allowing the developer to iterate on error handling and test logic in real-time.
3. Technical Frameworks and Security
- Git Worktrees: Used to isolate the front-end development work from the main codebase, preventing conflicts while testing the new UI.
- Cloud Agent Security: Cloud agents run in GitHub Actions with strict safeguards:
- Network Firewalls: Restricted to whitelisted endpoints.
- Branch Restrictions: No direct write access to the
mainbranch. - Context Extension: Uses MCP servers to access tools like Playwright for automated visual testing.
- Customization Modal: VS Code now features a centralized settings pane (accessible via the cog icon in the Copilot chat) to manage:
- Skills: Pre-defined agent capabilities.
- Instructions: Custom system prompts for agent behavior.
- Hooks: Event-driven triggers for agent actions.
4. Notable Quotes
- "We still somehow seem to find ourselves in this sort of paradigm where everybody thinks agents can solve the world's problems... Absolutely not the case."
- "I would use a local agent when it comes to writing tests. I want to be really hands-on... I really want to be in there in the weeds."
- "Visual Studio Code is a single entry point for AI agents."
5. Actionable Resources
- Awesome Copilot: A repository for community-driven agent customizations and skills: aka.ms/awesomecopilot.
- MCP Implementation: Developers are encouraged to use MCP servers to connect their LLMs to external resources like GCP, AWS, or Azure, ensuring secure, authenticated access to infrastructure.
Synthesis/Conclusion
The core takeaway is that developers should move away from the "one-shot prompt" mentality and instead adopt an agentive workflow. By leveraging VS Code as a unified control plane, developers can orchestrate multiple agents—local, background, and cloud—to handle different aspects of the software development lifecycle (SDLC) simultaneously. This approach reduces cognitive load, optimizes token usage, and maintains the necessary "human-in-the-loop" oversight required for high-quality, secure code production.
Chat with this Video
AI-PoweredLoad the transcript when you're ready to chat so the initial page stays lighter.