copilot-sdk

Embed GitHub Copilot agentic workflows into Python, TypeScript, Go, and .NET applications.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula --skill copilot-sdk-serpro-workshop-fortaleza
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: copilot-sdk
Source: https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula/tree/main/.github/skills/copilot-sdk
Command: npx skills add https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula --skill copilot-sdk-serpro-workshop-fortaleza

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building AI agents from scratch requires implementing orchestration, tool invocation, file editing, and model management yourself. This Skill guides you through embedding the production-tested GitHub Copilot agent runtime directly into your own applications using the Copilot SDK, so you define agent behavior while Copilot handles planning and execution. ## Core Features & Use Cases - Multi-language integration: Create agentic sessions in TypeScript, Python, Go, or .NET with streaming responses, session persistence, and multi-turn conversations. - Custom tools and MCP servers: Define tools the agent can invoke during reasoning, and connect to Model Context Protocol servers like the GitHub MCP server for repository, issue, and PR access. - Custom agents and system messages: Configure specialized AI personas and system prompts for tasks like PR review or domain-specific assistance. - Use Case: Build an interactive CLI weather assistant where the Copilot agent calls your custom get_weather tool, streams responses token by token, and maintains conversation context across turns. ## Quick Start Use the copilot-sdk skill to create a TypeScript application that starts a Copilot session with streaming enabled and asks the agent a question.

Frequently Asked Questions about copilot-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I embed a Copilot agent into my application?

Install the Copilot SDK package for your language, create a CopilotClient, then call createSession with a model and permission handler. Use sendAndWait to send prompts and receive responses, and always call client.stop() for cleanup.

How do I add custom tools the Copilot agent can call?

Define a tool with a name, description, parameter schema, and handler function, then pass it in the session's tools array. The agent decides when to invoke it based on the user's question and your tool description.

Which languages does the GitHub Copilot SDK support?

The SDK supports TypeScript and JavaScript on Node.js 18+, Python 3.8+, Go 1.21+, and .NET 8.0+. All languages require the GitHub Copilot CLI to be installed and authenticated first.

Can the Copilot SDK connect to MCP servers?

Yes, pass an mcpServers configuration when creating a session to connect to Model Context Protocol servers. For example, you can connect to the GitHub MCP server over HTTP to access repositories, issues, and pull requests.

Is the Copilot SDK ready for production use?

No, the SDK is in Technical Preview and may introduce breaking changes. It is not yet recommended for production; pin versions and retest when upgrading.

How do I resume a previous Copilot SDK session?

Create the session with a custom sessionId, then later call resumeSession with that same identifier to continue the conversation. You can also list and delete sessions through the client.