> AI agents: For documentation discovery and navigation, see [llms.txt](/llms.txt).

# Agent tutorials and guides

Choose a tutorial to learn with a sample project, or follow a guide to apply an agent workflow to your own codebase in VS Code.

## Choose where to start

If you're new to both VS Code and AI, first [install the editor and open a workspace](/docs/getstarted/overview.md). If you already know VS Code, use one of these sample projects to learn the agent workflow:

<div class="card-grid">
    <a class="card" href="/docs/agents/quickstart">
        <i class="codicon codicon-hubot" aria-hidden="true"></i>
        <div>
            <p><strong>Complete your first agent task</strong></p>
            <p>Recommended starting point. Build and validate a small web app, then review the changes.</p>
            <p>Sample project. No runtime or build tools required.</p>
        </div>
    </a>
    <a class="card" href="/docs/agents/agents-tutorial">
        <i class="codicon codicon-mortar-board" aria-hidden="true"></i>
        <div>
            <p><strong>Build an app step by step</strong></p>
            <p>Build a portfolio page while learning agent, editor, browser, and source control workflows.</p>
            <p>Sample project. Requires Git.</p>
        </div>
    </a>
</div>

Already use agents? Skip the sample projects and follow the [experienced-agent fast track](#experienced-agent-fast-track). If you want AI help without delegating changes, [choose a lighter-weight AI feature](/docs/agents/reference/ai-features-cheat-sheet.md#choose-a-feature).

Or jump to a task:

* [Work on a project](#work-on-a-project).
* [Test and validate](#test-and-validate).
* [Customize and coordinate agents](#customize-and-coordinate-agents).
* [Improve results and recover](#improve-results-and-recover).

## Experienced-agent fast track

Use your own repository and follow the harness, interface, and prerequisites specified by the guide you choose. Keep its recommended session settings for the first task. A guide's tool names or customization files might need changes before you can use them with another harness.

1. [Open your repository as a workspace](/docs/getstarted/overview.md#open-your-code) so that files, source control, terminals, tests, and agents share the same project context.

1. Map your existing workflow to [VS Code sessions](/docs/agents/concepts/sessions.md). Check that your account and environment meet the chosen guide's [harness setup requirements](/docs/agents/run/agent-harnesses.md#requirements-and-setup).

1. Start with a bounded task in your own repository. [Explore the codebase](/docs/agents/guides/explore-a-codebase.md) without making changes, or [add a feature](/docs/agents/guides/add-a-feature.md) with your existing development environment and tests.

1. [Review and validate the code edits](/docs/agents/run/review-code-edits.md) before you integrate them.

After one real-project task, [adapt agents to your project](/docs/agents/guides/customize-copilot-guide.md) and [compare quality, reliability, and AI credit usage](/docs/agents/guides/optimize-usage.md). If you move between supported applications, learn how to [view sessions from other applications](/docs/agents/run/sessions/manage-sessions.md#view-sessions-from-other-applications).

On a managed device, your organization might control which agents and providers are available. Developers can review the [agent availability troubleshooting steps](/docs/agents/agent-troubleshooting/faq.md#agents-are-not-available-in-chat), and administrators can [manage AI settings](/docs/enterprise/manage-ai-settings.md). For keyboard, screen reader, and low-vision workflows, use the [Accessible View and other accessibility features](/docs/configure/accessibility/accessibility.md#accessible-view).

## Match a guide to your setup

Before starting a guide, check:

* **Project:** Does it create a sample project, or require your own repository with working build and test commands?

* **Harness:** Does it use your selected harness's tools and customization formats? Choosing the same language model doesn't make those formats interchangeable.

* **Interface:** Which steps use the Chat view or the Agents window?

Both interfaces run agents. The Chat view emphasizes collaboration over code in the current workspace; the Agents window emphasizes multi-project orchestration and higher-level task assignment. Follow the guide's chosen interface for its walkthrough. See [Run agents](/docs/agents/run/overview.md) to compare approaches.

## Work on a project

* [Explore a codebase](/docs/agents/guides/explore-a-codebase.md): trace a behavior without editing files and verify explanations against source references. **Use your own repository with Copilot in the Chat view.**

* [Add a feature](/docs/agents/guides/add-a-feature.md): research, plan, implement, and verify a bounded change. **Use your own repository with a working development environment and tests, and Copilot in the Chat view.**

* [Fix an API bug](/docs/agents/guides/fix-a-bug-with-agents.md): reproduce a pagination bug, add a regression test, and review the fix. **Sample project. Requires Node.js 22 or later and Git.**

* [Refactor safely](/docs/agents/guides/refactor-safely.md): change code structure in reviewable steps while preserving behavior and checking existing callers. **Use your own repository with Copilot in the Chat view.**

* [Work with Jupyter notebooks](/docs/agents/guides/notebooks-with-ai.md): create or edit a notebook, run cells, and review analysis results. **Use your own data. Requires the Jupyter extension and a notebook kernel.**

## Test and validate

* [Add tests to existing code](/docs/agents/guides/test-code-with-ai.md): generate tests for a function or module, run them, and review assertions, failures, and coverage. **Use your own project with Copilot in the Chat view.**

* [Validate a web app with browser tools](/docs/agents/guides/browser-agent-testing-guide.md): build a calculator app and check it against observable acceptance criteria. **Sample web app.**

* [Set up test-driven development](/docs/agents/guides/test-driven-development-guide.md): create custom agents and instructions for a repeatable test-first workflow. **Use your own repository with working tests and the Local harness in the Chat view.**

## Customize and coordinate agents

* [Adapt agents to your project](/docs/agents/guides/customize-copilot-guide.md): share project instructions with your team, then add skills or specialized agents where needed. **Use your own repository.**

* [Set up a context engineering workflow](/docs/agents/guides/context-engineering-guide.md): curate project context and connect planning to implementation with instructions, custom agents, and prompt files. **Use your own repository and the Local harness in the Chat view.**

* [Run independent tasks in parallel](/docs/agents/guides/delegate-two-tasks.md): work in separate Git worktrees, review each result, then integrate and retest the changes. **Use your own Git repository with Copilot in the Agents window, after completing a single agent task.**

## Improve results and recover

* [Get an agent back on track](/docs/agents/guides/get-agent-back-on-track.md): choose whether to steer a request, recover unwanted changes, or reset conversation context.

* [Reduce AI credit usage](/docs/agents/guides/optimize-usage.md): compare model costs and results, focus context, and scope tools to reduce unnecessary usage.

* [Find prompt examples](/docs/agents/guides/prompt-examples.md): adapt prompts for exploring code, building features, debugging, and testing.

## Background and help

* [How agents work](/docs/agents/concepts/agents.md): understand the agent loop and the role of models, context, and tools.

* [Best practices for using AI](/docs/agents/best-practices.md): scope tasks, provide relevant context, and verify results.

* [Troubleshoot AI features](/docs/agents/agent-troubleshooting/troubleshooting.md): diagnose setup, sign-in, connection, and other technical issues.
