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 follows the same core pattern: your application talks to the SDK, which communicates with the Copilot CLI over JSON-RPC. What changes across setups is where the CLI runs, how users authenticate, and how sessions are managed.
flowchart TB
subgraph YourApp["Your Application"]
SDK["SDK Client"]
end
subgraph CLI["Copilot CLI"]
direction TB
RPC["JSON-RPC Server"]
Auth["Authentication"]
Sessions["Session Manager"]
Models["Model Provider"]
end
SDK -- "JSON-RPC<br/>(stdio or TCP)" --> RPC
RPC --> Auth
RPC --> Sessions
Auth --> Models
style YourApp fill:#0d1117,stroke:#58a6ff,color:#c9d1d9
style CLI fill:#161b22,stroke:#3fb950,color:#c9d1d9
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:
- Local CLI — Use the CLI already signed in on your machine
- Bundled CLI — Package everything into a standalone app
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:
- GitHub OAuth — Let employees sign in with their GitHub accounts
- Backend Services — Run the SDK in your internal services
If scaling beyond a single server: 3. Scaling & Multi-Tenancy — Handle multiple users and services
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:
- GitHub OAuth — Let customers sign in with GitHub
- BYOK — Manage identity yourself with your own model keys
- Backend Services — Power your product from server-side code
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:
- Backend Services — Core server-side integration
- Scaling & Multi-Tenancy — Session isolation, horizontal scaling, persistence
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 |
|---|---|
| Simplest possible setup | Local CLI |
| Ship a standalone app with Copilot | Bundled CLI |
| Users sign in with GitHub | GitHub OAuth |
| Use your own model keys (OpenAI, Azure, etc.) | BYOK |
| Azure BYOK with Managed Identity (no API keys) | Azure Managed Identity |
| Run the SDK on a server | Backend Services |
| Serve multiple users / scale horizontally | Scaling & Multi-Tenancy |
flowchart LR
subgraph Auth["Authentication"]
A1["Signed-in CLI<br/>(local)"]
A2["GitHub OAuth<br/>(multi-user)"]
A3["Env Vars / Tokens<br/>(server)"]
A4["BYOK<br/>(your keys)"]
end
subgraph Deploy["Deployment"]
D1["Local Process<br/>(auto-managed)"]
D2["Bundled Binary<br/>(shipped with app)"]
D3["External Server<br/>(headless CLI)"]
end
subgraph Scale["Scaling"]
S1["Single User<br/>(one CLI)"]
S2["Multi-User<br/>(shared CLI)"]
S3["Isolated<br/>(CLI per user)"]
end
A1 --> D1 --> S1
A2 --> D3 --> S2
A3 --> D3 --> S2
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:
- Copilot CLI installed (Installation guide)
- One of the SDKs installed:
- Node.js:
npm install @github/copilot-sdk - Python:
pip install github-copilot-sdk - Go:
go get github.com/github/copilot-sdk/go - .NET:
dotnet add package GitHub.Copilot.SDK
- Node.js:
If 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.