copilot-sdk

Integrate GitHub Copilot sessions, custom tools, and streaming via JSON-RPC over stdio or TCP for Node.js, Python, Go, and .NET applications.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/davidrrowley/CortexYouV3 --skill copilot-sdk-davidrrowley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: copilot-sdk
Source: https://github.com/davidrrowley/CortexYouV3/tree/main/.agents/skills/copilot-sdk
Command: npx skills add https://github.com/davidrrowley/CortexYouV3 --skill copilot-sdk-davidrrowley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.

Frequently Asked Questions about copilot-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate GitHub Copilot into a Node.js or Python backend for session management?

To integrate GitHub Copilot for session management, use a programmatic SDK to communicate with the Copilot CLI via JSON-RPC over stdio or TCP. This enables creating, resuming, and destroying persistent sessions across Node.js, Python, Go, and .NET applications.

Can I use GitHub Copilot programmatically without a Copilot subscription?

You can use GitHub Copilot programmatically without a Copilot subscription by configuring Bring-Your-Own-Key (BYOK) providers. The SDK supports BYOK configurations for OpenAI, Azure, Anthropic, and local models to handle authentication and deployment.

How do I stream real-time Copilot assistant responses to a web client?

To stream real-time Copilot responses, subscribe to the event-driven streaming model provided by the SDK. This delivers streaming output deltas directly to your UI or backend integrations via JSON-RPC communication over stdio or TCP transports.

Does Copilot SDK support custom tools and MCP server integration?

Yes, Copilot SDK supports custom tools and MCP server integration. You can define JSON-schema tools, integrate local or HTTP MCP servers for extensible capabilities, and intercept lifecycle events with hooks for custom permission and input handling.

What is the best way to manage multi-client Copilot sessions for a shared backend service?

The best way to manage multi-client Copilot sessions is using TCP transport mode for multi-client architectures. This allows a shared backend service to spawn CLI servers, create resumable sessions per user, and stream outputs while managing tool permissions via hooks.