GitHub Copilot SDK
Embed the agent runtime behind Copilot CLI directly into your own apps, in six languages.
- Source repo
- github/copilot-sdk
- Stars
- ★ 11k
- Last updated
- 1d ago
- License
- MIT
- Primary language
- Java
- FA score
- 56/100 · Major 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
- Source review
- 56/100 · Major 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.
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.
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 | 56 · Major gaps | Library / SDKFree + model costs | ★ 11k | 1d ago | Java | — |
| Agent2Agent (A2A) Protocol | Insufficient evidence | Library / SDKFree | ★ 26k | today | Shell | — |
| Prismer Cloud | 56 · Major gaps | CLIFreemium | ★ 1.4k | 6d ago | TypeScript | Claude Code |
| Promptise Foundry | 44 · Major gaps | Library / SDKFree + model costs | ★ 874 | today | Python | Claude.ai · OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
Docs state the SDK exposes Copilot CLI first-party tools by default, similar to --allow-all, though execution is governed by each SDK's permission handler; however tutorials routinely use PermissionHandler.approve_all / ApproveAllHandler, weakening least-privilege and confirmation in examples, so both score 1. Data flow has JSON-RPC architecture and OAuth sequence diagrams plus auth priority, scoring 2; sensitive data handling covers token types, rotation, disabling auto-login, multi-tenant isolation, scoring 2; dependency security only mentions bundled CLI and pinning advice without SBOM/audit evidence, scoring 1; external effects (file edits, tool calls) are mentioned but default limits are unclear, scoring 1; rollback only covers session resume and uninstall APIs, scoring 1; source attribution has MIT, official org, and community-SDK disclaimer, scoring 2.
Cross-language examples are structurally consistent with aligned event/method naming, scoring 2; dependency availability gives install commands and version floors but no lockfiles or offline/mirror guidance, scoring 1; failure messages only partially cover auth and quota semantics without systematic error codes, scoring 1.
Covers six languages, multi-user, CI, BYOK, enterprise scenarios thoroughly, scoring 3; capability boundaries flag experimental APIs and language differences, scoring 2; trigger precision lacks precise tool-trigger and permission-decision rules, scoring 1; environment fit offers bundled CLI and external server modes, scoring 2.
Documentation index, quick links, and per-language collapsibles are clear, scoring 3; install notes are detailed, scoring 3; naming stability is reduced by experimental APIs and cross-language naming variance (gitHubToken/github_token), scoring 2; examples and FAQ are rich, scoring 3; known limitations exist but are scattered, scoring 2; MIT license is explicit, scoring 2; versioning only links to CHANGELOG without content, scoring 1; maintenance responsibility has Issues channel and official org, scoring 2.
Output usability has complete runnable examples, but some are marked docs-validate: skip/hidden and unverified, scoring 2; marginal value comes from reusing a mature agent runtime, scoring 2; cost-benefit covers subscription billing and token usage but lacks cost-control mechanisms, scoring 1.
Claims largely point to external links (cookbook, awesome-copilot) without in-repo evidence, scoring 1; cross-source corroboration is limited, scoring 1; fact/inference separation is decent, distinguishing experimental vs stable APIs, scoring 2.
- Examples default to approve_all permission handlers; replace with least-privilege explicit approval before production integration.
- Default tool set resembles --allow-all; explicitly narrow available tools in client options.
- Some examples are marked docs-validate: skip/hidden and are unvalidated; copying them may fail.
- Experimental APIs (session.quota, usage.getMetrics, etc.) require pinning both SDK and CLI versions.
- Dependency security and version locking lack in-repo evidence; audit the bundled CLI and transitive dependencies yourself.
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.