copilot-sdk skill
✓ 인증됨Python, TypeScript, Go 또는 .NET을 사용하여 에이전트 워크플로와 커스텀 도구를 애플리케이션에 내장합니다.
- GitHub 스타
- 41,038
- 파일
- 1
- 마지막 커밋
- 2026년 11월 11일
- 라이선스
- MIT
- 허용된 도구
- —
copilot-sdk skill은 무엇을 하나요?
copilot-sdk은(는) agent skill입니다. Python, TypeScript, Go 또는 .NET을 사용하여 에이전트 워크플로와 커스텀 도구를 애플리케이션에 내장합니다.
skill의 SKILL.md에서 생성된 요약입니다.
copilot-sdk skill 정보
에이전트 애플리케이션을 구축하는 개발자는 이 SDK를 사용하여 지능형 워크플로를 자체 소프트웨어에 직접 내장할 수 있습니다. 이 SDK는 Microsoft Copilot 하네스를 위한 프로그래밍 가능한 인터페이스 역할을 하며, 사용자가 에이전트 동작을 정의하는 동안 내부 런타임이 계획 수립, 도구 호출, 파일 편집과 같은 복잡한 작업을 관리합니다. Python, TypeScript, Go 및 .NET용으로 제공되어 다양한 개발 환경에서 쉽게 사용할 수 있습니다.
에이전트가 이 SKILL을 로드하면 실시간 사용자 경험을 위한 스트리밍 응답을 지원하는 검증된 프로덕션 런타임에 액세스할 수 있습니다. 개발자는 설명, 파라미터 스키마 및 핸들러 함수를 제공하여 커스텀 도구를 생성할 수 있습니다. 이를 통해 에이전트는 추론 과정에서 외부 데이터와 상호 작용하거나 특정 작업을 수행할 수 있습니다. 또한 이 툴킷은 세션 관리와 MCP server 연결을 지원하여 에이전트의 기능을 확장합니다.
agent가 수행할 수 있는 작업
- 1앱에 에이전트 워크플로 내장개발자는 Python 또는 TypeScript를 사용하여 기존 소프트웨어 제품에 프로그래밍 가능한 AI 에이전트를 통합할 수 있습니다.
- 2실시간 스트리밍 응답 구현어시스턴트 메시지가 생성되는 즉시 표시하여 더 나은 사용자 경험을 제공할 수 있습니다.
- 3커스텀 기능 도구 생성스키마와 핸들러를 사용하여 도구를 정의함으로써 AI 클라이언트에 날씨 데이터 가져오기와 같은 특정 기능을 부여할 수 있습니다.
- 4AI 에이전트 세션 관리개발자는 gpt-4.1과 같은 특정 모델과의 개별 상호 작용 세션을 프로그래밍 방식으로 생성하고 제어할 수 있습니다.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
copilot-sdk skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.Claude Code에 copilot-sdk skill 설치
~/.claude/skills/copilot-sdk/SKILL.md
$ npx degit github/awesome-copilot/skills/copilot-sdk ~/.claude/skills/copilot-sdkClaude Code (project)에 copilot-sdk skill 설치
.claude/skills/copilot-sdk/SKILL.md
$ npx degit github/awesome-copilot/skills/copilot-sdk .claude/skills/copilot-sdkCodex에 copilot-sdk skill 설치
~/.agents/skills/copilot-sdk/SKILL.md
$ npx degit github/awesome-copilot/skills/copilot-sdk ~/.agents/skills/copilot-sdkGemini CLI에 copilot-sdk skill 설치
~/.gemini/skills/copilot-sdk/SKILL.md
$ npx degit github/awesome-copilot/skills/copilot-sdk ~/.gemini/skills/copilot-sdkClaude.ai에 copilot-sdk skill 설치
npx degit github/awesome-copilot/skills/copilot-sdk copilot-sdk && zip -r copilot-sdk.zip copilot-sdk # claude.ai → Customize → Skills → + → Create skill → Upload a skill → copilot-sdk.zip
자동 검사
2026년 11월 13일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 보안 감사는 아닙니다. 에이전트가 실행하기 전에 스크립트를 읽어 보세요. 검사 방식
- 소스 저장소 연결 및 접근 가능github/awesome-copilot/skills/copilot-sdk is public and reachablegithub.com/github/awesome-copilot/tree/HEAD/skills/copilot-s ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit 2026-11-11github.com/github/awesome-copilot/commits ↗통과
- 스크립트에 다운로드 후 실행이나 자격 증명 탈취가 없음No scripts in the skill folder통과
- SKILL.md에 숨겨진 지침 없음No override phrases, safeguard switches, credential requests or hidden charactersgithub.com/github/awesome-copilot/blob/HEAD/skills/copilot-s ↗통과
- 사전 허용 도구가 제한됨No pre-approved tools; the agent asks before using onegithub.com/github/awesome-copilot/blob/HEAD/skills/copilot-s ↗통과
SKILL.md
GitHub에서 보기Microsoft Copilot SDK
Embed Copilot's agentic workflows in any application using Python, TypeScript, Go, or .NET.
Overview
The Microsoft Copilot SDK is transitioning from the GitHub Copilot SDK. It is becoming the programmable interface for the Microsoft Copilot harness, the shared agent foundation used across Microsoft and GitHub products. This transition is happening in phases, and no immediate changes are required for existing users. Package names, namespaces, and some documentation may continue to use GitHub branding during the transition.
This guide keeps the currently published package names and imports in its examples. Follow the official transition announcement for migration updates.
The SDK provides a production-tested agent runtime you can invoke programmatically. You define agent behavior, while Copilot handles planning, tool invocation, file edits, and more.
Prerequisites
- GitHub Copilot access and an authenticated environment
- Language runtime: Node.js ^20.19.0 or >=22.12.0, Python 3.11+, Go 1.24+, or a .NET Standard 2.0-compatible implementation
- Go: GitHub Copilot CLI installed and authenticated (Installation guide)
The TypeScript, Python, and .NET packages use a bundled Copilot runtime by default, so they do not need a separate CLI installation.
Installation
Node.js/TypeScript
mkdir copilot-demo && cd copilot-demo
npm init -y --init-type module
npm install @github/copilot-sdk tsx
Python
pip install github-copilot-sdk
# Optional: pre-download the bundled runtime instead of downloading it on first use
python -m copilot download-runtime
Published Python wheels include a pinned runtime version. The pre-download command caches that runtime locally; if skipped, the SDK attempts to download it automatically on first use.
Go
mkdir copilot-demo && cd copilot-demo
go mod init copilot-demo
go get github.com/github/copilot-sdk/go
.NET
dotnet new console -n CopilotDemo && cd CopilotDemo
dotnet add package GitHub.Copilot.SDK
Quick Start
TypeScript
import { CopilotClient, approveAll } from "@github/copilot-sdk";
const client = new CopilotClient();
const session = await client.createSession({
onPermissionRequest: approveAll,
model: "gpt-4.1",
});
const response = await session.sendAndWait({ prompt: "What is 2 + 2?" });
console.log(response?.data.content);
await client.stop();
process.exit(0);
Run: npx tsx index.ts
Python
import asyncio
from copilot import CopilotClient, PermissionHandler
async def main():
async with CopilotClient() as client:
async with await client.create_session(
on_permission_request=PermissionHandler.approve_all,
model="gpt-4.1",
) as session:
response = await session.send_and_wait("What is 2 + 2?")
print(response.data.content)
asyncio.run(main())
Go
package main
import (
"fmt"
"log"
"os"
copilot "github.com/github/copilot-sdk/go"
)
func main() {
client := copilot.NewClient(nil)
if err := client.Start(); err != nil {
log.Fatal(err)
}
defer client.Stop()
session, err := client.CreateSession(&copilot.SessionConfig{
OnPermissionRequest: copilot.PermissionHandler.ApproveAll,
Model: "gpt-4.1",
})
if err != nil {
log.Fatal(err)
}
response, err := session.SendAndWait(copilot.MessageOptions{Prompt: "What is 2 + 2?"}, 0)
if err != nil {
log.Fatal(err)
}
fmt.Println(*response.Data.Content)
os.Exit(0)
}
.NET (C#)
using GitHub.Copilot.SDK;
await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
{
OnPermissionRequest = PermissionHandler.ApproveAll,
Model = "gpt-4.1",
});
var response = await session.SendAndWaitAsync(new MessageOptions { Prompt = "What is 2 + 2?" });
Console.WriteLine(response?.Data.Content);
Run: dotnet run
Streaming Responses
Enable real-time output for better UX:
TypeScript
import { CopilotClient, approveAll, SessionEvent } from "@github/copilot-sdk";
const client = new CopilotClient();
const session = await client.createSession({
onPermissionRequest: approveAll,
model: "gpt-4.1",
streaming: true,
});
session.on((event: SessionEvent) => {
if (event.type === "assistant.message_delta") {
process.stdout.write(event.data.deltaContent);
}
if (event.type === "session.idle") {
console.log(); // New line when done
}
});
await session.sendAndWait({ prompt: "Tell me a short joke" });
await client.stop();
process.exit(0);
Python
import asyncio
import sys
from copilot import CopilotClient, PermissionHandler
from copilot.generated.session_events import SessionEventType
async def main():
async with CopilotClient() as client:
async with await client.create_session(
on_permission_request=PermissionHandler.approve_all,
model="gpt-4.1",
streaming=True,
) as session:
def handle_event(event):
if event.type == SessionEventType.ASSISTANT_MESSAGE_DELTA:
sys.stdout.write(event.data.delta_content)
sys.stdout.flush()
if event.type == SessionEventType.SESSION_IDLE:
print()
session.on(handle_event)
await session.send_and_wait("Tell me a short joke")
asyncio.run(main())
Go
session, err := client.CreateSession(&copilot.SessionConfig{
OnPermissionRequest: copilot.PermissionHandler.ApproveAll,
Model: "gpt-4.1",
Streaming: true,
})
session.On(func(event copilot.SessionEvent) {
if event.Type == "assistant.message_delta" {
fmt.Print(*event.Data.DeltaContent)
}
if event.Type == "session.idle" {
fmt.Println()
}
})
_, err = session.SendAndWait(copilot.MessageOptions{Prompt: "Tell me a short joke"}, 0)
.NET
await using var session = await client.CreateSessionAsync(new SessionConfig
{
OnPermissionRequest = PermissionHandler.ApproveAll,
Model = "gpt-4.1",
Streaming = true,
});
session.On(ev =>
{
if (ev is AssistantMessageDeltaEvent deltaEvent)
Console.Write(deltaEvent.Data.DeltaContent);
if (ev is SessionIdleEvent)
Console.WriteLine();
});
await session.SendAndWaitAsync(new MessageOptions { Prompt = "Tell me a short joke" });
Custom Tools
Define tools that Copilot can invoke during reasoning. When you define a tool, you tell Copilot:
- What the tool does (description)
- What parameters it needs (schema)
- What code to run (handler)
TypeScript (JSON Schema)
import { CopilotClient, approveAll, defineTool, SessionEvent } from "@github/copilot-sdk";
const getWeather = defineTool("get_weather", {
description: "Get the current weather for a city",
parameters: {
type: "object",
properties: {
city: { type: "string", description: "The city name" },
},
required: ["city"],
},
handler: async (args: { city: string }) => {
const { city } = args;
// In a real app, call a weather API here
const conditions = ["sunny", "cloudy", "rainy", "partly cloudy"];
const temp = Math.floor(Math.random() * 30) + 50;
const condition = conditions[Math.floor(Math.random() * conditions.length)];
return { city, temperature: `${temp}°F`, condition };
},
});
const client = new CopilotClient();
const session = await client.createSession({
onPermissionRequest: approveAll,
model: "gpt-4.1",
streaming: true,
tools: [getWeather],
});
session.on((event: SessionEvent) => {
if (event.type === "assistant.message_delta") {
process.stdout.write(event.data.deltaContent);
}
});
await session.sendAndWait({
prompt: "What's the weather like in Seattle and Tokyo?",
});
await client.stop();
process.exit(0);
Python (Pydantic)
import asyncio
import random
import sys
from copilot import CopilotClient, PermissionHandler
from copilot.tools import define_tool
from copilot.generated.session_events import SessionEventType
from pydantic import BaseModel, Field
class GetWeatherParams(BaseModel):
city: str = Field(description="The name of the city to get weather for")
@define_tool(description="Get the current weather for a city")
async def get_weather(params: GetWeatherParams) -> dict:
city = params.city
conditions = ["sunny", "cloudy", "rainy", "partly cloudy"]
temp = random.randint(50, 80)
condition = random.choice(conditions)
return {"city": city, "temperature": f"{temp}°F", "condition": condition}
async def main():
async with CopilotClient() as client:
async with await client.create_session(
on_permission_request=PermissionHandler.approve_all,
model="gpt-4.1",
streaming=True,
tools=[get_weather],
) as session:
def handle_event(event):
if event.type == SessionEventType.ASSISTANT_MESSAGE_DELTA:
sys.stdout.write(event.data.delta_content)
sys.stdout.flush()
session.on(handle_event)
await session.send_and_wait(
"What's the weather like in Seattle and Tokyo?"
)
asyncio.run(main())
Go
type WeatherParams struct {
City string `json:"city" jsonschema:"The city name"`
}
type WeatherResult struct {
City string `json:"city"`
Temperature string `json:"temperature"`
Condition string `json:"condition"`
}
getWeather := copilot.DefineTool(
"get_weather",
"Get the current weather for a city",
func(params WeatherParams, inv copilot.ToolInvocation) (WeatherResult, error) {
conditions := []string{"sunny", "cloudy", "rainy", "partly cloudy"}
temp := rand.Intn(30) + 50
condition := conditions[rand.Intn(len(conditions))]
return WeatherResult{
City: params.City,
Temperature: fmt.Sprintf("%d°F", temp),
Condition: condition,
}, nil
},
)
session, _ := client.CreateSession(&copilot.SessionConfig{
OnPermissionRequest: copilot.PermissionHandler.ApproveAll,
Model: "gpt-4.1",
Streaming: true,
Tools: []copilot.Tool{getWeather},
})
.NET (Microsoft.Extensions.AI)
using GitHub.Copilot.SDK;
using Microsoft.Extensions.AI;
using System.ComponentModel;
var getWeather = AIFunctionFactory.Create(
([Description("The city name")] string city) =>
{
var conditions = new[] { "sunny", "cloudy", "rainy", "partly cloudy" };
var temp = Random.Shared.Next(50, 80);
var condition = conditions[Random.Shared.Next(conditions.Length)];
return new { city, temperature = $"{temp}°F", condition };
},
"get_weather",
"Get the current weather for a city"
);
await using var session = await client.CreateSessionAsync(new SessionConfig
{
OnPermissionRequest = PermissionHandler.ApproveAll,
Model = "gpt-4.1",
Streaming = true,
Tools = [getWeather],
});
How Tools Work
When Copilot decides to call your tool:
- Copilot sends a tool call request with the parameters
- The SDK runs your handler function
- The result is sent back to Copilot
- Copilot incorporates the result into its response
Copilot decides when to call your tool based on the user's question and your tool's description.
Interactive CLI Assistant
Build a complete interactive assistant:
TypeScript
import { CopilotClient, approveAll, defineTool, SessionEvent } from "@github/copilot-sdk";
import * as readline from "readline";
const getWeather = defineTool("get_weather", {
description: "Get the current weather for a city",
parameters: {
type: "object",
properties: {
city: { type: "string", description: "The city name" },
},
required: ["city"],
},
handler: async ({ city }) => {
const conditions = ["sunny", "cloudy", "rainy", "partly cloudy"];
const temp = Math.floor(Math.random() * 30) + 50;
const condition = conditions[Math.floor(Math.random() * conditions.length)];
return { city, temperature: `${temp}°F`, condition };
},
});
const client = new CopilotClient();
const session = await client.createSession({
onPermissionRequest: approveAll,
model: "gpt-4.1",
streaming: true,
tools: [getWeather],
});
session.on((event: SessionEvent) => {
if (event.type === "assistant.message_delta") {
process.stdout.write(event.data.deltaContent);
}
});
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
console.log("Weather Assistant (type 'exit' to quit)");
console.log("Try: 'What's the weather in Paris?'\n");
const prompt = () => {
rl.question("You: ", async (input) => {
if (input.toLowerCase() === "exit") {
await client.stop();
rl.close();
return;
}
process.stdout.write("Assistant: ");
await session.sendAndWait({ prompt: input });
console.log("\n");
prompt();
});
};
prompt();
Python
import asyncio
import random
import sys
from copilot import CopilotClient, PermissionHandler
from copilot.tools import define_tool
from copilot.generated.session_events import SessionEventType
from pydantic import BaseModel, Field
class GetWeatherParams(BaseModel):
city: str = Field(description="The name of the city to get weather for")
@define_tool(description="Get the current weather for a city")
async def get_weather(params: GetWeatherParams) -> dict:
conditions = ["sunny", "cloudy", "rainy", "partly cloudy"]
temp = random.randint(50, 80)
condition = random.choice(conditions)
return {"city": params.city, "temperature": f"{temp}°F", "condition": condition}
async def main():
async with CopilotClient() as client:
async with await client.create_session(
on_permission_request=PermissionHandler.approve_all,
model="gpt-4.1",
streaming=True,
tools=[get_weather],
) as session:
def handle_event(event):
if event.type == SessionEventType.ASSISTANT_MESSAGE_DELTA:
sys.stdout.write(event.data.delta_content)
sys.stdout.flush()
session.on(handle_event)
print("Weather Assistant (type 'exit' to quit)")
print("Try: 'What's the weather in Paris?'\n")
while True:
try:
user_input = input("You: ")
except EOFError:
break
if user_input.lower() == "exit":
break
sys.stdout.write("Assistant: ")
await session.send_and_wait(user_input)
print("\n")
asyncio.run(main())
MCP Server Integration
Connect to MCP (Model Context Protocol) servers for pre-built tools. Connect to GitHub's MCP server for repository, issue, and PR access:
TypeScript
const session = await client.createSession({
onPermissionRequest: approveAll,
model: "gpt-4.1",
mcpServers: {
github: {
type: "http",
url: "https://api.githubcopilot.com/mcp/",
},
},
});
Python
async with await client.create_session(
on_permission_request=PermissionHandler.approve_all,
model="gpt-4.1",
mcp_servers={
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/",
},
},
) as session:
...
Go
session, _ := client.CreateSession(&copilot.SessionConfig{
OnPermissionRequest: copilot.PermissionHandler.ApproveAll,
Model: "gpt-4.1",
MCPServers: map[string]copilot.MCPServerConfig{
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/",
},
},
})
.NET
await using var session = await client.CreateSessionAsync(new SessionConfig
{
OnPermissionRequest = PermissionHandler.ApproveAll,
Model = "gpt-4.1",
McpServers = new Dictionary<string, McpServerConfig>
{
["github"] = new McpServerConfig
{
Type = "http",
Url = "https://api.githubcopilot.com/mcp/",
},
},
});
Custom Agents
Define specialized AI personas for specific tasks:
TypeScript
const session = await client.createSession({
onPermissionRequest: approveAll,
model: "gpt-4.1",
customAgents: [{
name: "pr-reviewer",
displayName: "PR Reviewer",
description: "Reviews pull requests for best practices",
prompt: "You are an expert code reviewer. Focus on security, performance, and maintainability.",
}],
});
Python
async with await client.create_session(
on_permission_request=PermissionHandler.approve_all,
model="gpt-4.1",
custom_agents=[{
"name": "pr-reviewer",
"display_name": "PR Reviewer",
"description": "Reviews pull requests for best practices",
"prompt": "You are an expert code reviewer. Focus on security, performance, and maintainability.",
}],
) as session:
...
System Message
Customize the AI's behavior and personality:
TypeScript
const session = await client.createSession({
onPermissionRequest: approveAll,
model: "gpt-4.1",
systemMessage: {
content: "You are a helpful assistant for our engineering team. Always be concise.",
},
});
Python
async with await client.create_session(
on_permission_request=PermissionHandler.approve_all,
model="gpt-4.1",
system_message={
"content": "You are a helpful assistant for our engineering team. Always be concise.",
},
) as session:
...
External CLI Server
Run the CLI in server mode separately and connect the SDK to it. Useful for debugging, resource sharing, or custom environments.
Start CLI in Server Mode
copilot --server --port 4321
Connect SDK to External Server
TypeScript
const client = new CopilotClient({
cliUrl: "localhost:4321"
});
const session = await client.createSession({
onPermissionRequest: approveAll,
model: "gpt-4.1",
});
Python
from copilot import CopilotClient, PermissionHandler, RuntimeConnection
async with CopilotClient(
connection=RuntimeConnection.for_uri("localhost:4321")
) as client:
async with await client.create_session(
on_permission_request=PermissionHandler.approve_all,
model="gpt-4.1",
) as session:
...
Go
client := copilot.NewClient(&copilot.ClientOptions{
CLIUrl: "localhost:4321",
})
if err := client.Start(); err != nil {
log.Fatal(err)
}
session, _ := client.CreateSession(&copilot.SessionConfig{
OnPermissionRequest: copilot.PermissionHandler.ApproveAll,
Model: "gpt-4.1",
})
.NET
using var client = new CopilotClient(new CopilotClientOptions
{
CliUrl = "localhost:4321"
});
await using var session = await client.CreateSessionAsync(new SessionConfig
{
OnPermissionRequest = PermissionHandler.ApproveAll,
Model = "gpt-4.1",
});
Note: When configured to use an external server, the SDK manages only its connection and does not manage the external process.
Event Types
| Event | Description |
|---|---|
user.message |
User input added |
assistant.message |
Complete model response |
assistant.message_delta |
Streaming response chunk |
assistant.reasoning |
Model reasoning (model-dependent) |
assistant.reasoning_delta |
Streaming reasoning chunk |
tool.execution_start |
Tool invocation started |
tool.execution_complete |
Tool execution finished |
session.idle |
No active processing |
session.error |
Error occurred |
Client Configuration
| Option | Description | Default |
|---|---|---|
cliPath |
Path to Copilot CLI executable | System PATH |
cliUrl |
Connect to existing server (e.g., "localhost:4321") | None |
port |
Server communication port | Random |
useStdio |
Use stdio transport instead of TCP | true |
logLevel |
Logging verbosity | "info" |
autoStart |
Launch server automatically | true |
autoRestart |
Restart on crashes | true |
cwd |
Working directory for CLI process | Inherited |
Session Configuration
| Option | Description |
|---|---|
model |
LLM to use ("gpt-4.1", "claude-sonnet-4.5", etc.) |
sessionId |
Custom session identifier |
tools |
Custom tool definitions |
mcpServers |
MCP server connections |
customAgents |
Custom agent personas |
systemMessage |
Override default system prompt |
streaming |
Enable incremental response chunks |
availableTools |
Whitelist of permitted tools |
excludedTools |
Blacklist of disabled tools |
Session Persistence
Save and resume conversations across restarts:
Create with Custom ID
const session = await client.createSession({
onPermissionRequest: approveAll,
sessionId: "user-123-conversation",
model: "gpt-4.1"
});
Resume Session
const session = await client.resumeSession("user-123-conversation", { onPermissionRequest: approveAll });
await session.send({ prompt: "What did we discuss earlier?" });
List and Delete Sessions
const sessions = await client.listSessions();
await client.deleteSession("old-session-id");
Error Handling
try {
const client = new CopilotClient();
const session = await client.createSession({
onPermissionRequest: approveAll,
model: "gpt-4.1",
});
const response = await session.sendAndWait(
{ prompt: "Hello!" },
30000 // timeout in ms
);
} catch (error) {
if (error.code === "ENOENT") {
console.error("Copilot CLI not installed");
} else if (error.code === "ECONNREFUSED") {
console.error("Cannot connect to Copilot server");
} else {
console.error("Error:", error.message);
}
} finally {
await client.stop();
}
Graceful Shutdown
process.on("SIGINT", async () => {
console.log("Shutting down...");
await client.stop();
process.exit(0);
});
Common Patterns
Multi-turn Conversation
const session = await client.createSession({
onPermissionRequest: approveAll,
model: "gpt-4.1",
});
await session.sendAndWait({ prompt: "My name is Alice" });
await session.sendAndWait({ prompt: "What's my name?" });
// Response: "Your name is Alice"
File Attachments
await session.send({
prompt: "Analyze this file",
attachments: [{
type: "file",
path: "./data.csv",
displayName: "Sales Data"
}]
});
Abort Long Operations
const timeoutId = setTimeout(() => {
session.abort();
}, 60000);
session.on((event) => {
if (event.type === "session.idle") {
clearTimeout(timeoutId);
}
});
Available Models
Query available models at runtime:
const models = await client.getModels();
// Returns: ["gpt-4.1", "gpt-4o", "claude-sonnet-4.5", ...]
이 스킬의 파일
1copilot-sdk skill 질문
Claude Code에 copilot-sdk skill을 어떻게 설치하나요?
npx degit github/awesome-copilot/skills/copilot-sdk ~/.claude/skills/copilot-sdk를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
copilot-sdk skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
Microsoft Copilot SDK에서 지원하는 프로그래밍 언어는 무엇인가요?
SDK는 Python, TypeScript, Go 및 .NET을 지원합니다.
TypeScript, Python 또는 .NET을 위해 별도의 CLI를 설치해야 하나요?
아니요, TypeScript, Python 및 .NET 패키지에는 Copilot 런타임이 기본적으로 포함되어 있습니다.