
40 languages. One SDK. Agents for every app.
Trusted by 100,000+ developers globally and growing daily.
Embed Copilot's agentic workflows in your application - now available in public preview as a programmable SDK for 40 languages.
The GitHub Copilot SDK exposes the same engine behind Copilot CLI: a production-tested agent runtime you can invoke programmatically. No need to build your own orchestration - you define agent behavior, Copilot handles planning, tool invocation, file edits, and more.
⭐ If you find this SDK useful, star the repo! It helps others discover it and keeps us motivated to ship more.
| SDK | Location | Cookbook | Installation |
|---|---|---|---|
| .NET / C# | dotnet/ | Cookbook | dotnet add package CopilotSDK.Supercharged |
| Ada | ada/ | Cookbook | Alire |
| C | c/ | Cookbook | CMake |
| C++ | cpp/ | Cookbook | CMake |
| Clojure | clojure/ | Cookbook | net.clojars.jeremiahisaacson/copilot-sdk-supercharged |
| COBOL | cobol/ | Cookbook | GnuCOBOL |
| Crystal | crystal/ | Cookbook | shards install |
| D | dlang/ | Cookbook | dub add copilot |
| Dart | dart/ | Cookbook | pub |
| Delphi / Object Pascal | delphi/ | Cookbook | Boss / Manual |
| Elixir | elixir/ | Cookbook | {:copilot_sdk_supercharged, "~> 2.0"} |
| Erlang | erlang/ | Cookbook | Rebar3 |
| F# | fsharp/ | Cookbook | dotnet add package CopilotSDK.Supercharged.FSharp |
| Fortran | fortran/ | Cookbook | fpm |
| Go | go/ | Cookbook | go get github.com/microsoft/copilot-sdk/go/v2 |
| Groovy | groovy/ | Cookbook | Gradle |
| Haskell | haskell/ | Cookbook | Cabal |
| Java | java/ | Cookbook | io.github.jeremiahjordanisaacson:copilot-sdk-supercharged |
| Julia | julia/ | Cookbook | Pkg.add("CopilotSDK") |
| Kotlin | kotlin/ | Cookbook | Gradle |
| Lua | lua/ | Cookbook | luarocks install copilot-sdk-supercharged |
| MATLAB | matlab/ | Cookbook | addpath |
| Nim | nim/ | Cookbook | nimble install copilot_sdk |
| Node.js / TypeScript | nodejs/ | Cookbook | npm install copilot-sdk-supercharged |
| Objective-C | objc/ | Cookbook | CocoaPods / SPM |
| OCaml | ocaml/ | Cookbook | opam install copilot-sdk-supercharged |
| Perl | perl/ | Cookbook | CPAN |
| PHP | php/ | Cookbook | Composer |
| Python | python/ | Cookbook | pip install copilot-sdk-supercharged |
| R | r/ | Cookbook | CRAN |
| Ruby | ruby/ | Cookbook | gem install copilot-sdk-supercharged |
| Rust | rust/ | Cookbook | cargo add copilot-sdk-supercharged |
| Scala | scala/ | Cookbook | sbt |
| Shell / Bash | shell/ | Cookbook | Source |
| Solidity | solidity/ | Cookbook | npm install copilot-sdk-solidity |
| Swift | swift/ | Cookbook | Swift Package Manager |
| Tcl | tcl/ | Cookbook | package require copilot |
| V (Vlang) | vlang/ | Cookbook | v install copilot_sdk |
| Visual Basic | visualbasic/ | Cookbook | dotnet add package CopilotSDK.Supercharged.VB |
| Zig | zig/ | Cookbook | zig fetch |
See the individual SDK READMEs for usage examples and API reference. For architecture details, see MULTI_LANGUAGE_SDKS.md.
Major release: SDK protocol 4 and the Microsoft Copilot SDK 2.0 sync. Copilot CLI 1.0.113 and newer speak SDK protocol 4, which groups session options (inference, tools, permissions, events, and more) and rejects the flat payloads that v2.x SDKs send, so every v2.x SDK fails to start against a current CLI. v3.0.0 moves all 40 SDKs to protocol 4. See the CHANGELOG for the full list.
coding-agent or empty), runtime connections with in-process hosting by default, grouped client and session options, and named BYOK providers. These are breaking changes; follow the v2 breaking changes guide. Registry package names do not change (copilot-sdk-supercharged, CopilotSDK.Supercharged); the .NET namespace is now Microsoft.Copilot and the Go module path is github.com/microsoft/copilot-sdk/go/v2.tool.shell_output events, shell authentication prompts, a memory store callback, network proxy and authentication callbacks, Policy Helper failure details and recheck, and the permission-mode refusal reason.npm audit findings), a new core SDK test workflow, and E2E harnesses that use the Copilot CLI 1.0.113 npm loader.Coverage is enforced by scripts/verify-sdk-coverage.mjs, which now also checks that every additional SDK declares SDK protocol 4.
copilot-sdk-supercharged), a High-severity ReDoS fix in the Python code generator, OIDC trusted publishing for npm, PyPI, and pub.dev, and "Recent Features (v2.4 to v2.5)" sections in all 40 SDK READMEs.user_setting permission source, optional login on AccountLoginRequest, and Jackson 2.18.10 for the Java SDK.reasoningEffort: max with tool search, and Agent Factories argsSchema.sessionLimits).For a complete walkthrough, see the Getting Started Guide.
Quick steps:
The Node.js SDK installs its runtime through an optional @microsoft/copilot-sdk-<platform> package, and the .NET SDK downloads the CLI at build time, so no separate installation is required for them. For Python, Go, and the 36 additional SDKs, install the Copilot CLI 1.0.113 or newer (or point COPILOT_CLI_PATH at it); published Python packages can also download a pinned runtime with python -m copilot download-runtime --in-process.
Install your preferred SDK using the commands above.
See the SDK README for usage examples and API documentation.
All SDKs drive the Copilot agent runtime over JSON-RPC. The 36 additional SDKs host the runtime in the Copilot CLI, started as a child process in server mode (or attach to an external CLI server):
Your Application
↓
SDK Client
↓ JSON-RPC
Copilot CLI (server mode)
The SDK manages the CLI process lifecycle automatically. You can also connect to an external CLI server. See the Getting Started Guide for details on running the CLI in server mode.
The four core SDKs (Node.js, Python, Go, .NET) follow Microsoft Copilot SDK 2.0 and load the native Copilot runtime into your application by default. They carry the same JSON-RPC messages over an in-memory connection through a C ABI, so no CLI process is started:
Your Application
↓
SDK Client
↓ JSON-RPC (in memory, C ABI)
Native Copilot runtime
The SDK manages its runtime host, but the native library remains loaded for the application process lifetime. In-process hosting provides neither crash isolation nor a sandbox. See Run the Copilot runtime in process for requirements and v2 migration options.
You can also run the runtime outside your application process:
RuntimeConnection.forSpawnedStdio() or RuntimeConnection.forSpawnedTcp() in TypeScript and Java; each SDK has an equivalent). The SDK starts the runtime as a child process and manages its lifecycle. Use it when you need crash isolation or per-client process configuration.copilot-runtime --server yourself and attach to it over TCP with RuntimeConnection.forTcp(host, port). One multi-tenant runtime server can serve many SDK clients and concurrent sessions. See Connecting to a standalone runtime server.For form elicitation callbacks, the portable schema contract is an object form
with modeled properties and optional required fields (type: "object" on
the wire; an SDK may represent the object type implicitly). Applications that
support multiple SDK languages must use the modeled property definitions and
must not depend on additional schema metadata (such as a top-level title) or
on the insertion order of properties.
Node.js and Rust pass through the wire schema, including additional metadata and property order. Python, Go, .NET, and Java reconstruct the callback schema from the modeled fields and do not offer that same preservation guarantee. Treat wire-schema preservation as a language-specific capability, not a cross-language requirement.
Runtimes that grant skill-confirmed-installation expose
skills.planInstall, skills.applyInstall, skills.planUninstall,
skills.applyUninstall, skills.installations.list/recover/status/cancel,
and skills.installations.setEnabled. Skill install reviews include the full
verified SKILL.md content up to 256 KiB, catalogue identity, file manifest,
and non-absolute personal target location. Summaries report ownershipState,
configuredEnabled, sessionState, retained catalogue identity and
installedAt.
Yes, a GitHub Copilot subscription is required to use the Microsoft Copilot SDK, unless you are using BYOK (Bring Your Own Key). With BYOK, you can use the SDK without GitHub authentication by configuring your own API keys from supported LLM providers. For standard usage (non-BYOK), refer to the GitHub Copilot pricing page, which includes a free tier with limited usage.
Billing for the GitHub Copilot SDK is based on the same model as the Copilot CLI, with each prompt being counted towards your premium request quota. For more information on premium requests, see Requests in GitHub Copilot.
Yes, the GitHub Copilot SDK supports BYOK (Bring Your Own Key). You can configure the SDK to use your own API keys from supported LLM providers (e.g. OpenAI, Azure AI Foundry, Anthropic) to access models through those providers. See the BYOK documentation for setup instructions and examples.
Note: BYOK uses key-based authentication only. Microsoft Entra ID (Azure AD), managed identities, and third-party identity providers are not supported.
The SDK supports multiple authentication methods:
copilot CLI loginCOPILOT_GITHUB_TOKEN, GH_TOKEN, GITHUB_TOKENSee the Authentication documentation for details on each method.
It depends on the SDK. The core SDKs need a compatible native runtime rather than a separately running CLI: the Node.js SDK installs it through an optional platform package, the .NET SDK downloads it at build time, published Python packages download a pinned runtime on demand, and Go needs application-level bundling (see the Go README) or an explicit runtime path. The 36 additional SDKs start the Copilot CLI as a child process, so install the Copilot CLI 1.0.113 or newer, or set COPILOT_CLI_PATH.
Advanced: every SDK can attach to an external runtime or CLI server over TCP instead (for example RuntimeConnection.forTcp(host, port) in the core TypeScript SDK; see each SDK's README for its option).
By default, the SDK will operate the Copilot CLI in the equivalent of --allow-all being passed to the CLI, enabling all first-party tools, which means that the agents can perform a wide range of actions, including file system operations, Git operations, and web requests. You can customize tool availability by configuring the SDK client options to enable and disable specific tools. Refer to the individual SDK documentation for details on tool configuration and Copilot CLI for the list of tools available.
Yes, the Microsoft Copilot SDK allows you to define custom agents, skills, and tools. You can extend the functionality of the agents by implementing your own logic and integrating additional tools as needed. Refer to the SDK documentation of your preferred language for more details.
Yes, check out the custom instructions for each SDK:
All models available via Copilot CLI are supported in the SDK. The SDK also exposes a method which will return the models available so they can be accessed at runtime.
The GitHub Copilot SDK is currently in Public Preview. While it is functional and can be used for development and testing, it may not yet be suitable for production use.
Please use the GitHub Issues page to report bugs or request new features. We welcome your feedback to help improve the SDK.
MIT
Can you improve this documentation? These fine people already did:
Jeremiah Isaacson, copilot-cli-release-app[bot], Patrick Nikoletich, Bruno Borges, Copilot, Stephen Toub, Scott Addie, Aaron Powell, Ashley Wolf, Ed Burns, copilot-sdk-mirror-writer[bot], Sanzo, Karl Krukow, mohamed_amine_hamdi, Quim Muntal, kirankashyap, coleflennikenmsft, Adrien Friggeri, Steve Sanderson, Rob Emanuele & Andy FellerEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |