What problem does it solve?
Developers need a reliable, programmatic way to integrate GitHub Copilot into applications and services so sessions, streaming output, custom tools, and tool permissions can be managed automatically rather than by manual CLI use.
Core Features & Use Cases
- Session Management & Persistence: Create, resume, list, and destroy resumable sessions across Node.js, Python, Go, and .NET with explicit session IDs and session-state persistence.
- Streaming & Events: Support real-time assistant output via streaming deltas and a rich event subscription model for UI and backend integrations.
- Custom Tools, Hooks & MCP Integration: Define JSON-schema tools, intercept lifecycle events with hooks for permission and input handling, and integrate MCP servers (local or HTTP) for extensible tool capabilities.
- BYOK & Deployment Patterns: Use Bring-Your-Own-Key providers (OpenAI, Azure, Anthropic, local) for deployments without a Copilot subscription, and choose transport modes (stdio or TCP) for single-process or multi-client architectures.
- Use Case Example: Build a backend service that spawns shared CLI servers, creates resumable sessions per user, allows vetted tool calls for CI checks, and streams review comments to a web client.
Quick Start
Use the copilot-sdk to create a client, start a session with your preferred model, and ask it to summarize the repository README in three concise points.