The GitHub Copilot SDK embeds the Copilot CLI agent runtime programmatically in your own applications and services. The official Node.js installation is npm install @github/copilot-sdk. The SDK communicates with Copilot CLI over JSON-RPC.
Understand the architecture
Your application creates an SDK client and a session. Copilot CLI runs the agent loop, selects tools and processes their results; the SDK passes events and control options to your application. A session can configure custom tools, a system message, the working directory, authentication and a permission handler.
GitHub publishes SDKs for Node.js/TypeScript, Python, Go, .NET, Java and Rust. For the Node.js, Python and .NET SDKs, the CLI runtime is provided with the package; other languages may need an installation or a reachable CLI process. Setup requirements, compatible CLI versions and the current API are described in the README and documentation for each language.
Start with permissions
The SDK's permission handler is a security boundary: it decides on protected actions such as writing files and running shell commands. Define narrowly scoped tools and ask for approval before sensitive actions. Choose authentication to suit the deployment: interactive sign-in, organisation installation tokens and your own provider keys have different requirements.
Sources: official GitHub Copilot SDK, Node.js/TypeScript SDK README, GitHub Docs: SDK setup, GitHub Docs: compatibility.

