Welcome to the GitHub Copilot SDK docs. Whether you're building your first Copilot-powered app or deploying to production, you'll find what you need here.
| I want to... | Go to |
|---|---|
| Build my first app | Getting Started—end-to-end tutorial with streaming & custom tools |
| Set up for production | Setup Guides—architecture, deployment patterns, scaling |
| Configure authentication | Authentication—GitHub OAuth, environment variables, BYOK |
| Add features to my app | Features—hooks, custom agents, MCP, skills, and more |
| Debug an issue | Troubleshooting—common problems and solutions |
Step-by-step tutorial that takes you from zero to a working Copilot app with streaming responses and custom tools.
How to configure and deploy the SDK for your use case.
- Default Setup (Bundled CLI): the SDK includes the CLI automatically
- Local CLI: use your own CLI binary or running instance
- Backend Services: server-side with headless CLI over TCP
- GitHub OAuth: implement the OAuth flow
- Azure Managed Identity: BYOK with Azure AI Foundry
- Scaling & Multi-Tenancy: horizontal scaling, isolation patterns
Configuring how users and services authenticate with Copilot.
- Authentication Overview: methods, priority order, and examples
- Bring Your Own Key (BYOK): use your own API keys from OpenAI, Azure, Anthropic, and more
Guides for building with the SDK's capabilities.
- Hooks: intercept and customize session behavior
- Custom Agents: define specialized sub-agents
- MCP Servers: integrate Model Context Protocol servers
- Skills: load reusable prompt modules
- Image Input: send images as attachments
- Streaming Events: real-time event reference
- Steering & Queueing: message delivery modes
- Session Persistence: resume sessions across restarts
- Remote Sessions: share sessions to GitHub web and mobile
Detailed API reference for each session hook.
- Pre-Tool Use: approve, deny, or modify tool calls
- Post-Tool Use: transform tool results
- User Prompt Submitted: modify or filter user messages
- Session Lifecycle: session start and end
- Error Handling: custom error handling
- Debugging Guide: common issues and solutions
- MCP Debugging: MCP-specific troubleshooting
- Compatibility: SDK vs CLI feature matrix
- OpenTelemetry Instrumentation: built-in TelemetryConfig and trace context propagation
Guides for using the SDK with other platforms and frameworks.
- Microsoft Agent Framework: MAF multi-agent workflows