Visual Studio Code comes with AI agents built in. Describe a task in natural language and an agent plans the approach, edits files across your project, runs commands, and self-corrects until the work is done. Agents stay in the flow of how you already work, so you can focus on intent and review instead of typing every line.
Agents are free to start and built into VS Code: sign in with a GitHub account to use the free plan, choose from multiple agents and models, or bring your own model key and even run a local model offline. New to agents? Learn how agents work.
Agents handle real coding tasks end-to-end. A few common ones:
Agents are the most autonomous of several AI surfaces in VS Code. For lighter-weight help, you can also use chat, inline chat, inline suggestions, and smart actions.
AI features are built into VS Code. Sign in with your GitHub account to enable them, then complete the agents quickstart. If you don't have a subscription, you're signed up for the free plan with monthly limits. To explore a longer scenario, follow the agents tutorial.
Make sure agents are enabled in VS Code settings ( chat.agent.enabled ). If your organization has disabled agents, contact your GitHub organization admin.
In VS Code, the choice comes down to your approach and your scope. The Agents window is agent-first and works across all your workspaces from a single window, so it's ideal when you assign high-level tasks and orchestrate multiple agents in parallel across projects. The Chat view is code-first and is scoped to the workspace you have open, so it's ideal when you give the agent coding tasks and stay close to the code it produces.
If you want to work outside VS Code, you can also manage your agents from the terminal with the Copilot CLI, from the GitHub Copilot app, or directly in your browser.
Choose the experience that fits your current task and where you want to work. You can start a session in one and continue it in the other without losing context.
The Agents window (Preview) is a dedicated window focused on chat as the primary interface. It works across all your workspaces from one window, so you can assign high-level tasks, evaluate the outcomes, and run and track multiple agents in parallel. The Agents window is optimized for agent-first workflows.

The Chat view is a chat panel in the sidebar, next to your workspace editor tabs. It's scoped to the workspace you have open in VS Code, so you can give the agent coding tasks, review the code it produces, and keep an agent focused on the code you're actively working on. The Chat view is optimized for code-first workflows.

Stay on top of your agents from any browser, no setup required. On github.com, assign issues to Copilot, review agent pull requests, and track progress, then pull a branch into VS Code when you want to take over.
Need your own environment? vscode.dev/agents opens a secure tunnel to your development machine, letting you track and manage your running agent sessions in the browser with your local code and tools within reach.

Use GitHub Copilot CLI to work with an agent from the command line, either in the VS Code integrated terminal or an external terminal.

Use the GitHub Copilot app to manage AI coding tasks in a dedicated desktop experience outside VS Code.

VS Code gives you flexibility instead of locking you into one agent or model. You choose:
Learn more about agent harnesses and language models. You set these choices, along with the permission level, when you start a session and can change them at any time. See how to start a session.
Agents work best when they understand your project's conventions and have the right tools. VS Code gives you several ways to tailor agents so they produce code that fits your codebase and team practices from the start:
Set coding standards: define project-wide rules and conventions with custom instructions so agents generate code in your style.
Automate repeatable tasks: package multi-step workflows, scripts, and template files as agent skills, or capture a single reusable prompt in a prompt file.
Specialize the agent: create custom agents for personas or roles like code reviewer, security expert, or tester.
Connect external tools and data: add MCP servers to reach databases and APIs, and use hooks to run scripts at key points in an agent session.
To decide which option fits your goal, see Customization concepts. For setup steps and examples, see Customize agent behavior in VS Code. You can also install plugins to add pre-packaged bundles of these customizations from the Marketplace.
Agents can read and edit files, run terminal commands, and call external services. VS Code keeps you in control: approve or deny tool calls before they run, set a permission level that matches the autonomy you are comfortable with, and enable agent sandboxing to restrict file system and network access at the OS level. Learn more about trust and safety and AI security.
Organizations can centrally manage which AI features, models, and tools are available across their teams. Admins define policies that control agent capabilities, restrict MCP servers or extensions, and enforce compliance requirements, so developers get a consistent, governed experience out of the box. Learn more about enterprise AI policies.