GitHub Copilot SDK Prerequisites: Runtime Requirements and Installation Guide

To use the GitHub Copilot SDK, you must install the GitHub Copilot CLI and use a supported runtime version (Node.js 20+, Python 3.11+, Go 1.24+, Rust 1.94+, Java 17+, or .NET 8.0).

The GitHub Copilot SDK (github/copilot-sdk) provides language-specific client libraries that wrap the GitHub Copilot CLI, enabling you to integrate AI capabilities into your applications via JSON-RPC transport. Before instantiating the CopilotClient class found in go/client.go or creating a conversational Session as defined in go/session.go, your environment must satisfy specific CLI and runtime dependencies documented in the repository's docs/getting-started.md.

Core Prerequisites

GitHub Copilot CLI Installation

The SDK is a thin wrapper around the GitHub Copilot CLI, which handles the underlying JSON-RPC transport and protocol negotiation. Verify your CLI installation by running:

copilot --version

This should output a version number such as 1.123.0. While the SDKs for Node.js, Python, and .NET bundle the CLI automatically, other languages require manual installation or verification that the binary exists in your system path.

Minimum Runtime Versions

Each language binding requires a specific minimum runtime version to support the async/await patterns, type systems, and JSON-RPC transport used by the SDK:

  • Node.js / TypeScript: Version 20 or higher
  • Python: Version 3.11 or higher
  • Go: Version 1.24 or higher
  • Rust: Version 1.94 or higher (with Tokio async runtime)
  • Java: Version 17 or higher
  • .NET: Version 8.0 or higher

Attempting to run the SDK on older versions will result in compatibility errors when initializing the CopilotClient or processing streaming responses via the event system defined in go/session.go.

Language-Specific Installation

After confirming your runtime meets the minimum requirements, install the SDK package for your language using the appropriate package manager.

Node.js / TypeScript

npm init -y
npm install @github/copilot-sdk tsx

The SDK is implemented in TypeScript with type definitions included. The CopilotClient class manages the bundled CLI process and handles JSON-RPC transport as specified in the source at nodejs/src/client.ts (mirroring the Go implementation in go/client.go).

Python

pip install github-copilot-sdk

The Python SDK requires Python 3.11+ for proper async/await support with the CopilotClient class defined in python/copilot/client.py and the Session management in python/copilot/session.py.

Go

go get github.com/github/copilot-sdk/go

The Go implementation requires version 1.24+ and provides the core architectural patterns used by other language bindings. Key source files include go/client.go for CLI process management and go/session.go for streaming and tool invocation.

Rust

cargo add github-copilot-sdk --features derive

Requires Rust 1.94+. The Rust SDK uses derive macros for tool definitions (see rust/src/tool.rs) and async/await patterns compatible with Tokio.

.NET

dotnet add package GitHub.Copilot.SDK

Requires .NET 8.0 or higher. The CopilotClient class in dotnet/CopilotSDK/Client.cs manages the CLI process, while dotnet/CopilotSDK/Session.cs handles streaming and tool registration.

Java

Add to your Maven pom.xml or Gradle configuration:

<dependency>
    <groupId>com.github</groupId>
    <artifactId>copilot-sdk-java</artifactId>
    <version>${copilot.sdk.version}</version>
</dependency>

Requires Java 17+. The Client.java class in java/src/main/java/com/github/copilot/sdk/ handles CLI connection and handshaking.

Verify Your Installation

Confirm your prerequisites are met by creating a minimal session that instantiates the CopilotClient and sends a test prompt. This verifies that both the CLI is accessible and your runtime supports the SDK's async patterns.

Node.js example (save as verify.js):

import { CopilotClient } from "@github/copilot-sdk";

const client = new CopilotClient();
const session = await client.createSession({ model: "gpt-4.1" });
const response = await session.sendAndWait({ prompt: "What is 2 + 2?" });
console.log(response?.data.content);
await client.stop();

Run with node verify.js. If this executes without errors and returns a result, your GitHub Copilot SDK prerequisites are satisfied.

Summary

  • Install the GitHub Copilot CLI and verify with copilot --version (bundled automatically for Node.js, Python, and .NET SDKs).
  • Use supported runtime versions: Node 20+, Python 3.11+, Go 1.24+, Rust 1.94+, Java 17+, or .NET 8.0.
  • Install via package managers: npm install @github/copilot-sdk, pip install github-copilot-sdk, go get github.com/github/copilot-sdk/go, etc.
  • Verify setup by creating a CopilotClient instance and establishing a Session to ensure JSON-RPC transport functions correctly.

Frequently Asked Questions

Do I need to manually install the GitHub Copilot CLI?

For most languages, yes. While the Node.js, Python, and .NET SDKs bundle the CLI automatically, you should verify installation using copilot --version. For Go, Rust, and Java, you must ensure the CLI binary is installed and available in your system path before initializing the CopilotClient.

Can I use the SDK with older runtime versions?

No. The SDK relies on modern language features for JSON-RPC transport and async handling. You must use Node.js 20+, Python 3.11+, Go 1.24+, Rust 1.94+, Java 17+, or .NET 8.0. Older versions will fail when attempting to process streaming responses or tool invocations defined in go/toolset.go and python/copilot/tools.py.

What components are available once prerequisites are met?

After installation, you gain access to the CopilotClient (CLI process management in go/client.go), Session (conversational context in go/session.go), Tool definitions (JSON-schema handlers in go/toolset.go), and the event system for streaming responses via Session.on handlers.

Is internet connectivity required after installing the prerequisites?

Yes. The SDK communicates with GitHub's Copilot API endpoints through the CLI binary. While the initial installation and CLI verification work offline, sending prompts via session.sendAndWait() or session.send_and_wait() requires an active internet connection to reach the language models.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →