The GitHub Copilot SDK embeds the agent runtime behind Copilot CLI into your own application. You define the agent's behavior, and the runtime handles planning, tool invocation, file edits, and the rest of the agent loop, so there is no orchestration layer to write yourself.
SDKs are published for Node.js/TypeScript, Python, Go, .NET, Rust, and Java. Each one talks to the Copilot CLI running in server mode over JSON-RPC and manages that process's lifecycle; for Node.js, Python, and .NET the CLI is bundled as a dependency, while Go, Java, and Rust expect a copilot binary on the path or an application-level bundling step. An SDK can also connect to an external CLI server.
Authentication accepts a GitHub signed-in user (stored OAuth credentials from the CLI), user tokens from a GitHub OAuth app, environment variables such as COPILOTGITHUBTOKEN, or bring-your-own-key access to providers such as OpenAI, Microsoft Foundry, and Anthropic. Standard use requires a Copilot subscription and counts each prompt toward its usage allowance; BYOK needs no GitHub authentication but is key-based only. Every model available through Copilot CLI is available through the SDK, and a runtime method lists them. The SDK is generally available and follows semantic versioning.
Features
- Six language SDKs: Node.js/TypeScript, Python, Go, .NET, Rust, and Java, with community-maintained Clojure and C++ ports
- Copilot CLI engine: the same agent runtime as the CLI, invoked programmatically over JSON-RPC in server mode
- Managed CLI process: bundled CLI for Node.js, Python, and .NET; external or path-resolved binary for Go, Java, and Rust
- Built-in tools with permission control: the CLI's first-party tools are enabled by default, and a per-SDK permission handler approves, denies, or customizes each call
- Custom agents, skills, and tools: extend the runtime with your own logic and integrations
- Multiple auth paths: CLI login credentials, GitHub OAuth app tokens, environment variables, or BYOK
- Model listing: a runtime call returns the models currently available
- Hooks and MCP: documented feature set covers hooks, custom agents, MCP, and skills