Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

copilot-sdk

> 编程语言
Open source

Multi-platform SDK for integrating GitHub Copilot Agent into apps and services

10.2K stars0 likes3 views
WebsiteGitHub

About

Multi-platform SDK for integrating GitHub Copilot Agent into apps and services

GitHub Copilot CLI SDKs

Agents for every app.

Embed Copilot's agentic workflows in your application with the GitHub Copilot SDK for Python, TypeScript, Go, .NET, Java, and Rust.

The GitHub Copilot SDK exposes the same engine behind Copilot CLI: a production-tested agent runtime you can invoke programmatically. No need to build your own orchestration—you define agent behavior, Copilot handles planning, tool invocation, file edits, and more.

Available SDKs

SDK Location Cookbook Installation API docs
Node.js / TypeScript nodejs/ Cookbook npm install @github/copilot-sdk
Python python/ Cookbook pip install github-copilot-sdk
Go go/ Cookbook go get github.com/github/copilot-sdk/go API docs
.NET dotnet/ Cookbook dotnet add package GitHub.Copilot.SDK
Rust rust/ — cargo add github-copilot-sdk API docs
Java java/ Cookbook Maven coordinates
com.github:copilot-sdk-java
See instructions for Maven and Gradle
API docs

See the individual SDK READMEs for installation, usage examples, and API reference.

Getting Started

For a complete walkthrough, see the Getting Started Guide.

Quick steps:

  1. (Optional) Install the Copilot CLI

For Node.js, Python, and .NET SDKs, the Copilot CLI is bundled automatically and no separate installation is required. For Go, Java, and Rust, install the CLI manually or ensure copilot is available in your PATH. Go and Rust also expose application-level CLI bundling features.

  1. Install your preferred SDK using the commands above.

  2. See the SDK README for usage examples and API documentation.

Architecture

All SDKs communicate with the Copilot CLI server via JSON-RPC:

Your Application
       ↓
  SDK Client
       ↓ JSON-RPC
  Copilot CLI (server mode)

The SDK manages the CLI process lifecycle automatically. You can also connect to an external CLI server—see the Getting Started Guide for details on running the CLI in server mode.

FAQ

Do I need a GitHub Copilot subscription to use the SDK?

Yes, a GitHub Copilot subscription is required to use the GitHub Copilot SDK, unless you are using BYOK (Bring Your Own Key). With BYOK, you can use the SDK without GitHub authentication by configuring your own API keys from supported LLM providers. For standard usage (non-BYOK), refer to the GitHub Copilot pricing page, which includes a free tier with limited usage.

How does billing work for SDK usage?

Billing for the GitHub Copilot SDK is based on the same model as the Copilot CLI, with each prompt being counted towards your usage allowance. For more information on Copilot usage billing, see Usage in GitHub Copilot.

Does it support BYOK (Bring Your Own Key)?

Yes, the GitHub Copilot SDK supports BYOK (Bring Your Own Key). You can configure the SDK to use your own API keys from supported LLM providers (e.g. OpenAI, Microsoft Foundry, Anthropic) to access models through those providers. See the BYOK documentation for setup instructions and examples.

Note: BYOK uses key-based authentication only. Microsoft Entra ID (Azure AD), managed identities, and third-party identity providers are not supported.

What authentication methods are supported?

The SDK supports multiple authentication methods:

  • GitHub signed-in user - Uses stored OAuth credentials from copilot CLI login
  • OAuth GitHub App - Pass user tokens from your GitHub OAuth app
  • Environment variables - COPILOT_GITHUB_TOKEN, GH_TOKEN, GITHUB_TOKEN
  • BYOK - Use your own API keys (no GitHub auth required)

See the Authentication documentation for details on each method.

Do I need to install the Copilot CLI separately?

No — for Node.js, Python, and .NET SDKs, the Copilot CLI is bundled automatically as a dependency. You do not need to install it separately.

