Dev & Engineering ✓ Microsoft · Official copilot-sdkmulti-language-sdkjson-rpcbyokagent-runtimetool-invocation

GitHub Copilot SDK

Embed the agent runtime behind Copilot CLI directly into your own apps, in six languages.

Stars
★ 11k
Last updated
1d ago v2.0.8
FARS reviewed
Nov 08, 2026 +13 new
License
MIT
Primary language
Rust

At a glance

How it runs
Library / SDKFramework
Works with
Portable with changes
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
GitHub Copilot subscription or BYOK API keysCopilot CLI (bundled for Node.js, Python, .NET; manual for Go, Java, Rust)Shell / CLINetwork accessLocal filesystem
Typical use
A backend team wants to add a coding assistant that reads a repo, edits files and runs tools inside its own SaaS product, reusing the Copilot CLI runtime instead of building orchestration from scratch.
Not a fit if
  • Teams wanting their own model routing without any Copilot account
  • Users who want a ready-made chat UI rather than integration code
  • Organizations requiring Entra ID or managed identity for BYOK auth
Maintenance
Commits in the last 30 dayslast commit 2026-12-04latest release v2.0.8 (2026-12-04)+3.1 ★/day over 7 days
Source review
66/100 · Some gaps

What does this agent do, and when should you use it?

The GitHub Copilot SDK is GitHub's official set of multi-language client libraries that expose the production-tested agent runtime behind Copilot CLI programmatically. It ships six SDKs — Node.js/TypeScript, Python, Go, .NET, Java and Rust — each in its own subdirectory and distributed through npm, PyPI, NuGet, Go modules, crates.io and Maven Central. Every SDK talks to the Copilot CLI running in server mode over JSON-RPC, and the SDK manages the CLI process lifecycle automatically, though you can also attach to an externally running CLI server. You define agent behavior and a permission handler; Copilot handles planning, tool invocation and file edits. Usage requires a GitHub Copilot subscription, or BYOK keys from providers such as OpenAI, Microsoft Foundry and Anthropic.

Your application creates a session through an SDK client and sends a prompt; the client then calls the Copilot CLI server-mode process over JSON-RPC, and the CLI performs planning, tool invocation and file edits, streaming results back. The SDK starts and stops the CLI process for you, or connects to an external CLI server. The Copilot CLI's first-party tools are exposed by default, but each call passes through the SDK's permission handler so the application can approve, deny or customize it; tool availability can also be configured, and custom agents, skills and tools can be defined. The SDK additionally offers a method that returns the models available at runtime, a portable form-elicitation schema contract, and — in runtimes granting skill-confirmed-installation — Agent Finder skill installation APIs such as skills.planInstall, skills.applyInstall and skills.installations.list.

  1. A backend team wants to add a coding assistant that reads a repo, edits files and runs tools inside its own SaaS product, reusing the Copilot CLI runtime instead of building orchestration from scratch.
  2. A platform group with mixed stacks can let frontend teams use TypeScript, data teams Python and infrastructure teams Go while sharing one definition of agent behavior.
  3. Teams that must route every tool execution through internal approval use permission handlers to intercept or allow each call.
  4. Compliance-sensitive teams that want to run on their own OpenAI, Microsoft Foundry or Anthropic keys without GitHub authentication (BYOK).
  5. Automation and CI pipelines that trigger agent tasks programmatically through the Node.js or Python SDK.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • npm install @github/copilot-sdk
  • pip install github-copilot-sdk
Environment variables
COPILOT_GITHUB_TOKEN GH_TOKEN GITHUB_TOKEN

How do you install or deploy this agent?

Check your runtime first: Node.js/TypeScript, Python and .NET SDKs bundle the Copilot CLI automatically; Go, Java and Rust require a manual CLI install with copilot on your PATH. Then install the package for your language.

npm install @github/copilot-sdk
pip install github-copilot-sdk
go get github.com/github/copilot-sdk/go
dotnet add package GitHub.Copilot.SDK
cargo add github-copilot-sdk

For Java, use the Maven coordinates com.github:copilot-sdk-java; see java/README.md for the Maven and Gradle instructions. Authentication options include OAuth credentials stored by a copilot CLI login, passing user tokens from your own GitHub OAuth app, the COPILOT_GITHUB_TOKEN, GH_TOKEN or GITHUB_TOKEN environment variables, or BYOK keys.

How do you use this agent?

Authenticate before the first run: either log in with the copilot CLI or set an environment variable.

export COPILOT_GITHUB_TOKEN="<your-github-token>"

