GitHub announced the Copilot SDK as generally available in June 2026. GitHub describes it as programmatic access to the agent runtime behind Copilot, including planning, tool invocation, file edits, streaming and multi-turn sessions. The SDK is aimed at CI assistants, internal developer tools and customer-facing AI features. It complements, rather than replaces, the site’s Copilot code-review and agent-skills guide.
The GitHub Copilot SDK is here. You can take the same Copilot agentic core that powers GitHub Copilot CLI and embed it in any application, with just a few lines of code.
— @github January 22, 2026

The practical verdict
Use the Copilot SDK when you need an embedded coding agent and want GitHub’s runtime primitives rather than a custom orchestration loop. Start with read-only repository analysis, then add narrowly scoped tools and explicit human approval for mutations.
Do not confuse SDK availability with an authorization decision. Your application remains responsible for:
- identity and tenant isolation;
- repository and workspace selection;
- tool registration and argument validation;
- secrets and environment variables;
- approval gates;
- patch review and rollback;
- audit logs and retention.
What the SDK provides
GitHub’s announcement describes a stable API for:
- planning and multi-step agent sessions;
- tool invocation and custom tools;
- file edits;
- streaming output;
- multi-turn conversations;
- MCP server connections;
- prompt and system-instruction customization;
- OpenTelemetry tracing.
The SDK is different from a chat completion wrapper. The runtime can plan and act across turns, so the application needs a lifecycle model: create a session, attach only the capabilities required for the task, stream events to the UI, approve or reject mutations, and persist the result with a trace ID.
The official Copilot SDK repository is the source to check for package names and current language support. GitHub lists Node.js/TypeScript, Python, Go, .NET, Rust and Java SDKs, with Rust and Java called out as additions in the GA announcement.
Sessions and tools
A useful application separates four layers:
| Layer | Application responsibility |
|---|---|
| Session | User, tenant, repository, model and retention identity |
| Planning | Task scope, budgets, timeouts and stop conditions |
| Tools | Schemas, allowlists, authorization and side-effect policy |
| Result | Streamed events, patch review, tests, trace and rollback |
Register tools with the smallest possible input schema. Validate arguments outside the model, enforce path and resource boundaries, and return bounded structured results. A tool that can run arbitrary shell commands is not equivalent to a read-only repository search tool.
For coding tasks, a safe first tool set usually includes repository listing, file reading, search and test execution inside a disposable workspace. File writes should produce a patch for review rather than silently changing a protected branch.
Streaming is useful for progress, but it is not evidence that a task is safe or complete. Persist the final tool outcomes, exit codes, changed files and test results.
Connect MCP servers carefully
GitHub documents MCP support as a way to connect custom capabilities. That convenience creates a supply-chain boundary. Before adding a server, record:
- repository and commit or package version;
- tools it exposes;
- credentials it receives;
- network destinations;
- data sent to the model and server;
- write or destructive operations;
- update and revocation process.
Expose an MCP server to a staging tenant first. Do not let an agent install arbitrary MCP servers or modify its own server configuration during a task. Use separate server profiles for read-only analysis and approved mutation workflows.
Authentication and permissions
The SDK’s GitHub subscription or BYOK availability is not the same as your application’s authorization model. GitHub’s announcement says the SDK is available to Copilot subscribers and non-Copilot users through BYOK, but the current plan, model and organization requirements should be verified before launch.
Never put a user’s long-lived GitHub token into a model prompt or tool result. Prefer short-lived, task-scoped credentials and a broker that can deny operations independently of the agent. Log authorization decisions without logging secret values.
For multi-tenant applications, bind every session to a tenant and repository allowlist. A prompt that names a repository must not be enough to authorize access.
Application architecture
A production wrapper should look like this:
request -> tenant/session authorization -> workspace and tool policy -> Copilot SDK session -> streamed events and approval checks -> patch/test review -> durable trace and result
Keep the SDK process away from production credentials where possible. Put mutation tools behind a service boundary that validates the requested resource, actor, change set and approval token. If the SDK process is compromised, the service boundary should still reject actions outside policy.
Tracing is valuable for diagnosing slow or failing connections, but traces can contain prompts, source code and tool results. Apply retention and redaction rules before exporting them to an observability system.
Evaluation checklist
Before production use:
- [ ] Verify package versions and language support from the official repository.
- [ ] Run read-only repository tasks in a disposable workspace.
- [ ] Test malformed tool arguments and denied permissions.
- [ ] Test prompt injection inside repository files and issue text.
- [ ] Limit file roots, network destinations and command classes.
- [ ] Require approval before writes, merges, deployments or credential use.
- [ ] Capture streamed events, final diffs, tests and trace IDs.
- [ ] Measure accepted-task cost, retries and human review time.
- [ ] Test session expiry, cancellation and partial failures.
- [ ] Keep a non-agent fallback for important workflows.
The SDK can reduce orchestration work. It does not remove the need for an application security design.
FAQ
The concise answers are in the metadata; the architecture and permission boundaries above are the implementation guidance.
Official sources
- Copilot SDK GA announcement
- GitHub Copilot SDK repository
- GitHub Copilot SDK documentation
- GitHub MCP Server
Related Guides
How to Change Antigravity Themes
Customize themes, dark mode, icons, and color schemes.
Rules & ConfigurationAntigravity Rules Guide
How to build custom rules with AGENTS.md and GEMINI.md.
MCP & IntegrationMCP Servers Setup Guide
Step-by-step guide to connecting MCP servers in Antigravity.
ComparisonBest Antigravity Alternatives 2026
Claude Code, Cursor, Windsurf, Codex, and Kiro compared.
Pricing & QuotaAntigravity Cockpit Guide
Monitor AI quota, track rate limits, and manage credits.
MCP & IntegrationGoogle Stitch + Antigravity Guide
The complete design-to-code workflow with DESIGN.md and Vibe Design.
