Learning resourcesReviewed · GitHub

Build your first Copilot-powered app (GitHub Copilot SDK quickstart)

This is a GitHub Docs tutorial for developers who want to build a command-line assistant on the GitHub Copilot SDK, and its main catch is that it needs an authenticated GitHub Copilot CLI and says nothing about cost, licence or SDK version. It walks through sending a first message, streaming responses and adding a custom tool in TypeScript, Python, Go, Rust, .NET and Java, then points to MCP servers, custom agents, system-message customization, running the CLI as an external server and OpenTelemetry tracing.

Researched 12 Nov 2026

In short.

This is a GitHub Docs tutorial for developers who want to build a command-line assistant on the GitHub Copilot SDK, and its main catch is that it depends on an authenticated GitHub Copilot CLI and leaves cost, licence and SDK versions undocumented on the page. It builds one small project in five steps: install the SDK, send a message, stream the reply, add a custom get_weather tool and wrap it in an interactive loop. Every step is shown in TypeScript, Python, Go, Rust, .NET and Java. It then briefly covers MCP servers, custom agents, system-message sections, connecting to a separately run CLI server and OpenTelemetry tracing. None of the code has been run, so every behaviour described here comes from the page text and is untested.

Researched and written by an AI model and checked by a second AI model. How it works

