copilot-sdk
Skill4 starsChanged 19 days agoMITView on GitHub
Use GitHub Copilot SDK to programmatically call Copilot from Python. Use when integrating AI capabilities via Copilot CLI into applications.
- Installs packages
16 other projects use a version of this.
Adopted by
Most recently taken up by
- alexander-kastil/copilot-harnesstheir own version, first seen Nov 8, 2026
- devantler-tech/ksailtheir own version, first seen Nov 7, 2026
- github/awesome-copilottheir own version, first seen Oct 25, 2026
- hoodini/ai-agents-skillstheir own version, first seen Oct 25, 2026
- Ronnasayd/aipptheir own version, first seen Oct 20, 2026
- ChatisTech/skillstheir own version, first seen Oct 11, 2026
Used with
Projects with it also use find-skills and security-review.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
VercelSkillfind-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Also in 3 projects that use this
SentrySkillsecurity-review
Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.
Also in 3 projects that use this
Other versions16 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 16
- github/awesome-copilot★ 41ksame name
- microsoft/agent-skills★ 3.2ksame name
- microsoft/skills★ 3.2ksame name
- microsoft/ghqr★ 528same name
- hoodini/ai-agents-skills★ 295same name
- devantler-tech/ksail★ 164same name
- Azure/contentflow★ 22same name
- alxayo/sec-check★ 17same name
- ChatisTech/skills★ 17same name
- shyamsridhar123/agentsmith-cli★ 17same name
6 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- audiobookshelfSkill
- audiobooksSkill
- ebookSkill
- imdbSkill
- internetarchiveSkill
- jellyfinSkill
- kavitaSkill
- libgenSkill
- nyaaSkill
- plexSkill
- qbittorrentSkill
- tvdbSkill
- ytsSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Copilot CLI: Must be installed (gh extension install github/gh-copilot)
- Very specific: line 24
Authentication: Must be logged into GitHub CLI (gh auth login)
“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Copilot SDK for Python
The GitHub Copilot SDK is a multi-platform SDK for integrating GitHub Copilot Agent into apps and services. It exposes the same engine behind Copilot CLI, providing a production-tested agent runtime you can invoke programmatically.
Note: This SDK is in technical preview and may change in breaking ways.
Reference
- Code Snippets:
scripts/ - GitHub Repository: https://github.com/github/copilot-sdk
- PyPI Package: https://pypi.org/project/github-copilot-sdk/
Prerequisites
- GitHub Copilot Subscription: Required
- Copilot CLI: Must be installed (
gh extension install github/gh-copilot) - Authentication: Must be logged into GitHub CLI (
gh auth login)
Installation
uv pip install github-copilot-sdkArchitecture
Your Application
|
SDK Client (Python)
| JSON-RPC
Copilot CLI (server mode)API Reference
CopilotClient Options
| Option | Type | Default | Description |
cli_path | str | "copilot" | Path to CLI executable |
cli_url | str | None | URL of existing CLI server |
cwd | str | None | Working directory for CLI process |
port | int | 0 | Server port (0 = random) |
use_stdio | bool | True | Use stdio transport |
auto_start | bool | True | Auto-start server |
auto_restart | bool | True | Auto-restart on crash |
CopilotClient Methods
| Method | Description |
await client.start() | Start the CLI server |
await client.stop() | Stop the CLI server |
await client.create_session(config) | Create a conversation session |
await client.resume_session(session_id) | Resume existing session |
await client.get_models() | Get available models |
SessionConfig
| Option | Type | Description |
model | str | Model to use ("gpt-5", "claude-sonnet-4.5", etc.) |
tools | list[Tool] | Custom tools exposed to the CLI |
streaming | bool | Enable streaming responses |
mcp_servers | dict | MCP server configurations |
Event Types
| Event Type | Description |
assistant.message | Final assistant message |
assistant.message_delta | Streaming message chunk |
session.idle | Session finished processing |
tool.call | Tool invocation |
error | Error event |
Available Free Models
gpt-5-mini
Basic Usage
import asyncio
from copilot import CopilotClient
async def main():
client = CopilotClient()
await client.start()
session = await client.create_session({"model": "gpt-4.1"})
response = await session.send_and_wait({"prompt": "What is Python?"})
print(response.data.content)
await session.destroy()
await client.stop()
asyncio.run(main())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.

