explaingit

github/copilot-sdk

8,659RustAudience · developerComplexity · 3/5Setup · moderate

TLDR

An official GitHub SDK that lets you embed Copilot's AI agent, planning, tool use, and file editing, directly into your own Python, Node.js, Go.NET, Java, or Rust application without building an agent engine from scratch.

Mindmap

mindmap
  root((copilot-sdk))
    What it does
      Embeds Copilot agent
      Planning and tool use
      File editing
    Languages
      Python and Node
      Go and Java
      Rust preview
    Auth options
      GitHub subscription
      OAuth token
      Bring your own key
    Providers
      OpenAI
      Anthropic
      Azure
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add an AI agent to your Python app that can plan and execute multi-step coding tasks using GitHub Copilot's engine.

USE CASE 2

Build a Node.js tool that calls Copilot to make file edits programmatically from high-level plain-English instructions.

USE CASE 3

Use a bring-your-own-key setup with an Anthropic or OpenAI API key so you don't need a GitHub Copilot subscription.

Tech stack

PythonTypeScriptGo.NETJavaRustJSON-RPC

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a GitHub Copilot subscription or your own API key from OpenAI, Anthropic, or Azure.

In plain English

The GitHub Copilot SDK is a set of libraries that lets developers embed GitHub Copilot's AI agent capabilities directly into their own applications. Rather than building a custom AI agent from scratch, you use this SDK to hook into the same planning and execution engine that powers the Copilot CLI tool, and call it programmatically from your code. The SDK is available for Python, Node.js and TypeScript, Go.NET, Java, and Rust (in technical preview). Each language has its own package installable through the standard package manager for that language, such as pip for Python or npm for Node.js. All of the SDK packages communicate with a Copilot CLI server process running locally, using a JSON-RPC protocol. The SDK handles starting and managing that process automatically for most languages. With the SDK, your application can describe agent behavior and then let Copilot handle the details of planning steps, invoking tools, making file edits, and so on. You define what the agent should do at a high level, the SDK and the underlying engine work out how to do it. Using the SDK requires a GitHub Copilot subscription for standard usage. There is also a bring-your-own-key option that lets you supply API keys from providers like OpenAI, Anthropic, or Azure instead of using GitHub authentication. Authentication can be handled through stored GitHub credentials, OAuth tokens, environment variables, or the bring-your-own-key path. The repository contains subdirectories for each language SDK, plus documentation for getting started, authentication setup, and connecting to an external CLI server if needed.

Copy-paste prompts

Prompt 1
I want to build a Python app that uses the GitHub Copilot SDK to run an AI agent that edits files. Show me a minimal working example.
Prompt 2
How do I authenticate to the Copilot SDK using an OAuth token in Node.js and start a session with a simple agent task?
Prompt 3
I want to use the Copilot SDK with my own Anthropic API key instead of GitHub auth. Show me the bring-your-own-key setup in TypeScript.
Open on GitHub → Explain another repo

← github on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.