Now available in technical preview on GitHub, the GitHub Copilot SDK lets developers embed the same engine that powers GitHub Copilot CLI into their own apps, making it easier to build agentic workflows.
This makes it possible to integrate Copilot into any environment. You can build GUIs that use AI workflows, create personal tools that level up your productivity, or run custom internal agents in your enterprise workflows.
Programmatic access to GitHub Copilot CLI's agentic engine means developers can leverage core components needed to build agentic workflows, including a planner, a tool loop, and a runtime, instead of coding them from scratch. The SDK also exposes other useful GitHub Copilot CLI's features, such as support for multiple AI models, custom tool definitions, MCP server integration, GitHub authentication, and real-time streaming.
Microsoft senior software engineer Dmytro Struk listed several reasons to use the Copilot SDK in combination with Microsoft's Agent Framework. These include a consistent agent abstraction that makes it possible to swap providers or combine them without restructuring your code, support for multi-agent workflows using built-in orchestrators and ecosystem integration, which provides developers with access to declarative agent definitions, A2A support, and more.
Struk also describes a multi-agent workflow where an Azure OpenAI agent drafts a marketing tagline and a GitHub Copilot agent reviews it, orchestrated in a sequential pipeline.
The following snippet shows how you can tap into the Copilot SDK using TypeScript:
import { CopilotClient } from "@github/copilot-sdk";
const client = new CopilotClient();
await client.start();
const session = await client.createSession({
model: "gpt-5",
});
await session.send({ prompt: "Hello, world!" });
Some examples of apps GitHub engineers created using the Copilot SDK include YouTube chapter generators, custom GUIs, summarizing tools, and more.
The SDK uses JSON-RPC to communicate with the GitHub Copilot CLI, which must be installed separately, and it manages the CLI's process lifecycle automatically. The SDK requires either a GitHub Copilot subscription or a key from a supported LLM provider, including OpenAI, Azure AI Foundry, and Anthropic.
By default, the GitHub Copilot SDK enables all first-party tools provided by the Copilot CLI, including file system operations, Git operations, and web requests. It allows developers to define custom agents, skills, and tools, extending the range of supported capabilities.
The SDK initially supports Node.js, Python, Go, and .NET. The Copilot community has also created unofficial SDKs for other languages, including Java, Rust, and C++.