For Go, Java, and Rust SDKs, the CLI is not bundled by default. Install the CLI manually or ensure copilot is available in your PATH. Go and Rust also expose application-level CLI bundling features.

Advanced: You can override the CLI binary or connect to an external server. See the individual SDK README for language-specific options.

What tools are enabled by default?

By default, the SDK exposes the Copilot CLI's first-party tools, similar to running the CLI with --allow-all. Tool execution is still governed by each SDK's permission handler, so applications can approve, deny, or customize tool calls. You can customize tool availability by configuring the SDK client options to enable and disable specific tools. Refer to the individual SDK documentation for details on tool configuration and to the Copilot CLI documentation for the list of available tools.

Can I use custom agents, skills or tools?

Yes, the GitHub Copilot SDK allows you to define custom agents, skills, and tools. You can extend the functionality of the agents by implementing your own logic and integrating additional tools as needed. Refer to the SDK documentation of your preferred language for more details.

Are there instructions or SDK guidance for Copilot to speed up development?

Yes, check out the custom instructions and SDK-specific guidance:

  • Node.js / TypeScript
  • Python
  • .NET
  • Go
  • Rust (SDK guidance; custom instructions not yet published)
  • Java

What models are supported?

All models available via Copilot CLI are supported in the SDK. The SDK also exposes a method which will return the models available so they can be accessed at runtime.

Is the SDK production-ready?

The GitHub Copilot SDK is generally available and follows semantic versioning. See CHANGELOG.md for release notes.

How do I report issues or request features?

Please use the GitHub Issues page to report bugs or request new features. We welcome your feedback to help improve the SDK.

Quick Links

  • Documentation – Full documentation index
  • Getting Started – Tutorial to get up and running
  • Setup Guides – Architecture, deployment, and scaling
  • Authentication – GitHub OAuth, BYOK, and more
  • Features – Hooks, custom agents, MCP, skills, and more
  • Troubleshooting – Common issues and solutions
  • Cookbook – Practical recipes for common tasks across all languages
  • More Resources – Additional examples, tutorials, and community resources

Unofficial, Community-maintained SDKs

⚠️ Disclaimer: These are unofficial, community-driven SDKs and they are not supported by GitHub. Use at your own risk.

SDK Location
Clojure copilot-community-sdk/copilot-sdk-clojure
C++ 0xeb/copilot-sdk-cpp

Contributing

See CONTRIBUTING.md for contribution guidelines.

License

MIT

Issues· 339 open

View all issuesOpen on GitHub
  • #2790

    Feature Request: Enable dynamic agents with live system prompt updates via `session.systemMessage.set()`

    Updated Sep 29, 2026
  • #2788

    [aw] Issue Classification Agent produced no safe outputs

    agentic-workflowsUpdated Sep 29, 2026
  • #2277

    [aw] Detection Runs

    agentic-workflowsUpdated Sep 29, 2026
  • #2789

    [Python] No supported install-time delivery of the native runtime via pip/uv

    Updated Sep 29, 2026
  • #2756

    `modelCapabilities.limits.maxContextWindowTokens` is ignored by the runtime; only the undocumented `provider.maxContextWindowTokens` works

    Updated Sep 29, 2026
  • #2748

    BYOK `provider.maxOutputTokens` never reaches the upstream request body (chat completions & responses)

    Updated Sep 29, 2026
  • #2713

    [FFI] In-process runtime (runtime.node) no longer published to npm as of CLI 1.0.85 — unobtainable for registry-mirrored builds

    Updated Sep 28, 2026
  • #2683

    Feature Request: user-delegated authentication for MCP servers and external resources

    Updated Sep 28, 2026
  • #2787

    Feature Request: administrator-approved custom MCP servers available to hosted sessions

    Updated Sep 28, 2026
  • #2786

    Feature Request: trigger and read external CI/CD pipeline runs from a session

    Updated Sep 28, 2026

> Tags

Java

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言