$ show github/copilot-sdk
The GitHub Copilot SDK is a multi-language library development kit that enables developers to integrate GitHub Copilot's agentic workflows into their applications. It provides language-specific bindings (Java, .NET, Python, Go, Rust, Node.js) that communicate with the Copilot runtime via JSON-RPC over stdio, WebSocket, or in-memory (FFI) transports. The SDK manages session lifecycle, tool invocation, permission handling, and event processing, allowing host applications to leverage Copilot's AI capabilities for code assistance, chat, and agent-based tasks. The architecture centers around a CopilotClient class that handles connection establishment, session management, and message exchange. Key patterns include a transport abstraction layer for flexible communication, a code generation pipeline that ensures protocol consistency across languages, and extensibility points for defining custom tools and handling user permissions. The SDK supports advanced features such as Model Context Protocol (MCP) integration, custom agents, skills, and telemetry via OpenTelemetry. Code quality is maintained through schema-driven development, extensive unit and end-to-end testing, and clear marking of experimental APIs. The repository demonstrates strong engineering practices with reusable components like the JSON-RPC communication layer, session management patterns, and tool handling interfaces. While the multi-language nature increases maintenance overhead, the SDK remains actively updated with frequent releases and a focus on backward compatibility for stable APIs.
The LLM identified 3 files worth highlighting for reuse:
A self-contained JSON-RPC implementation that handles message framing, request/response correlation, and event dispatching over stdio and WebSocket transports. Demonstrates skill in building a reliable bidirectional communication layer for SDK-runtime interaction.
A TypeScript script that generates Java record types from JSON schemas, complete with Jackson annotations for serialization. Demonstrates non-obvious skill in automating SDK updates and ensuring cross-language consistency through schema-driven development.
An abstraction layer for transporting JSON-RPC messages over HTTP, WebSocket, or stdio. Demonstrates skill in decoupling the SDK from the underlying transport mechanism, enabling flexible deployment options (subprocess, in-process FFI, or network-connected runtime).