Overview
Replace the current langchaingo-based agent orchestration framework with the GitHub Copilot SDK (github.com/github/copilot-sdk/go) for �zd agent mode.
Motivation
- Production agent runtime: Copilot SDK uses the same battle-tested engine powering Copilot CLI
- Built-in session management: Create, resume, destroy sessions; automatic conversation history
- Multi-model support: GPT-4, GPT-5, Claude via Copilot subscription without per-provider code
- Native MCP server loading: SDK supports MCPServerConfig natively with stdio and http transports
- Built-in tool permissions: PermissionHandler, PreToolUseHandler, AvailableTools/ExcludedTools
- Reduce maintenance: Remove ~2500 lines of custom orchestration, model providers, and consent system
- Agent modes: Built-in Autopilot, Interactive, Plan, Shell modes
Key Decisions
- Copilot subscription recommended for agent mode (no offline/Ollama fallback)
- langchaingo fully removed — no parallel path
- 13 of 24 built-in tools deprecated — Copilot CLI provides identical file I/O, search, and command execution
- Entire consent system replaced by SDK's PermissionHandler + PreToolUseHandler + AvailableTools/ExcludedTools
- azd config system (�i.agent.* keys) enables customization of model, MCP servers, tool control
- 11 azd-specific MCP guidance tools kept — served via �zd mcp start
Architecture
azd (Go application) → copilot.NewClient() → copilot-sdk/go (thin client) → (JSON-RPC over stdio) → copilot-agent-runtime → LLM APIs (GPT-4, GPT-5, Claude, etc.)
Migration Approach (3 Phases)
- Phase 1: Add SDK Foundation — New code alongside existing (no deletions)
- Phase 2: Update Call Sites — Switch to new implementation
- Phase 3: Remove Old Code — Delete unused langchaingo code
Each phase is independently landable as a PR.
Child Issues
See linked issues below for detailed work items per phase.
Overview
Replace the current langchaingo-based agent orchestration framework with the GitHub Copilot SDK (github.com/github/copilot-sdk/go) for �zd agent mode.
Motivation
Key Decisions
Architecture
azd (Go application) → copilot.NewClient() → copilot-sdk/go (thin client) → (JSON-RPC over stdio) → copilot-agent-runtime → LLM APIs (GPT-4, GPT-5, Claude, etc.)Migration Approach (3 Phases)
Each phase is independently landable as a PR.
Child Issues
See linked issues below for detailed work items per phase.