agents-tutorial

A step-by-step tutorial for using several kinds of coding agents in Visual Studio Code while building a simple to-do app.

In plain words
What is it for?
Use it to build and redesign a to-do app, preview changes, and learn how local, planning, background, command-line, and cloud agents can share work.
Why use it?
It shows how these agents differ and when to use each one, so you can choose the right way to get coding work done.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/feimacode/feima-copilot-llms-extension/agents-tutorial
Clone the repo
git clone --depth 1 https://github.com/feimacode/feima-copilot-llms-extension
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,259 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00039 $0.02259
Opus 5 $0.00019 $0.01130
Sonnet 5 $0.00008 $0.00452
Haiku 4.5 $0.00004 $0.00226

Measured 2d ago against content hash 586dce0ba031, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agents-tutorial scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/src/content/docs/zh/vscode-copilot/agents/agents-tutorial.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

本教程带你了解如何在 Visual Studio Code 中使用不同类型的智能体(Agent)。你将从头构建一个待办应用,添加主题切换,并通过在本地、Plan、后台和云端智能体(Cloud Agent)之间分配工作来重新设计布局。

提示 如果你还没有 Copilot 订阅,可以注册 Copilot 免费计划,每月可享有一定数量的内联建议(Inline Suggestion)和聊天交互额度,免费使用 Copilot。

前提条件

完成本教程需要:

💡 国内用户替代方案 除了 GitHub Copilot 官方订阅,您也可以使用 飞码扣插件 — 在 GitHub Copilot Chat 中直接使用通义千问(Qwen3)、DeepSeek V3.2、GLM-5 等国内顶级 AI 模型,按次计费,无需月付订阅。立即开始 → 打开飞码扣

第一步:使用本地智能体(Local Agent)搭建应用框架

在这一步,你将使用本地智能体(Local Agent)创建初始待办应用结构。本地智能体(Local Agent)非常适合需要即时反馈的交互式任务,例如搭建新项目框架或迭代新功能。

  1. 新建项目文件夹并确保其处于 Git 版本控制下。

    mkdir todo-app
    cd todo-app
    git init
    
  2. 在 VS Code 中打开项目文件夹。

  3. 打开聊天视图(⌃⌘I / Windows、Linux:Ctrl+Alt+I),从智能体(Agent)下拉菜单选择 Agent

    重要提示 如果没有看到智能体(Agent)选项,请确保在 VS Code 设置中启用了智能体(chat.agent.enabled)。你的组织也可能禁用了智能体(Agent)——请联系管理员启用。

  4. 在聊天输入框中输入以下提示并选择发送,来搭建待办应用框架。

    创建一个简单的待办应用,包含 HTML、CSS 和 JavaScript。包括添加待办事项的输入框、显示待办列表,以及每项的删除按钮。
    
  5. 审查智能体(Agent)生成的不同文件。根据需要使用 KeepUndo 接受或拒绝变更。

  6. 可以在集成浏览器中预览变更。

    • 通过配置 workbench.browser.openLocalhostLinks 来为 localhost URL 启用集成浏览器。

    • 打开 index.html 文件并选择预览按钮。

      编辑器右上角预览按钮截图(打开 HTML 文件时可见)。

      注意 如果没有看到预览按钮,请确保已安装 Live Preview 扩展。

  7. 发送更多提示进一步增强应用。注意在你进行修改时预览会实时更新。

    例如,可以要求:

    用删除线效果将待办事项标记为已完成。
    

Read the full file on GitHub · 146 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 146 lines · 39 tokens per session scan A 586dce0ba031

Subscribe to this mod's changes

agents-tutorial is an agent published in the GitHub repository feimacode/feima-copilot-llms-extension (5 stars, last pushed 6d ago), licensed MIT. It adds 39 tokens to every session and 2,259 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.