github-copilot-sdk
Python SDK for GitHub Copilot CLI
Decision gist · record as of 2026-08-14
Yes. The SDK is actively maintained, has no known vulnerabilities, supports current Python versions (3.11–3.14), and offers low install friction. It is suitable for production use if you need programmatic access to Copilot. The in-process FFI transport is marked experimental; use stdio or TCP for stability if that matters to your use case.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Python 3.11+ required.
- SDK downloads a pinned Copilot CLI runtime binary on first use (cached locally); set COPILOT_SKIP_CLI_DOWNLOAD=1 to disable auto-download if providing your own binary via COPILOT_CLI_PATH.
- Low install friction with a pure-wheel distribution.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects.
last release 2026-08-14 (0 days) · last repo commit 2026-08-14 · 10,406 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,132,167 downloads/mo, #2,161 on PyPI
Alternatives
Verify before relying
pip install github-copilot-sdk
import asyncio
from copilot import CopilotClient
from copilot.session import PermissionHandler
async def main():
async with CopilotClient() as client:
async with await client.create_session(
on_permission_request=PermissionHandler.approve_all,
model="gpt-5"
) as session:
await session.send("What is 2+2?")
asyncio.run(main())- Whether the runtime download is required for all use cases or only specific transports (e.g., in-process FFI).
- Performance characteristics and latency of different transport modes (stdio vs. TCP vs. FFI).
- Whether the in-process FFI transport is production-ready despite being marked experimental.
What it is and what it does
This is a Python SDK that wraps GitHub Copilot CLI and exposes it as a programmatic JSON-RPC client. It lets you build applications that send messages to Copilot, receive streamed responses, and manage sessions—all via async Python code. The SDK handles three transport modes: stdio (spawning a local CLI process), TCP (connecting to a local server), and in-process FFI (loading the runtime's native library directly). It depends on httpx for HTTP, pydantic for data validation, and python-dateutil for timestamp handling.
The SDK is actively maintained and requires Python 3.11 or later. It ships as a pure wheel and automatically downloads a pinned Copilot runtime binary on first use (cached locally), though you can override this with environment variables or provide your own binary. Sessions are managed via async context managers for automatic cleanup, and the API supports real-time event streaming, session history retrieval, and custom permission handlers. Type hints are provided throughout.
Use it for
- Build a chat application that streams Copilot responses in real-time to end users.
- Integrate Copilot into an IDE or editor plugin for programmatic code completion and suggestions.
- Automate code review or documentation generation by sending code snippets to Copilot and capturing responses.
- Create a multi-turn conversation system that maintains session state and event history across requests.
- Deploy Copilot as a backend service by connecting multiple clients to a shared TCP-based runtime server.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The SDK is actively maintained, has no known vulnerabilities, supports current Python versions (3.11–3.14), and offers low install friction. It is suitable for production use if you need programmatic access to Copilot. The in-process FFI transport is marked experimental; use stdio or TCP for stability if that matters to your use case.
Install
github-copilot-sdk on PyPI
Before you install
Low install friction with a pure-wheel distribution. Active maintenance as of 2026-08-14 with no known vulnerabilities. Requires Python 3.11+ and downloads a pinned runtime binary on first use (or via explicit `download-runtime` command), which may require network access and disk space.
Python 3.11+ required. SDK downloads a pinned Copilot CLI runtime binary on first use (cached locally); set COPILOT_SKIP_CLI_DOWNLOAD=1 to disable auto-download if providing your own binary via COPILOT_CLI_PATH.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects.
Quickstart
pip install github-copilot-sdk
import asyncio
from copilot import CopilotClient
from copilot.session import PermissionHandler
async def main():
async with CopilotClient() as client:
async with await client.create_session(
on_permission_request=PermissionHandler.approve_all,
model="gpt-5"
) as session:
await session.send("What is 2+2?")
asyncio.run(main())
Verify before relying
- Whether the runtime download is required for all use cases or only specific transports (e.g., in-process FFI).
- Performance characteristics and latency of different transport modes (stdio vs. TCP vs. FFI).
- Whether the in-process FFI transport is production-ready despite being marked experimental.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagespython-dateutilpydantichttpx |
| Maintenance | Actively maintained 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,132,167 / month, #2,161 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: github_copilot_sdk-1.0.11-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “github copilot python sdk”
- github-copilot-sdkPython SDK for programmatic control of GitHub Copilot CLI via…
- agent-framework-github-copilotIntegrates GitHub Copilot's agentic capabilities into the Microsoft…
- copilotkitCopilotKit is a Python SDK for building AI copilots and agents that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also agent-framework-github-copilot · pykodi · microsoft-agents-copilotstudio-client · agent-framework-copilotstudio · ajsonrpc · copilotkit · jsonrpcclient · google-cloud-service-control · json-rpc · agent-client-protocol