GitHub Copilot SDK
Embed the agent runtime behind Copilot CLI directly into your own apps, in six languages.
- Source repo
- microsoft/copilot-sdk
- Stars
- ★ 11k
- Last updated
- 1d ago v2.0.8
- FARS reviewed
- Nov 08, 2026 +13 new
- License
- MIT
- Primary language
- Rust
- FA score
- 66/100 · Some gaps
At a glance
- How it runs
- Works with
- Portable with changes
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- 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.
- 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.
- 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.
- Teams that must route every tool execution through internal approval use permission handlers to intercept or allow each call.
- Compliance-sensitive teams that want to run on their own OpenAI, Microsoft Foundry or Anthropic keys without GitHub authentication (BYOK).
- 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-sdkpip install github-copilot-sdk
- Environment variables
COPILOT_GITHUB_TOKENGH_TOKENGITHUB_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-sdkpip install github-copilot-sdkgo get github.com/github/copilot-sdk/godotnet add package GitHub.Copilot.SDKcargo add github-copilot-sdkFor 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)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- 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.
- 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?
Why each dimension lost points
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.
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.
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.
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.
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.
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.
- 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.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
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 ↗ -
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 ↗
FAQ
Can I use it without a Copilot subscription?
How is billing handled?
Do I have to install the Copilot CLI separately?
copilot is on your PATH. Go and Rust also expose application-level CLI bundling.Which tools are enabled by default, and is that safe?
--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?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.