Skip to content

Copilot SDK

SDK for embedding GitHub Copilot's agent runtime into your own apps, in several languages.

Stars
10.6k
Forks
1.5k
Licence
MIT
Language
Java
Last update
5 days ago
Type
Library

What it is

The Copilot SDK lets developers call the same agent engine that powers Copilot CLI from their own code. You define the agent's behavior, and Copilot handles planning, tool calls, and file edits. The README says it is available for Python, TypeScript/Node.js, Go, .NET, Java, and Rust, and that all SDKs talk to a Copilot CLI server over JSON-RPC.

  • Embed an agent in a service that edits files or runs tools on a user's behalf
  • Call Copilot programmatically from a Node.js, Python, or .NET application
  • Build a custom agent workflow where you define behavior and Copilot does planning and tool use

Great for

  • Developers who want to add agent features to an existing app or service
  • Teams building in one of the listed languages (Node.js/TypeScript, Python, Go, .NET, Java, Rust)
  • Projects that want to avoid writing their own agent orchestration from scratch

Not ideal for

  • People who only want to use Copilot interactively; the Copilot CLI or IDE tools fit that better
  • Users without a GitHub Copilot subscription who do not plan to use BYOK, since the README says a subscription is required unless BYOK is used
  • Languages outside the six listed SDKs
Step-by-step guide: how to use Copilot SDKInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Copilot CLI (bundled automatically for Node.js, Python, and .NET; install manually for Go, Java, and Rust)

    Node.js / TypeScript

    npm install @github/copilot-sdk

    Python

    pip install github-copilot-sdk

    .NET

    dotnet add package GitHub.Copilot.SDK

    Go

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

    Run it

    • Install the Copilot CLI if your SDK does not bundle it
    • Install the SDK for your language using the commands in the README
    • Open the Getting Started Guide in docs/getting-started.md
    • Follow the usage examples in the SDK-specific README
  3. 3

    Get the most out of it

    • Use the cookbook links in the README for per-language examples
    • Run the CLI in server mode and connect to it externally if you need more control, as described in the Getting Started Guide
    • Use BYOK with your own LLM provider API keys if you do not want GitHub authentication
    • Check the API docs links for each SDK for the full reference

Downloads

Strengths

  • Official SDKs for six languages, with package installs listed for each in the README
  • Built on the same engine as Copilot CLI, per the README
  • MIT licensed

Trade-offs

  • The README says a GitHub Copilot subscription is required unless you use BYOK
  • For Go, Java, and Rust the Copilot CLI must be installed separately or available on PATH
  • The README is in transition: it notes the project is becoming Microsoft Copilot SDK and some names may still say GitHub

How it compares

ProjectStarsTypeLevelUpdatedBest for
copilot-sdk (this)10.6kLibraryintermediate5 days agoDevelopers who want to add agent features to an existing app or service
langchain149kFrameworkintermediate4 days agoPython developers building LLM-powered applications
semantic-kernel28.7kLibraryintermediate4 days agoDevelopers already using Azure OpenAI or OpenAI who want a structured SDK for agents

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.