– Agent Sessions Day on Feb 19th

AI features in VS Code

Visual Studio Code's built-in AI features are powered by GitHub Copilot and large language models (LLMs). These features span multiple surfaces, from inline suggestions as you type to autonomous agents that implement entire features. This article provides an overview of the AI features and how they connect. For a hands-on tutorial, see the Quickstart.

AI features at a glance

VS Code offers AI across a spectrum of interaction surfaces, each suited to different tasks:

  • Agents: autonomous sessions that follow the full agent loop, reading files, executing coordinated changes across multiple files, running commands, and iterating until the task is complete. Agents handle multi-step tasks end-to-end, from implementing features to architecture-level refactoring and framework migrations.
  • Chat: the primary interface for interacting with agents and having multi-turn conversations. Use chat to assign tasks, ask questions, explore ideas, or get explanations. Switch between Agent, Ask, Plan and custom agents depending on your goal.
  • Inline chat: a lightweight chat interface that opens directly in the editor for quick, focused edits.
  • Inline suggestions: code suggestions that appear as ghost text while you type. These use specialized completion models and don't involve an agent loop or tools. Next edit suggestions (NES) go further by predicting where your next edit should happen.
  • Smart actions: one-click AI actions integrated into your workflow, like generating commit messages or fixing diagnostics errors.

Concepts

The following conceptual articles explain the architecture and building blocks that power these AI features:

  • Language models: the AI models that power all features, including how to choose and configure them.
  • Context: how VS Code assembles information for the model, from your files to conversation history.
  • Tools: mechanisms that let agents act on your development environment and connect to external services.
  • Agents: the agent loop, agent types, subagents, memory, and planning.
  • Customization: how to tailor AI behavior with instructions, prompt files, custom agents, skills, hooks, and plugins.
  • Trust and safety: control mechanisms, AI limitations, and security considerations.