For BYOK, skip GitHub auth and configure an API key from a supported provider such as OpenAI, Microsoft Foundry or Anthropic; see docs/auth/byok.md for setup examples. Then create an SDK client in code, configure the permission handler and tool options, open a session and send a prompt. Language-specific examples and API reference live in each SDK subdirectory's README, and the full walkthrough is in docs/getting-started.md. To attach to a CLI server that is already running, see the "Connecting to an external CLI server" section of that guide.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • Reuses the production-tested Copilot CLI runtime, so planning, tool invocation and file edits come for free.
  • One definition of agent behavior can ship across Node.js/TypeScript, Python, Go, .NET, Java and Rust, each via its native package manager.
  • Permission handlers let the host application approve, deny or customize every tool call, which suits audited internal systems.
  • BYOK support runs on your own OpenAI, Microsoft Foundry or Anthropic keys with no GitHub authentication.
  • The SDK manages the CLI process lifecycle, and Node.js, Python and .NET bundle the CLI outright, reducing deployment friction.
  • Generally available with semantic versioning, a CHANGELOG and per-language custom instruction files for agent-assisted development.
Limitations
  • The core runtime is tied to Copilot CLI and JSON-RPC; Go, Java and Rust need a separately installed or packaged CLI, making deployment heavier than a pure library.
  • BYOK is key-based only — Microsoft Entra ID, managed identities and third-party identity providers are explicitly unsupported.
  • Usage is billed per prompt against your Copilot allowance, so cost depends on your subscription tier.
  • Form-elicitation schema portability varies: Node.js and Rust preserve wire metadata and property order, while Python, Go, .NET and Java reconstruct the schema, so cross-language apps cannot rely on those details.
  • Documentation depth is uneven — Rust has no cookbook entry and its custom instructions are not yet published.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
GitHub Copilot SDK This agent 66 · Some gaps Library / SDKFree + model costs ★ 11k 1d ago Rust —
Agent2Agent (A2A) Protocol 47 · Major gaps Library / SDKFree ★ 27k 1d ago Shell —
Promptise Foundry 81 · Good Library / SDKFree + model costs ★ 898 1d ago Python Claude.ai · OpenAI API · Claude API
A2A Adapter 73 · Some gaps Library / SDK ★ 109 today Python —

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
66/ 100 5-point scale 3.3 / 5
This review covers the source as of Nov 08, 2026. The project has shipped 13 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 13/29
Reliability 8/14
Adaptability 14/18
Convention 15/18
Effectiveness 10/13
Verifiability 6/8
Why each dimension lost points
Trust13 / 29 · 2.2/5

The material says first-party CLI tools are exposed by default, similar to --allow-all, while a permission handler can approve, deny, or customize calls; several getting-started examples use ApproveAll, so least privilege scores 1. OAuth, BYOK, token providers, and authentication modes are described, including a concrete rotation example, but the supplied material does not adequately explain credential storage or sensitive-data handling, scoring 1. Bundled and external CLI options, JSON-RPC, and network downloads by the bundler are visible, but guidance on general tool side effects and recovery is limited, so external effects and rollback each score 1. Permission requests and Agent Finder installation reviews include confirmation mechanisms, scoring 2. Security reporting and GitHub copyright attribution are clear, scoring 2 for source attribution. Dependencies have versions and some workflow summaries pin hashes, but this does not establish overall dependency security, scoring 1.

Reliability8 / 14 · 2.9/5

README, getting-started documentation, and multilingual examples are broadly aligned, but approve-all examples reinforce a permissive default impression, and a Go example combines os.Exit(0) with deferred cleanup; the static packet does not resolve these details, so self-consistency scores 1. The runtime depends on Copilot CLI, an account or BYOK service, and language runtimes; bundled CLI and external CLI options are documented, scoring 2 for dependency availability. CLI prerequisites, authentication constraints, experimental APIs, and error handling examples are described, scoring 2 for failure messages.

Adaptability14 / 18 · 3.9/5

The docs clearly address multilingual app developers and interactive users, CI/server-side automation, OAuth, BYOK, and enterprise organization scenarios, scoring 3. Tool authorization, authentication, CLI/external server options, and experimental in-process transport are described, though permission defaults and deployment isolation guidance are limited, scoring 2 for capability boundaries. Session creation, requests, events, and tool calls are shown concretely; production trigger conditions remain an integration decision, scoring 2. Six languages, runtime prerequisites, and CLI acquisition paths are covered, while language capabilities differ and CLI versioning matters, scoring 2 for environment fit.

Convention15 / 18 · 4.2/5

