DISCOVER THE FUTURE OF AI AGENTSarrow_forward

GitHub Copilot SDK

calendar_todayAdded Apr 23, 2026
categoryAgent & Tooling
codeOpen Source
TypeScriptNode.jsWorkflow AutomationModel Context ProtocolAI AgentsAgent FrameworkSDKAgent & ToolingDeveloper Tools & CodingProtocol, API & Integration

Official multi-language SDK to embed Copilot Agent into apps, supporting custom tools, surgical prompt customization, and BYOK.

Positioning#

An official multi-platform SDK by GitHub for integrating the Copilot Agent runtime—enabling planning, tool use, and file editing—directly into applications and services. Wraps the exact same engine as Copilot CLI, eliminating the need to build a custom Agent orchestration layer.

Core Capabilities#

  • Agent Runtime: Exposes the same engine as Copilot CLI, handling planning, tool calls, and file editing; defaults to all tools enabled (--allow-all, including filesystem, Git, web requests), configurable as needed
  • Multi-Language Support: Official SDKs for Node.js/TypeScript, Python, Go, .NET, and Java
  • Prompt Engineering: Supports "customize" mode for surgically editing 10 independent sections of the system prompt (identity, tools, etc.) without full replacement
  • Interaction Extensions: Supports registering slash commands and UI Elicitation interactive input dialogs
  • Configuration & Storage: MCP config auto-discovery (reads .mcp.json, .vscode/mcp.json, etc.); Node SDK provides sessionFs virtualized storage for Serverless deployments
  • Authentication & Models: Supports GitHub OAuth, environment variable token auth; BYOK for OpenAI, Azure AI Foundry, Anthropic, etc. without GitHub subscription; runtime query of all available Copilot CLI models

Architecture#

Your Application
       ↓
  SDK Client
       ↓ JSON-RPC
  Copilot CLI (server mode)
  • All SDKs communicate with Copilot CLI (server mode) via JSON-RPC protocol
  • SDK auto-manages CLI process lifecycle; supports overriding bundled CLI via cliPath / cliUrl to connect to external servers
  • Repository root contains sdk-protocol-version.json for unified protocol version control
  • Monorepo architecture with nodejs/, python/, go/, dotnet/ subdirectories

Installation#

  • Node.js / TypeScript: npm install @github/copilot-sdk
  • Python: pip install github-copilot-sdk
  • Go: go get github.com/github/copilot-sdk/go
  • .NET: dotnet add package GitHub.Copilot.SDK
  • Java: Maven dependency com.github:copilot-sdk-java (see separate repo)

Node.js, Python, and .NET SDKs bundle Copilot CLI automatically; Go SDK requires manual installation or copilot in PATH.

Key Configuration#

ParameterDescription
enableConfigDiscoverySet to true to auto-discover MCP server configs and skill directories
onPermissionRequestPermission request callback handler (e.g., approveAll for auto-approval)
commandsArray of custom slash commands to register
onElicitationRequestUI interaction request handler
systemMessageSystem prompt config (supports "customize" mode for section-level editing)
cliPath / cliUrlOverride bundled CLI with custom binary path or external server URL
workspace_pathAgent working directory path

Authentication Methods#

  • GitHub login (OAuth credentials stored via copilot CLI login)
  • GitHub OAuth App token
  • Environment variables: COPILOT_GITHUB_TOKEN / GH_TOKEN / GITHUB_TOKEN
  • BYOK: Use your own API key (OpenAI, Anthropic, etc.), no GitHub auth required

Ecosystem & Integration#

  • Native MCP (Model Context Protocol) config auto-discovery for seamless integration with MCP-standard external tool servers
  • BYOK mechanism for direct integration with OpenAI, Azure AI Foundry, Anthropic, and other major LLM providers
  • Community-maintained unofficial SDKs in Rust, Clojure, and C++

Use Cases#

  • Embedding Copilot Agent in applications
  • Automated development workflows (code generation, file editing, Git operations)
  • Model invocation under BYOK scenarios
  • Stateless Agent deployment in Serverless environments
  • Unified integration across multi-language tech stack teams

Current Stage#

Public Preview (as of v0.2.2, 2026-04-10), GA timeline not yet announced. MIT licensed.

Related Projects

View All arrow_forward

STAY UPDATED

Get the latest AI tools and trends delivered straight to your inbox. No spam, just intelligence.

rocket_launch