Copilot SDK: GitHub Multi-Provider Backend
The Copilot SDK backend wraps GitHub’s Copilot SDK (github-copilot-sdk), providing multi-provider agent capabilities with JSON-RPC event-driven execution.
Overview
- Status: Beta
- Provider support: Copilot, OpenAI, Azure, Anthropic, LiteLLM
- Built-in tools: shell, file_ops, git, web_search
- MCP support: No
- Architecture: Python SDK wrapper with CopilotClient singleton
Prerequisites
Install the Copilot CLI:
pip install github-copilot-sdkEnsure the copilot CLI is on your PATH. For the default Copilot provider, you need an active GitHub Copilot subscription.
Configuration
export POCKETPAW_AGENT_BACKEND="copilot_sdk"Backend-Specific Settings
| Setting | Env Variable | Default | Description |
|---|---|---|---|
copilot_sdk_provider | POCKETPAW_COPILOT_SDK_PROVIDER | "copilot" | Provider: copilot, openai, azure, anthropic, litellm |
copilot_sdk_model | POCKETPAW_COPILOT_SDK_MODEL | "" (auto) | Model to use |
copilot_sdk_max_turns | POCKETPAW_COPILOT_SDK_MAX_TURNS | 0 (unlimited) | Max turns per query |
Provider Configuration
export POCKETPAW_COPILOT_SDK_PROVIDER="copilot"# Uses your GitHub Copilot subscription, no separate API key neededexport POCKETPAW_COPILOT_SDK_PROVIDER="openai"export POCKETPAW_OPENAI_API_KEY="sk-..."export POCKETPAW_COPILOT_SDK_PROVIDER="azure"# Configure Azure OpenAI credentialsexport POCKETPAW_COPILOT_SDK_PROVIDER="anthropic"export POCKETPAW_ANTHROPIC_API_KEY="sk-ant-..."export POCKETPAW_COPILOT_SDK_PROVIDER="litellm"export POCKETPAW_LITELLM_API_BASE="http://localhost:4000"export POCKETPAW_LITELLM_MODEL="gpt-4o"Built-in Tools
| Copilot Tool | Policy Mapping |
|---|---|
shell | shell |
file_ops | write_file |
git | shell |
web_search | browser |
How It Works
- PocketPaw creates a
CopilotClientsingleton for the session - Messages are sent via the JSON-RPC event-driven interface
- The Copilot CLI handles tool execution and multi-turn reasoning
- History is injected for multi-turn context
- Responses stream back as
AgentEventobjects
When to Use
Choose Copilot SDK when:
- You have a GitHub Copilot subscription and want to use it as your agent backbone
- You want multi-provider flexibility (switch between Copilot, OpenAI, Azure, and Anthropic)
- You want git-aware coding assistance integrated into PocketPaw
Related
Claude Agent SDK
The recommended backend with native tools and MCP integration.
OpenAI Agents SDK
OpenAI’s agent framework with GPT models and Ollama support.
All Agent Backends
Compare all six backends side by side with capability badges.
Self-Host PocketPaw
Deploy PocketPaw on your own infrastructure.
Was this page helpful?