copilot-sdk
AGENTS.md11k starsChanged 3 months agoMITView on GitHub
Quick purpose: Help contributors and AI coding agents quickly understand this mono-repo and be productive (build, test, add SDK features, add E2E tests). ✅ <SDK_ROOT> means this directory, whether it is checked out as a standalone repository or nested under another repository. - Start with SDK development setup for layout-specific prerequisites and dependency preparation; select only the languages needed. - Monorepo helpers: use the portable package scripts from <SDK_ROOT>: - Build all six SDKs: npm --prefix <SDK_ROOT> run build -…
Trending
Steady talk.about the whole repository
Who's talking about github/copilot-sdk
- @kaylacinnamon.bsky.social“I built a web app with the GitHub Copilot SDK to make analyzing log files easier. It'll summarize them, …”Bluesky · Jan 22, 2026 · 66 likes
- @cassidoo.co“The @github.com Copilot SDK is live and it's really awesome! Learn more about it and try it out: …”Bluesky · Jan 22, 2026 · 63 likes
- @github.com“The GitHub Copilot SDK is here 🙌 You can take the same Copilot agentic core that powers GitHub Copilot CLI …”Bluesky · Jan 22, 2026 · 30 likes
- openclaw/openclaw“[Feature]: Copilot-sdk instead of proxy”GitHub · Jan 24, 2026 · 13 reactions
- KeygraphHQ/shannon“[FEATURE]: Add GitHub Copilot SDK as an AI provider option”GitHub · Mar 4, 2026 · 8 reactions
The biggest 5 of 25 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 25
Talked about on GitHub, Bluesky and Hacker News (25 times).
On GitHub · 13
- Jan 24, 2026[Feature]: Copilot-sdk instead of proxy — openclaw/openclaw13 reactions · 4 comments
- Mar 4, 2026[FEATURE]: Add GitHub Copilot SDK as an AI provider option — KeygraphHQ/shannon8 reactions · 1 comment
- Aug 20, 2026Allow Canvas extensions to open or focus an existing local session — github/app3 reactions
- Mar 10, 2026Make RequestIdSTJsonConverter public for AOT/trimming compatibility — microsoft/vs-streamjsonrpc3 reactions
- Jan 22, 2026.NET: Add AIAgent implementation for Github Copilot SDK — microsoft/agent-framework3 reactions · 3 comments
8 more on GitHub
- Aug 1, 2026BYOK Responses streaming drops apply_patch input before execution — github/copilot-cli2 reactions · 1 comment
- Jan 21, 2026Bump github-copilot-sdk from 0.1.13 to 0.1.14 in the uv-all group — Ven0m0/gemini-web-wrapper2 reactions · 1 comment
- Oct 1, 2026Add support for gpt-6.1-sol — github/gh-aw1 reaction
- Sep 24, 2026build(deps): bump github.com/github/copilot-sdk/go from 0.1.25 to 1.0.14 — orka-agents/orka1 reaction · 1 comment
- May 27, 2026Rust SDK? — openai/codex1 reaction · 3 comments
- May 5, 2026Provider Request: GitHub SDK / with github.com + company.ghe.com support — vectorize-io/hindsight1 reaction · 1 comment
- Feb 11, 2026CI Failure DoctorBuild failure after copilot-sdk upgrade to v0.1.21 — devantler-tech/ksail1 reaction · 2 comments
- Jan 27, 20260xsarawut.base.eth — base/docs1 reaction
On Bluesky · 11
- Jan 22, 2026I built a web app with the GitHub Copilot SDK to make analyzing log files easier. It'll summarize them, provide a root cause analysis, and… — @kaylacinnamon.bsky.social66 likes and reposts · 3 replies
- Jan 22, 2026The @github.com Copilot SDK is live and it's really awesome! Learn more about it and try it out: github.com/github/copil... — @cassidoo.co63 likes and reposts · 5 replies
- Jan 22, 2026The GitHub Copilot SDK is here 🙌 You can take the same Copilot agentic core that powers GitHub Copilot CLI and embed it in any… — @github.com30 likes and reposts · 4 replies
- Jan 28, 2026Now you can integrate #Microsoft #Copilot #CodingAgent via SDK into your app. Java, .NET/C#, Python, TypeScript, Go bindings MIT license… — @qdrddr.bsky.social3 likes and reposts
- Jan 27, 2026GitHub ha soltado hace unos días una bomba para devs 🚀 Con el GitHub Copilot SDK ahora puedes meter un agente de IA real (planifica,… — @mouredev.com3 likes and reposts
6 more on Bluesky
- Apr 4, 2026📦 github / copilot-sdk ⭐ 8,195 (+40) 🗒 TypeScript Multi-platform SDK for integrating GitHub Copilot Agent into apps and services — @github-trending-js.bsky.social2 likes and reposts
- Feb 9, 2026Have you used the GitHub Copilot SDK yet? If not… you probably should 👀 Repo 👉 github.com/github/copil... Tonight I had a bit of fun… — @thomast1906.bsky.social1 likes and repost
- Jan 26, 2026@github.com announced Copilot SDK, bringing the power of Copilot CLI to your apps. I built Flight School, an app that gives learning… — @chrisreddington.com1 likes and repost
- Jan 20, 2026GitHub Copilot CLI SDKs (github/copilot-sdk): Multi-platform SDK for integrating GitHub Copilot Agent into apps and services… — @aaronw.dev1 likes and repost
- Jan 29, 2026But ‘til then, check out some of the Copilot SDK projects we’re loving right now. If you haven’t given it a go, sharing some inspo in the… — @kdaigle.xmirror.bot0 likes and reposts · 1 reply
- Jan 23, 2026𝗚𝗶𝘁𝗛𝘂𝗯 𝗼𝗽𝗲𝗻𝘀 𝗶𝘁𝘀 𝗖𝗼𝗽𝗶𝗹𝗼𝘁 𝗖𝗟𝗜 𝗮𝘀 𝗮 𝗽𝗿𝗼𝗴𝗿𝗮𝗺𝗺𝗮𝗯𝗹𝗲 𝗦𝗗𝗞 💯 🚀 Now in technical preview, the GitHub… — @inakibes.bsky.social0 likes and reposts · 1 reply
On Hacker News · 1
- Jan 22, 2026GitHub Copilot CLI SDKs3 points
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- dotnet/test/E2E/AGENTS.mdAGENTS.md
- java/AGENTS.mdAGENTS.md
- rust/AGENTS.mdAGENTS.md
- agentic-workflowsSkill
- sdk-java-e2e-testSkill
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Test harness & E2E: <SDK_ROOT>/test/harness/*, Python harness wrapper <SDK_ROOT>/python/e2e/testharness/proxy.py
- Distinctive: line 25
Start with SDK development setup for layout-specific prerequisites and dependency preparation.
- Very specific: line 31
Run one language with a verb-first script such as npm --prefix <SDK_ROOT> run build:python or npm --prefix <SDK_ROOT> run check:rust.
- Very specific: line 43
.NET testing note: Never add InternalsVisibleTo to any project file when writing tests.
- Very specific: line 47
Java testing note: Use verify for integration tests, without -q or piping through grep.
- Distinctive: line 48
Use configured LSPs for supported operations like finding references instead of pattern matching, renaming symbols, etc.
- Distinctive: line 97
Verify command availability in the runtime root manifest first.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Copilot SDK — Assistant Instructions
Quick purpose: Help contributors and AI coding agents quickly understand this mono-repo and be productive (build, test, add SDK features, add E2E tests). ✅
<SDK_ROOT> means this directory, whether it is checked out as a standalone repository or nested under another repository.
Big picture 🔧
- The repo implements language SDKs (Node/TS, Python, Go, .NET, Rust, Java) that speak to the Copilot CLI via JSON‑RPC (see
<SDK_ROOT>/README.mdand<SDK_ROOT>/nodejs/src/client.ts). - Typical flow: your App → SDK client → JSON-RPC → Copilot CLI (server mode). The CLI must be installed or you can connect to an external CLI server via the
CLI URL option (language-specific casing)(Node:cliUrl, Go:CLIUrl, .NET:CliUrl, Python:cli_url, Java:cliUrl).
Most important files to read first 📚
- Top-level:
<SDK_ROOT>/README.md(architecture + quick start) - Language entry points:
<SDK_ROOT>/nodejs/src/client.ts,<SDK_ROOT>/python/README.md,<SDK_ROOT>/go/README.md,<SDK_ROOT>/dotnet/README.md - Java:
<SDK_ROOT>/java/AGENTS.md,<SDK_ROOT>/java/README.md,<SDK_ROOT>/java/pom.xml,<SDK_ROOT>/java/sdk/pom.xml,<SDK_ROOT>/java/copilot-native/pom.xml - Rust:
<SDK_ROOT>/rust/README.mdand<SDK_ROOT>/rust/AGENTS.md - Test harness & E2E:
<SDK_ROOT>/test/harness/*, Python harness wrapper<SDK_ROOT>/python/e2e/testharness/proxy.py - Schemas and type generation:
<SDK_ROOT>/scripts/codegen/and<SDK_ROOT>/java/scripts/codegen/ - Session snapshots used by E2E:
<SDK_ROOT>/test/snapshots/(used by the replay proxy) - Docs style guide:
<SDK_ROOT>/docs/AGENTS.md
Developer workflows (commands you’ll use often) ▶️
- Start with SDK development setup for layout-specific prerequisites and dependency preparation; select only the languages needed.
- Monorepo helpers: use the portable package scripts from
<SDK_ROOT>:- Build all six SDKs:
npm --prefix <SDK_ROOT> run build - Format all:
npm --prefix <SDK_ROOT> run format| Lint all:npm --prefix <SDK_ROOT> run lint| Test all:npm --prefix <SDK_ROOT> run test - Run one language with a verb-first script such as
npm --prefix <SDK_ROOT> run build:pythonornpm --prefix <SDK_ROOT> run check:rust. - In the canonical runtime-repository layout, build and test commands automatically refresh runtime schemas and the selected language projections; tests also request a fresh same-checkout CLI build, with unchanged Bazel actions remaining cached. Cross-target CI jobs use their native test commands with explicitly staged artifacts instead of this local facade. Standalone SDK commands retain pinned published-artifact behavior.
- See task scopes for default-test feature coverage and check side effects. Use the contributor guide's focused-test setup before invoking native runners.
- Build all six SDKs:
- Per-language:
- For normal runtime-repository testing, prefer
npm --prefix <SDK_ROOT> run test:<language>so schemas, generated clients, and the host CLI are current. Direct language-native commands below bypass those prerequisites; use them for focused tests after preparing the checkout, or in the standalone SDK repository. - Node:
cd <SDK_ROOT>/nodejs && npm ci→npm test(Vitest) - Python:
cd <SDK_ROOT>/python && uv sync --locked --all-extras --dev→uv run pytest(E2E tests use the test harness) - Go:
cd <SDK_ROOT>/go && go test ./... - .NET:
cd <SDK_ROOT>/dotnet && dotnet test test/GitHub.Copilot.SDK.Test.csproj - .NET testing note: Never add
InternalsVisibleToto any project file when writing tests. Tests must only access public APIs. - Java:
cd <SDK_ROOT>/java && ./mvnw clean verify(full build + tests),./mvnw -pl sdk spotless:apply(format code). Use.\mvnw.cmdon Windows. - Java single unit test:
./mvnw -pl sdk test -Dtest=CopilotClientTest; for integration tests use./mvnw -pl sdk verify -Dit.test="<TestClass>#<testMethod>" -Dcopilot.cli.path="$COPILOT_CLI_PATH", substituting your test's class/method after preparing the runtime. - Java formatting and Javadoc checks:
./mvnw -pl sdk spotless:check checkstyle:check| Build without tests:./mvnw clean package -DskipTests - Java testing note: Use
verifyfor integration tests, without-qor piping throughgrep. Never addInternalsVisibleToequivalent — tests must only access public APIs.
- For normal runtime-repository testing, prefer
- Use configured LSPs for supported operations like finding references instead of pattern matching, renaming symbols, etc.
Testing & E2E tips ⚙️
- In the runtime repository, write new E2E tests for shared runtime behavior
available entirely through the SDK in the TypeScript SDK suite
(
<SDK_ROOT>/nodejs/test/e2e/), nottest/cli/e2e/. Use CLI E2Es for terminal UI and CLI-only behavior. Add E2Es in Python, Go, .NET, Rust, or Java only for that language's SDK surface area, not for shared runtime functionality. In the runtime repository, invoke thee2e-test-authorandwriting-testsskills before writing TypeScript SDK E2Es. - E2E runs against a local replaying CAPI proxy (see
<SDK_ROOT>/test/harness/server.ts). Most language E2E harnesses spawn that server automatically (see<SDK_ROOT>/python/e2e/testharness/proxy.py). - Tests rely on YAML snapshot exchanges under
<SDK_ROOT>/test/snapshots/— to add test scenarios, add or edit the appropriate YAML files and update tests. - The harness prints
Listening: http://...— tests parse this URL to configure CLI or proxy. - Java E2E tests use
E2ETestContext, which manages aCapiProxybacked by the in-tree<SDK_ROOT>/test/harness. Maven'sgenerate-test-resourcesphase installs the harness and Node.js SDK dependencies in place. - Java test method names are converted to lowercase snake_case for snapshot filenames (avoids case collisions on macOS/Windows).
Project-specific conventions & patterns ✅
- Tools: each SDK has helper APIs to expose functions as tools; prefer the language's
DefineTool/@define_tool/CopilotTool.DefineToolpatterns (see language READMEs). - Infinite sessions are enabled by default and persist workspace state to
~/.copilot/session-state/{sessionId}; compaction events are emitted (session.compaction_start,session.compaction_complete). See language READMEs for usage. - Streaming: when
streaming/Streaming=trueyou receive delta events (assistant.message_delta,assistant.reasoning_delta) and final events (assistant.message,assistant.reasoning) — tests expect this behavior. - Type generation is centralized in
<SDK_ROOT>/scripts/codegen/. Standalone SDK generation downloads schemas from the pinnedgithub/copilot-clirelease; runtime-repository generation explicitly selects the checked-out runtime schemas. - Java code style: 4-space indent (Spotless + Eclipse formatter), fluent setter pattern for config classes, Javadoc required on public APIs (enforced by Checkstyle, except
json/eventspackages). - Java handlers return
CompletableFuture(the Java equivalent of C#async/await). When porting from .NET: convert properties → getters/fluent setters, use Jackson (ObjectMapper,@JsonProperty) for serialization.
Integration & environment notes ⚠️
- The SDK requires a Copilot CLI installation or an external server reachable via the
CLI URL option (language-specific casing)(Node:cliUrl, Go:CLIUrl, .NET:CliUrl, Python:cli_url, Java:cliUrl) orCOPILOT_CLI_PATH. - Generators and checks use language formatting tools in addition to npm dependencies. Use the prerequisite table and its linked manifests instead of assuming consumer minimum versions are sufficient. Nested runtime builds require the parent's Node/pnpm versions.
- Build tools and test runtimes differ: .NET SDK 10 does not supply the .NET 8 test runtime, Java builds require JDK 25 while compatibility tests also use JDK 17, and Rust SDK checks use their own pinned stable and nightly toolchains.
- Java build prerequisites, supported runtime versions, formatting, and Javadoc checks are documented in
<SDK_ROOT>/java/AGENTS.md.
Where to add new code or tests 🧭
- SDK code:
<SDK_ROOT>/nodejs/src,<SDK_ROOT>/python/copilot,<SDK_ROOT>/go,<SDK_ROOT>/dotnet/src,<SDK_ROOT>/rust/src,<SDK_ROOT>/java/sdk/src/main/java - Unit tests:
<SDK_ROOT>/nodejs/test,<SDK_ROOT>/python/*,<SDK_ROOT>/go/*,<SDK_ROOT>/dotnet/test,<SDK_ROOT>/rust/tests,<SDK_ROOT>/java/sdk/src/test/java - E2E tests:
<SDK_ROOT>/nodejs/test/e2e/for SDK-accessible runtime behavior; other*/e2e/folders and<SDK_ROOT>/java/sdk/src/test/java/**/e2e/for language-specific SDK behavior, using the shared replay proxy and<SDK_ROOT>/test/snapshots/ - Generated types: in the runtime repository, run
npm --prefix <SDK_ROOT> run generateorgenerate:<language>to derive committed schemas and clients from runtime HEAD. In the standalone SDK repository, the same commands use the pinned Copilot CLI release schemas. Update the pin only when intentionally advancing standalone generation inputs. - For schema-only generation, conditional freshness checks, and protocol generation, follow the contributor guide's revision-specific workflow. Verify command availability in the runtime root manifest first; do not import another branch's command assumptions or change development placeholders to bypass same-checkout artifact preparation.
Generation freshness
In the runtime repository, start contract changes with pnpm run generate:schemas
from the runtime root. If the public schemas changed relative to your task's base
revision, run pnpm run generate:sdk and commit the schemas and all changed SDK
projections together. Already-committed schema changes still require this step.
Generator, generator-dependency, and formatter changes also require regeneration,
as do handwritten Go/.NET declarations scanned for generated-name collisions.
Unchanged public schemas and generation inputs do not require SDK projections
to be regenerated for an internal-only runtime change.
For sdk-protocol-version.json or its generator, run
npm --prefix <SDK_ROOT>/nodejs run update:protocol-version and commit all six
language constants, including Java. Aggregate generate refreshes these too.
Single-language generation and CLI/SDK builds are not an all-six freshness check.
In both repository layouts, the Check schema and SDK freshness job in sdk.yml owns
generation and freshness checks for all six languages. Language-specific
workflows own their builds, tests, and documentation, not duplicate codegen jobs.
Boundaries — files you must NOT hand-edit ⛔
- Generated code (all six SDKs) — update its inputs or generators and use the
generation commands above. This covers schema-derived files, including Go's
go/z*.goandgo/rpc/z*.go, and protocol-version constants. Python'spython/copilot/generated/__init__.pyremains handwritten. <SDK_ROOT>/test/snapshots/— authoritative test fixtures; add/edit YAML here to change E2E behavior, but don't delete without understanding downstream impact.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

