Embed Copilot's autonomous execution engine in your applications
You can enable Copilot to plan, call tools, and modify files within your own services or apps. This interface allows you to programmatically invoke the same engine that powers the Copilot CLI. You do not need to build complex workflows manually; define the agent's behavior, and Copilot handles the rest of the execution.
Transitioning from GitHub to Microsoft
This repository is moving to the Microsoft organization and will be renamed to the Microsoft Copilot SDK. This is a phased transition toward a shared agent-based foundation for Microsoft and GitHub products. Existing package names, namespaces, and some documentation may still refer to the GitHub Copilot SDK. There are no immediate changes for current users, and support remains unchanged.
The same engine in six languages
You can invoke the same Copilot engine in Python, TypeScript, Go, .NET, Java, and Rust environments. Each language-specific SDK communicates with the Copilot CLI server via the JSON-RPC protocol, and the SDK automatically manages the CLI process lifecycle. You can also connect to an external CLI server. This structure allows you to apply the same agent workflow to various applications without being tied to a specific language.
What to check before starting
Using the SDK requires a GitHub Copilot subscription. However, with the BYOK (Bring Your Own Key) method, you can call models with your own API key without GitHub authentication. The Node.js, Python, and .NET SDKs bundle the CLI automatically, while the Go, Java, and Rust SDKs require you to install the CLI separately or include it in your PATH. Supported authentication methods include GitHub login, OAuth apps, environment variables, and BYOK. BYOK supports only key-based authentication and does not support Entra ID or managed IDs.
Tool control and custom extensions
By default, the primary tools of the Copilot CLI are enabled, and you can approve or deny tool calls through each SDK's permission handler. You can also adjust the availability of specific tools via configuration. Additionally, you can implement your own logic to define and extend custom agents, skills, and tools. This is useful for tailoring agent capabilities to your application's requirements.
Pre-deployment checks
This SDK is generally available (GA) and follows semantic versioning. You must check the installation commands and API references in the documentation for each specific language SDK; for Java, add the dependency using the Maven coordinate com.github:copilot-sdk-java. If using BYOK, you must configure keys for supported LLM providers (OpenAI, Microsoft Foundry, Anthropic, etc.). Community SDKs that are not officially supported (Clojure, C++) are used at your own risk. The license is MIT.