
GitHub Copilot SDK: Build Custom Sub-Agents in Python
Summary
Embed Copilot's agent runtime and route work to scoped sub-agents, with runnable Python.
On June 2, 2026 the GitHub Copilot SDK went generally available, and the headline feature has developers talking: custom sub-agents. The SDK takes the exact agent runtime that powers GitHub Copilot CLI (planning, the tool-use loop, multi-turn sessions, MCP, streaming) and exposes it as an embeddable library for Python, TypeScript, Go, .NET, and Java. You no longer wire your own planner, tool loop, and permission layer to ship an agent. You import one client and call it.
The piece worth learning right now is sub-agent orchestration. You attach a list of small, specialized agents to a session, each with its own system prompt and a restricted tool set. When a prompt matches an agent's described expertise, the runtime delegates to it as an isolated sub-agent and streams lifecycle events back to the parent. This is the same pattern teams have hand-built for two years, except here it is one config field and the routing is automatic.
Keep reading — it's free
Enter your email to keep reading — plus the best of AI & tech, daily. Free, forever.
Already a member? Sign in
Comments
Be the first to comment