This report covers only the single selected documentation page at [https://docs.github.com/api/article/body?pathname=/en/copilot/get-started/sdk-quickstart], captured in full on 12 November 2026. Pages it links to (authentication, BYOK, MCP, custom agents, OpenTelemetry, the bundled-CLI setup and the SDK repositories and READMEs) were excluded, so licence, pricing, plan requirements, SDK versions and API details beyond this page are unknown. No code from the page was run, compiled or installed, and no outputs were observed. Statements about behaviour are the page's claims. The page contains no licence notice, so the reuse and redistribution terms for its text and code are unknown.

The overview

What this resource is

This is a documentation page titled Build your first Copilot-powered app, published on GitHub Docs under Copilot, Get started, SDK quickstart. The page address is [https://docs.github.com/api/article/body?pathname=/en/copilot/get-started/sdk-quickstart]. It is a tutorial, not a library or a tool. It teaches how to use the GitHub Copilot SDK to put Copilot's agent behind your own program.

The page does not name an author, a publication date or an SDK version number. The Java Maven and Gradle snippets use placeholder version variables (copilot.sdk.version and copilotSdkVersion) rather than a real version.

Overall assessment

On the page text alone, this is a coherent, practical starter guide. It is organised around one example that grows in steps, and it gives equivalent code for six languages. It covers more than a typical first tutorial: streaming, tool definitions, MCP, custom agents, prompt-section overrides, an external CLI server and tracing.

Its weaknesses are mostly about what it leaves out. It does not state pricing or licensing, does not say which Copilot plans are needed, does not describe what the permission-approval handlers actually allow, and does not give SDK versions. The code samples also differ from one another in small ways (see limitations). The weather tool returns random or fixed placeholder data, so the tutorial shows the wiring, not a real integration. None of the code has been run.

Who it is for

It suits developers who already write in Node.js, Python, Go, Rust, Java or .NET and want to embed a Copilot-driven assistant in a command-line program or service. The steps are simple enough for someone new to the SDK. Familiarity with async code helps, since most samples use async/await, futures or event callbacks. Rust users also need tokio and serde.

It is less suited to people who only want to use Copilot as an end user. Nothing here covers using Copilot in an editor. It is also not a full reference: the page leaves language-specific details to the SDK READMEs on GitHub, which are separate from this page.

What the SDK can do, according to the page

The tutorial shows creating a client and a session. The TypeScript, Python, Go, .NET and Java samples set the model to "auto". The Rust samples use SessionConfig defaults and do not explicitly select "auto". It also shows sending a prompt and waiting for the reply (sendAndWait / send_and_wait), and streaming partial output through assistant.message_delta events. Most samples detect completion through session.idle, while the Rust streaming samples print a new line on the assistant.message event.

Event subscription differs by language. The page's table lists on(handler) for subscribing to all events, on(eventType, handler) for subscribing by event type name in Node.js/TypeScript only, and subscribe() for Rust. In the samples, TypeScript, Python and Go return an unsubscribe function you call later. .NET returns an object you release with Dispose, and Java returns an object you release with close. Java samples also register handlers for specific event classes. Rust's subscribe() returns a receiver that your code reads in a loop, filtering by event_type.

It also shows defining custom tools that Copilot can call, each with a description, a parameter schema and a handler. The helpers differ by language: defineTool in TypeScript, define_tool with Pydantic in Python, DefineTool with struct tags in Go, define_tool with serde and schemars in Rust, CopilotTool.DefineTool in .NET and ToolDefinition.create in Java.

In the What's next section it names further options: connecting to MCP servers (a GitHub MCP server URL is shown), defining custom agents with a name, display name, description and prompt, setting an agent at session creation, and customizing the system message. You can customize the system message by appending instructions or by using a customize mode that replaces, removes, appends, prepends or preserves named sections such as tone, guidelines and safety.

The page also describes running the CLI in server mode (--headless, with --port and --host) and connecting the SDK to it. It describes opt-in OpenTelemetry tracing to an OTLP HTTP endpoint or a JSON-lines file, plus W3C trace-context propagation between the SDK and the CLI. The page only describes these features and links to deeper pages, and their behaviour has not been verified.

Using it

Requirements

The page requires GitHub Copilot CLI installed and authenticated. The Node.js, Python and .NET SDKs provide the CLI automatically (the page links to a bundled-CLI setup page). Go, Java and Rust need it separately unless you use their application-level CLI bundling features. You can check the install with copilot --version.

Minimum runtimes listed are Node.js 20+, Python 3.11+, Go 1.24+, Rust 1.94+, Java 17+ and .NET 8.0+. Package names given are @github/copilot-sdk with tsx for TypeScript, github-copilot-sdk for Python, github.com/github/copilot-sdk/go for Go, the github-copilot-sdk crate (with tokio, serde and schemars) for Rust, GitHub.Copilot.SDK for .NET and com.github:copilot-sdk-java for Java.

The page does not say which GitHub account, Copilot plan or organisation policy is needed to authenticate. It links to a separate Authentication page that is outside this page. This page does not establish whether a paid or free Copilot entitlement is required.

How it works

The SDK talks to a Copilot CLI process. By default it starts and stops that process for you. Alternatively, you start the CLI yourself in server mode and point the SDK at it with cliUrl, RuntimeConnection.for_uri, URIConnection, Transport::External or equivalent. In that case the SDK does not spawn or manage the CLI. The page names the RPC calls session.create, session.resume and session.send as carrying trace headers, which implies a request/response protocol between the SDK and the CLI.

For tools, the page describes four steps. Copilot sends a tool call request with parameters, the SDK runs your handler, the result goes back to Copilot, and Copilot folds it into its reply. Copilot decides when to call a tool based on the user's question, using the description and the parameter schema you supply.

Sessions are event-driven. A streaming session emits assistant.message_delta chunks and a session.idle event when finished, and the samples attach handlers to print each chunk. This page does not explain how the model setting "auto" chooses a model.

Setup steps

Step 1 creates a project and installs the SDK. In TypeScript that means npm init and npm install @github/copilot-sdk tsx. In Python it is pip install github-copilot-sdk. In Go it is go mod init and go get. In Rust it is cargo new and several cargo add commands. In .NET it is dotnet new console and dotnet add package. In Java it is a Maven or Gradle dependency.

Step 2 sends the first message ("What is 2 + 2?") and the page says you should see 4. Step 3 turns on streaming. Step 4 adds the get_weather tool. Step 5 builds the interactive loop that reads input until you type exit. Run commands are given for each language, such as npx tsx index.ts, python main.py, go run main.go, cargo run and dotnet run.

The Java run commands compile against a jar named copilot-sdk.jar, while the dependency snippet uses a Maven coordinate. The page does not explain how those relate, so Java users may need the SDK README. The page contains no guidance on obtaining or installing the Copilot CLI itself beyond the bundled-CLI link.

Worked example from the page

The central example is a weather assistant. In TypeScript, defineTool("get_weather", ...) takes a description (Get the current weather for a city), a JSON-schema parameter object with a required string field city, and an async handler. The handler picks a random temperature between 50 and 79 and a random condition from sunny, cloudy, rainy and partly cloudy, then returns the city, temperature and condition. A comment says a real app would call a weather API.

The session is created with model "auto", streaming true and tools set to the tool list. You then send the prompt "What's the weather like in Seattle and Tokyo?" and Copilot is expected to call the tool and answer. The Rust sample returns a fixed string, "<city>: 62°F and sunny", for every city.

The example session shown on the page lists specific temperatures for Seattle, Tokyo and London. Because the TypeScript, Python, Go, .NET and Java handlers use random values, real output would differ from that illustration. No output has been observed.

Assessment & evidence

Limitations and cautions

Scope: this is a quickstart. It does not cover authentication details, tool-handler security, testing, deployment or the full API surface. The Go examples handle startup, session, request and input errors, and Rust propagates errors; the page provides no dedicated error-handling guide. It points to separate pages for authentication, BYOK, MCP and OpenTelemetry.

Permissions: most samples pass an approve-all permission handler (PermissionHandler.approve_all, ApproveAllHandler, APPROVE_ALL and similar). The page does not explain what permission requests the CLI can raise or what approving everything allows. Treat approve-all as a demo setting until you have read the authentication and permission documentation.

Inconsistencies in the samples: The Python examples supply an approve-all handler; whether supplying a handler is mandatory is not established by this page. The TypeScript and Go samples in Steps 2 to 5 create sessions without a handler, while their external-server samples pass one, and the page does not explain the difference. The Python install command is pip install github-copilot-sdk, while the telemetry note says pip install copilot-sdk[telemetry]. The package names differ and the page does not reconcile them. Several Java snippets carry a comment marker showing they are skipped by the docs' validation, so they may be less thoroughly checked than the others.

Security: the headless server listens only on loopback by default. Binding to 0.0.0.0 makes it reachable by anyone who can route to the address. The page's own warning says to add firewall, private network or reverse proxy controls plus authentication. In external-server mode the Rust example uses connection_token: None.

Telemetry has a captureContent option for message content. The page does not give its default, so check it before enabling tracing on sensitive prompts.

Why this assessment

The tutorial is built around a single weather-assistant example that grows over five steps, from installing the SDK to an interactive loop. Each step is given in TypeScript, Python, Go, Rust, .NET and Java, with run commands for each, so a reader can follow the whole path in one language. The code is concrete enough to copy, and the page includes its own warning about exposing the headless CLI server beyond loopback.

What the page says about the SDK is GitHub's own documentation. It cites no independent benchmark or review. Its weak points are gaps in the text rather than reported failures. It gives no cost, licence, plan requirements or SDK versions. It uses approve-all permission handlers without explaining what they allow. The samples also differ in small ways, such as whether a permission handler is passed and which Python package name is used. The weather tool returns random or fixed placeholder data, so the example shows how to wire up a tool rather than a working integration.

Behaviours the page describes, such as Copilot choosing to call the tool or the reply streaming word by word, are the page's own claims and have not been verified by running the code.

Alternatives

The page does not compare competing SDKs or frameworks.

The page does document several choices. You can write custom tools with your own handlers, or connect MCP servers, which the page says provide pre-built tools (its example is GitHub's MCP server, for access to repositories, issues and pull requests). For specialised behaviour, you can define custom agents or customize the system message, either by appending instructions or by overriding named sections. To use your own model-provider keys, the Learn more list points to BYOK with providers such as Microsoft Foundry and OpenAI.

Evidence base

The evidence is the GitHub Docs page Build your first Copilot-powered app at [https://docs.github.com/api/article/body?pathname=/en/copilot/get-started/sdk-quickstart], as it appeared on 12 November 2026. The snapshot covers the whole page: the prerequisites, install and run commands, all six language versions of each step, the event-subscription table, the MCP, custom-agent and system-message snippets, the external CLI server section, the telemetry section and the Learn more links.

Pages it links to are not part of this evidence. These include Authentication, BYOK, MCP, custom agents, OpenTelemetry, bundled-CLI setup and the SDK repositories and READMEs. Runtime behaviour described on the page is unverified. The page states no pricing and no licence, so both remain unknown.

Access & freshness

Costs

The page states no prices, quotas, rate limits or usage limits. It does not say whether using the SDK consumes Copilot premium requests, requires a paid plan or incurs charges when you bring your own provider key. Cost is unknown.

The Learn more list mentions BYOK (bring your own key) using keys from Microsoft Foundry, OpenAI and similar providers. That implies provider-side billing could apply in that mode, but the page gives no figures and the linked page is outside this page. The weather handler uses generated or fixed data rather than calling a weather API. Charges for running the assistant are unknown from this page.

Rights and licence

The page does not state a licence for the SDK, the code samples or the documentation text. It links to SDK repositories and READMEs on GitHub, but those pages are outside this page, so the SDK's licence and reuse terms are unknown.

The page is documentation published by GitHub. The samples are evidently meant to be copied and run, but the page contains no explicit permission statement. Check the SDK repository's licence file and GitHub's documentation terms before redistributing the code or the text.

Freshness

The page text was captured on 12 November 2026. That date shows when the text was obtained, not when it was published. The page shows no publication or last-updated date and no SDK version, so it is unknown how current the page is or whether it matches current SDK releases. Check the live page and the SDK release notes before relying on specific package, method or option names.

Suggested next steps

Before starting, find out the authentication requirements for your chosen setup, such as Copilot CLI sign-in or BYOK, using the linked Authentication and BYOK pages, and run copilot --version to check the CLI. This page does not state prices, plans or quotas, so confirm any costs separately before relying on the SDK.

Pick one language. In a throwaway directory, install the SDK as described in Step 1, then follow Steps 2 to 4. Replace the random weather handler with a real function you control. Once you understand which permission requests the CLI raises, swap the approve-all permission handler for a restrictive one. If you expose the CLI as a headless server, keep it on loopback or add network controls and authentication.

For production work, read the language README for your SDK, check its licence and current version in the repository, and check the telemetry content-capture setting before enabling tracing.

Evidence for this report

selected-page.txtselected · checked 2026-11-12