These guides walk you through configuring the Copilot SDK for your specific use case โ from personal side projects to production platforms serving thousands of users.
Every Copilot SDK integration uses JSON-RPC to reach the Copilot runtime. The runtime is a standalone, multi-tenant component, separate from the GitHub Copilot CLI, so your application doesn't need the CLI installed. SDK v2 hosts the runtime in process by default; explicit child-process and standalone-server connections are also available. Setups differ in where the runtime runs, how users authenticate, and how sessions are managed.
flowchart TB
subgraph YourApp["Your Application"]
SDK["SDK Client"]
end
subgraph Runtime["Copilot runtime (in-process by default)"]
direction TB
RPC["JSON-RPC Server"]
Auth["Authentication"]
Sessions["Session Manager"]
Models["Model Provider"]
end
SDK -- "JSON-RPC<br/>(C ABI, stdio, or TCP)" --> RPC
RPC --> Auth
RPC --> Sessions
Auth --> Models
style YourApp fill:#0d1117,stroke:#58a6ff,color:#c9d1d9
style Runtime fill:#161b22,stroke:#3fb950,color:#c9d1d9
You can host the runtime in three ways:
RuntimeConnection.forSpawnedStdio() or RuntimeConnection.forSpawnedTcp() (TypeScript and Java names; each SDK has an equivalent), and the SDK starts the runtime as a child process and talks to it over stdio or TCP. Choose this when you need crash isolation or per-client process configuration such as the executable path, arguments, environment, or working directory. See Migrate to the v2 default and Use your own runtime binary.copilot-runtime --server yourself, and the SDK attaches to it over TCP with RuntimeConnection.forTcp(host, port). One runtime server can serve many SDK clients and concurrent sessions. See Backend services and Multi-tenancy and server deployments.The setup guides below help you configure each layer for your scenario.
You're building a personal assistant, side project, or experimental app. You want the simplest path to getting Copilot in your code.
Start with:
You're building tools for your team or company. Users are employees who need to authenticate with their enterprise GitHub accounts or org memberships.
Start with:
If scaling beyond a single server:
You're building a product for customers. You need to handle authentication for your users โ either through GitHub or by managing identity yourself.
Start with:
For production: 4. Scaling & Multi-Tenancy โ Serve many customers reliably
You're embedding Copilot into a platform โ APIs, developer tools, or infrastructure that other developers build on. You need fine-grained control over sessions, scaling, and multi-tenancy.
Start with:
Depending on your auth model: 3. GitHub OAuth โ For GitHub-authenticated users 4. BYOK โ For self-managed identity and model access
Use this table to find the right guides based on what you need to do:
| What you need | Guide |
|---|---|
| Getting started quickly | Default setup (bundled runtime) |
| Use your own runtime binary | Use your own runtime binary |
| Users sign in with GitHub | GitHub OAuth |
| Use your own model keys (OpenAI, Azure, and more) | BYOK |
| Azure BYOK with Managed Identity (no API keys) | Azure Managed Identity |
| Run the SDK on a server | Backend Services |
| Connect to a runtime server you run yourself | Connecting to a standalone runtime server, Backend Services |
| Understand the in-process default or retain subprocess isolation | In-process runtime |
| Configure SDK options for concurrent users | Multi-tenancy and server deployments |
| Serve multiple users / scale horizontally | Scaling & Multi-Tenancy |
flowchart LR
subgraph Auth["Authentication"]
A1["Signed-in user<br/>(local)"]
A2["GitHub OAuth<br/>(multi-user)"]
A3["Env Vars / Tokens<br/>(server)"]
A4["BYOK<br/>(your keys)"]
end
subgraph Deploy["Deployment"]
D1["In-process runtime<br/>(default)"]
D2["Child process<br/>(spawned stdio or TCP)"]
D3["Runtime server<br/>(standalone)"]
end
subgraph Scale["Scaling"]
S1["Single User<br/>(one runtime)"]
S2["Multi-User<br/>(shared runtime)"]
S3["Isolated<br/>(runtime per user)"]
end
A1 --> D1 --> S1
A2 --> D3 --> S2
A3 --> D3 --> S2
A4 --> D1
A4 --> D2 --> S1
A2 --> D3 --> S3
A3 --> D3 --> S3
style Auth fill:#0d1117,stroke:#58a6ff,color:#c9d1d9
style Deploy fill:#0d1117,stroke:#3fb950,color:#c9d1d9
style Scale fill:#0d1117,stroke:#f0883e,color:#c9d1d9
All guides assume you have:
npm install copilot-sdk-superchargedpip install copilot-sdk-superchargedgo get github.com/microsoft/copilot-sdk/go/v2, then run the application bundlerdotnet add package CopilotSDK.Superchargedcargo add copilot-sdkcom.microsoft:copilot-sdk with Maven or Gradle, plus the matching com.microsoft:copilot-sdk-runtime classifierIf you're brand new, start with the Getting Started tutorial first, then come back here for production configuration.
Pick the guide that matches your situation from the decision matrix above, or start with the persona description closest to your role.
Can you improve this documentation? These fine people already did:
Jeremiah Isaacson, copilot-sdk-mirror-writer[bot], Patrick Nikoletich, copilot-cli-release-app[bot], Rince Yuan & Sunbrye LyEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| โ | Move to previous article |
| โ | Move to next article |
| Ctrl+/ | Jump to the search field |