GitHub Copilot SDK Programming Languages: Complete Guide to All 6 Official SDKs
GitHub Copilot provides first-class SDKs for six programming languages—Node.js/TypeScript, Python, Go, .NET, Rust, and Java—each exposing the same agentic runtime via a JSON-RPC client that communicates with the Copilot CLI server.
The github/copilot-sdk repository maintains official GitHub Copilot SDK programming languages implementations that wrap the Copilot CLI with native language bindings. These six SDKs share a unified architecture while providing idiomatic APIs for their respective ecosystems, enabling developers to integrate Copilot’s planning, tool execution, and model inference capabilities into applications using familiar syntax.
Six Supported Programming Languages
GitHub Copilot offers dedicated SDKs for six programming languages, each located in its own directory within the repository:
- Node.js / TypeScript: Located in
nodejs/, installable vianpm install @github/copilot-sdk - Python: Located in
python/, installable viapip install github-copilot-sdk - Go: Located in
go/, installable viago get github.com/github/copilot-sdk/go - .NET: Located in
dotnet/, installable viadotnet add package GitHub.Copilot.SDK - Rust: Located in
rust/, installable viacargo add github-copilot-sdk - Java: Located in
java/, available via Mavencom.github:copilot-sdk-java
These languages are explicitly listed in the repository’s top-level README under the Available SDKs section, confirming first-class support for each runtime.
Shared JSON-RPC Architecture
Despite language differences, all GitHub Copilot SDK programming languages implementations follow an identical communication pattern. According to the source code, the architecture flows as:
Your App → SDK Client → JSON-RPC → Copilot CLI (server)
Each SDK client performs three core functions:
- Starts or connects to the Copilot CLI in server mode
- Marshals calls over JSON-RPC to the CLI process
- Receives events and responses back from the CLI
This design ensures that switching between supported languages does not require changes to the underlying Copilot workflow or capabilities.
Core Implementation Files by Language
The client logic for each GitHub Copilot SDK programming language resides in specific source files that handle JSON-RPC transport and high-level API exposure:
- Node.js / TypeScript:
nodejs/src/client.ts - Python:
python/copilot/client.py - Go:
go/client.go - .NET:
dotnet/src/Session.cs - Rust:
rust/src/client.rs - Java:
java/src/main/java/com/github/copilot/sdk/Client.java
These files contain the language-specific implementations that wrap the protocol definitions and manage the lifecycle of Copilot sessions.
Code Examples by Language
Below are minimal, runnable snippets demonstrating how each SDK creates a client, initializes a session, and sends a chat request.
Node.js / TypeScript
The TypeScript implementation in nodejs/src/client.ts provides an async/await interface:
import { CopilotClient } from "@github/copilot-sdk";
const client = new CopilotClient();
const session = await client.createSession();
const response = await session.chat({ content: "Explain the difference between const and let." });
console.log(response.message);
Python
The Python client in python/copilot/client.py exposes similar methods:
from copilot.client import CopilotClient
client = CopilotClient()
session = client.create_session()
msg = session.chat("Explain the difference between list and tuple.")
print(msg.message)
Go
The Go implementation in go/client.go uses context-aware functions:
import "github.com/github/copilot-sdk/go"
func main() {
client := copilot.NewClient()
sess, _ := client.CreateSession(context.Background())
resp, _ := sess.Chat(context.Background(), "Explain the difference between slices and arrays.")
fmt.Println(resp.Message)
}
.NET (C#)
The .NET SDK in dotnet/src/Session.cs provides async Task-based methods:
using GitHub.Copilot.SDK;
var client = new CopilotClient();
var session = await client.CreateSessionAsync();
var result = await session.ChatAsync("Explain the difference between async and await.");
Console.WriteLine(result.Message);
Rust
The Rust client in rust/src/client.rs uses Tokio for async runtime:
use github_copilot_sdk::client::CopilotClient;
#[tokio::main]
async fn main() {
let client = CopilotClient::new().await.unwrap();
let session = client.create_session().await.unwrap();
let response = session.chat("Explain the difference between Result and Option.").await.unwrap();
println!("{}", response.message);
}
Java
The Java implementation in java/src/main/java/com/github/copilot/sdk/Client.java uses synchronous blocking calls:
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.Session;
CopilotClient client = new CopilotClient();
Session session = client.createSession();
String reply = session.chat("Explain the difference between Stream and Iterable.");
System.out.println(reply);
Summary
- Six official SDKs: GitHub Copilot supports Node.js/TypeScript, Python, Go, .NET, Rust, and Java through dedicated repositories.
- Unified protocol: All SDKs communicate via JSON-RPC to a shared Copilot CLI server, ensuring consistent behavior across languages.
- Idiomatic APIs: Each implementation in
github/copilot-sdkprovides language-appropriate patterns—async/await for TypeScript, context for Go, Tokio for Rust—while maintaining identical core capabilities. - Source locations: Client logic resides in language-specific paths including
nodejs/src/client.ts,python/copilot/client.py, andjava/src/main/java/com/github/copilot/sdk/Client.java.
Frequently Asked Questions
Can I use the GitHub Copilot SDK with languages not officially listed?
No. The github/copilot-sdk repository only provides official client implementations for Node.js/TypeScript, Python, Go, .NET, Rust, and Java. While you could implement the JSON-RPC protocol manually for other languages, only these six have first-class support, documented APIs, and maintained client libraries in the official repository.
Do all six SDKs support the same Copilot features?
Yes. Because each SDK acts as a JSON-RPC client to the same Copilot CLI server, they expose identical agentic runtime capabilities. Whether you use the Python client in python/copilot/client.py or the Go client in go/client.go, you access the same planning, tool execution, and model inference features.
How do I install the GitHub Copilot SDK for my preferred language?
Installation commands vary by ecosystem:
- Node.js:
npm install @github/copilot-sdk - Python:
pip install github-copilot-sdk - Go:
go get github.com/github/copilot-sdk/go - .NET:
dotnet add package GitHub.Copilot.SDK - Rust:
cargo add github-copilot-sdk - Java: Add Maven dependency
com.github:copilot-sdk-java(see README for latest version).
Is the Java SDK asynchronous like the others?
No. According to the source in java/src/main/java/com/github/copilot/sdk/Client.java, the Java implementation provides synchronous blocking methods such as createSession() and chat(), unlike the async/await patterns found in TypeScript, Python, and Rust implementations.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →