Back to Blog

    Engineering

    GitHub Copilot SDK: embedding the agent runtime in your apps

    The GitHub Copilot SDK controls the Copilot CLI agent runtime over JSON-RPC: an overview of architecture, languages, setup and permissions.

    January 31, 20261 min read
    Christof Schnyder

    Christof Schnyder

    Software Architect, Co-Founder

    christof.schnyder@cnext.ch
    CNEXT AI Agent

    The GitHub Copilot SDK embeds the Copilot CLI agent runtime programmatically in your own applications and services. The official Node.js installation is npm install @github/copilot-sdk. The SDK communicates with Copilot CLI over JSON-RPC.

    Understand the architecture

    Your application creates an SDK client and a session. Copilot CLI runs the agent loop, selects tools and processes their results; the SDK passes events and control options to your application. A session can configure custom tools, a system message, the working directory, authentication and a permission handler.

    GitHub publishes SDKs for Node.js/TypeScript, Python, Go, .NET, Java and Rust. For the Node.js, Python and .NET SDKs, the CLI runtime is provided with the package; other languages may need an installation or a reachable CLI process. Setup requirements, compatible CLI versions and the current API are described in the README and documentation for each language.

    Start with permissions

    The SDK's permission handler is a security boundary: it decides on protected actions such as writing files and running shell commands. Define narrowly scoped tools and ask for approval before sensitive actions. Choose authentication to suit the deployment: interactive sign-in, organisation installation tokens and your own provider keys have different requirements.

    Sources: official GitHub Copilot SDK, Node.js/TypeScript SDK README, GitHub Docs: SDK setup, GitHub Docs: compatibility.

    Copilot StudioAgentic AISchweiz
    Teilen:

    AI tools may have supported the creation of this article. CNEXT is responsible for the published content. Product features and prices can change; check the linked primary sources for current details.

    Christof Schnyder

    Christof Schnyder

    Software Architect, Co-Founder

    Discuss using the SDK

    We discuss with you how to embed the Copilot agent runtime in your application with narrowly scoped tools.