The README, documentation index, and authentication, setup, features, and troubleshooting sections provide clear information architecture, scoring 3. Install commands, prerequisites, and getting-started steps are explicit for all six languages, scoring 3. SDK names, package names, and Copilot CLI naming are generally stable; package/API version relationships are not centralized in the supplied material, scoring 2. Multilingual tutorials, FAQ, authentication, and billing examples are extensive, scoring 3. BYOK identity limits, experimental APIs, schema preservation differences, and CLI bundling differences are documented, but limitations and risks are not comprehensive, scoring 2. Both the repository LICENSE and README identify MIT, scoring 3. The README mentions semantic versioning and a changelog, but the supplied packet lacks changelog contents and a complete SDK-to-CLI compatibility policy, scoring 2. Security reporting, issue reporting, GitHub ownership, and verified organization provenance are clear, but explicit maintainer coverage or support commitments are not shown, scoring 2.

Effectiveness10 / 13 · 3.8/5

Examples offer practical starting points for multilingual integration, streaming, custom tools, authentication, and usage metrics, scoring 3 for output usability. The SDK brings Copilot Agent runtime capabilities into applications, including tool use, planning, and sessions, giving clear marginal value, scoring 3. Subscription or BYOK costs, CLI, and multilingual runtime integration add ongoing cost and complexity; the material does not provide enough comparison to quantify benefits, scoring 1 for cost-benefit.

Verifiability6 / 8 · 3.8/5

README claims about architecture, authentication, and capabilities have related docs and code examples, scoring 2 for claim traceability. The README, authentication docs, OAuth guide, and Python tests partly corroborate token-provider and installation-confirmation behavior, scoring 2; the packet is a sample and cannot establish every capability. The docs distinguish experimental features, BYOK limits, language differences, and illustrative examples, and this review does not treat unexecuted behavior as fact, scoring 3 for separating fact from inference.

Risks and how to mitigate them
  • First-party tools are broadly exposed by default and starter examples approve all permissions; review the tool set and permission policy when integrating.
  • Multilingual examples and CLI/server dependencies create deployment differences; check the target language's bundling path, runtime version, and experimental API markers.
  • The packet is a source sample and was not executed; it cannot establish runtime correctness or complete dependency security.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision d1e6021a43b2 New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/copilot-sdk.svg)](https://followagents.com/en/agents/copilot-sdk)
<a href="https://followagents.com/en/agents/copilot-sdk"><img src="https://followagents.com/badge/copilot-sdk.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v2.0.8
    Release notes excerpt
    - The .NET SDK now uses fewer temporary allocations when routing events to sessions, with no change to session matching behavior. - SDK sessions in trusted repositories now skip Copilot and Claude settings files that aren't regular files, instead of hanging or using unbounded memory. Regular files and symlinks to them still load. - Add optional managedDesiredEnabled field to DiscoveredHook returned by hooks.discover to report when managed policy requires or blocks a hook. …
    View on GitHub ↗
  2. v2.0.7
    Release notes excerpt
    - Fixed an intermittent Windows issue where a headless SDK host could announce its endpoint but omit the startup message and selected workspace from its main process log. - Plugin and MCP discovery warnings shown by SDK hosts now identify each repository settings file that could not be loaded and explain why it could not be read or parsed. - SDK sessions now honor saved launch approvals for user-installed extensions across all repositories and folders or within an approved folder and its descendants. Folder trust is still required, and explicit denials take precedence. …
    View on GitHub ↗
  3. v2.0.6

FAQ

Can I use it without a Copilot subscription?
Yes, in BYOK mode only: supply your own API keys from supported providers such as OpenAI, Microsoft Foundry or Anthropic and no GitHub authentication is needed. Standard non-BYOK usage requires a GitHub Copilot subscription, which includes a limited free tier.
How is billing handled?
The SDK itself is MIT-licensed, but usage follows the same model as Copilot CLI — each prompt counts toward your usage allowance. Under BYOK you pay your chosen provider's rates instead.
Do I have to install the Copilot CLI separately?
Not for Node.js, Python or .NET, which bundle it automatically. Go, Java and Rust do not bundle it by default; install it manually or ensure copilot is on your PATH. Go and Rust also expose application-level CLI bundling.
Which tools are enabled by default, and is that safe?
The Copilot CLI's first-party tools are exposed by default, similar to running the CLI with --allow-all, but every call still passes through each SDK's permission handler, so your app can approve, deny or customize it and can enable or disable specific tools via client options.
Which models can I use?
All models available through Copilot CLI are supported, and the SDK exposes a method to list the models available so you can pick one at runtime.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts