所有節目›AI Engineer Europe 2026| World's Fair 2026完整場次線上軌AI in HealthcareSoftware Factories
Cooking with Agents in VS Code在 YouTube 看這一場

AI Engineer Europe 2026 · 演講 · 2026-05-21 · 17 分

在 VS Code 同時指揮三種 agent

Cooking with Agents in VS Code · Liam Hampton,Microsoft

Liam Hampton 示範在 VS Code 同時跑 local、background、cloud 三種 Copilot agent,說明各自適合的工作。

其他:產品與研究介紹看原片 ↗

概要

  • 別指望一次 promptLiam 說仍有開發者以為一次 prompt 就能做出完整應用,企業端則在問 ROI 與生產力,所以要留意 token 花費。
  • 三種 agent 各有位置local agent 在 VS Code 裡、有人在迴圈中;background agent 用 Copilot CLI 與 git worktree 隔離;cloud agent 可擴展到組織之外。
  • 一份程式碼三個 agent測試交給 local agent,前端 UI 交給 background agent,文件交給 cloud agent,三者同時進行。
  • cloud agent 有安全限制跑在 GitHub Actions 的隔離環境,有網路防火牆,也不能直接推到 main 分支。
  • 客製化集中管理custom instructions、custom agents、prompt files、skills、hooks 與 MCP server 都能在 VS Code 的同一個面板設定。
  • Awesome CopilotLiam 推薦這個開源專案,並說內容也能改給其他 AI 工具用。

原話

  • “We need to be careful about token spend.”

    我們得小心 token 花費

    ▶ 01:29
  • “I hate documentation. I don't like writing it.”

    我討厭文件,不喜歡寫它

    ▶ 04:38
  • “one code base three problems three separate agents”

    一份程式碼、三個問題、三個各自獨立的 agent

    ▶ 11:04
  • “It also doesn't have access to your main branch”

    它也碰不到你的 main 分支

    ▶ 12:22
  • “There's always like a new thing that's coming on every single week now.”

    現在每個禮拜都有新東西冒出來;講到 agent skills 時說的

    ▶ 13:10

延伸

  • 談 token 花費時,Liam 舉了一個前一天在 LinkedIn 看到的爆紅 repo:讓 chatbot 用海盜腔回話來省 token。這個例子說明,大家正用各種有趣的辦法壓低 token 開銷。
  • autopilot 目前是預覽功能,agent 呼叫工具前不會一直詢問;Liam 在 demo 裡用它跑 background agent,但提醒別濫用。

章節

點時碼直接跳到原片的那一段。

  1. 開場Liam 在大會最後一天開講,先舉手問誰用 GitHub Copilot、誰在 VS Code 裡用,並說這場講的做法不限於 Copilot。
  2. 別指望一次 promptLiam 看到開發者仍以為一次 prompt 就能做出整個應用;企業端則在問 ROI 與生產力,所以要留意 token 花費。
  3. 三種 agentlocal agent 在 VS Code 裡、有人在迴圈中;background agent 用 Copilot CLI 與 git worktree 隔離;cloud agent 可擴展到組織之外。
  4. 各自適合的工作Liam 自己用 local agent 寫測試、background agent 做前端 UI、cloud agent 寫文件,並把 VS Code 定位成這些 agent 的單一入口。
  5. Demo:簡單的 Python 應用影片從一個只有新增、讀取、更新、刪除的商品店 Python 應用開始,目標是替它做前端 UI。
  6. background agent 做前端用 CLI background agent 加 autopilot 規劃並動工,並要求它在開 pull request 前先暫停讓 Liam 本機測試。
  7. cloud agent 補開源文件另開一個 chat 啟動 cloud agent,請它把這個 repo 補成對開源友善,加上 readme 與貢獻指南等檔案。
  8. local agent 寫測試用 repo 裡的自訂 agent 與 Claude Opus 4.6(中等推理)開 local agent 寫單元測試,再請它改錯誤處理並更新測試。
  9. 回頭驗收前端Liam 回頭檢查 background agent 的成果,指出它給的測試方式不對,進 git worktree 的資料夾執行後看到新介面。
  10. 一份程式碼三個 agent三個問題由三個 agent 同時處理:要親手參與的測試給 local,大而耗時的前端給 background,文件給 cloud。
  11. cloud agent 怎麼運作跑在 GitHub Actions 的隔離環境,可用 GitHub MCP server 與 Playwright MCP server,有網路防火牆,也碰不到 main 分支。
  12. 各種客製化手段custom instructions、custom agents、prompt files、agent skills,Liam 說這些概念在不同 AI agent 之間都通用。
  13. VS Code 的客製化面板在 Copilot chat 的設定裡,agents、skills、instructions、prompts、hooks、MCP server 集中在同一處管理,也支援 Claude。
  14. Awesome Copilot 與 MCP介紹開源專案 Awesome Copilot 與對應的 MCP server,並說明 MCP 如何讓 LLM 連到 Azure、GCP、AWS 等資源。
  15. 收尾VS Code 是 AI agent 的單一入口,有第三方與第一方 plugin、完整的 MCP 規格支援,也能連上 Copilot CLI sessions。

名詞

GitHub Copilot
這場主要示範的 AI 程式助理,Liam 說這些做法也適用其他 AI agent
local agent
在 VS Code 裡跑、與開發者並肩互動、有人在迴圈中的 agent
background agent
透過 GitHub Copilot CLI 執行、以 git worktree 隔離的 agent
cloud agent
跑在 GitHub Actions 隔離環境、可擴展到組織之外的 agent,Liam 主要拿來寫文件
git worktree
對應到工作區內獨立資料夾的 branch,background agent 在裡面工作
autopilot
預覽中的模式,agent 呼叫工具時不會一直詢問
custom agent
針對特定問題(如寫測試)設定的專用 agent
agent skills
Liam 形容為 AGENTS.md 的較新版本
MCP
Model Context Protocol,讓 LLM 連到 Azure、GCP、AWS 或 Playwright 等外部資源
Awesome Copilot
Liam 這邊經營的開源專案,收集 Copilot 的客製化設定,也有對應的 MCP server,內容也能改給其他 AI 工具用

相關影片 同在「其他:產品與研究介紹」