copilot-sdk-gpt55

A guide for building agents with the GitHub Copilot SDK and Microsoft's Agent Framework using GPT-5.5, including their required imports and permission handling.

In plain words
What is it for?
Creating a GitHub Copilot agent with local tools, configured timeouts, and an approved permission response.
Why use it?
It prevents code from using outdated agent-building patterns or skipping the required permission callback.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/microsoft/aks-lab-githubcopilot/copilot-sdk-gpt55
Any agent
npx skills add microsoft/AKS-Lab-GitHubCopilot --skill copilot-sdk-gpt55
Clone the repo
git clone --depth 1 https://github.com/microsoft/AKS-Lab-GitHubCopilot

Made for: Claude Code, Codex.

Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,499 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01499
Opus 5 $0.00000 $0.00749
Sonnet 5 $0.00000 $0.00300
Haiku 4.5 $0.00000 $0.00150

Measured 2d ago against content hash 2002c14763df, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

copilot-sdk-gpt55 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/copilot-sdk-gpt55/SKILL.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: GitHub Copilot SDK on gpt-5.5

Reflects the actual agent-framework[github-copilot] 1.3.x API installed in this repo. Earlier GitHubCopilotChatClient / ChatAgent(client=...) syntax is not valid here.

The two imports

from agent_framework.github import GitHubCopilotAgent, GitHubCopilotOptions
from copilot.generated.rpc import PermissionDecisionApproveOnce
from copilot.session import PermissionRequestResult

from src.shared.copilot import build_copilot_client

The one builder shape

def _approve_all(_request: object, _context: dict[str, str]) -> PermissionRequestResult:
    return PermissionDecisionApproveOnce()


async def build_agent(settings: Settings) -> _RunnableAgent:
    agent = GitHubCopilotAgent(
        instructions=SYSTEM_PROMPT,
        client=build_copilot_client(),
        name="<name>",
        description="...",
        tools=list(TOOLS),                       # local @tool functions, NEVER MCP
        default_options=GitHubCopilotOptions(
            model=settings.copilot_model,        # default "gpt-5.5"
            timeout=settings.copilot_timeout_seconds,
            on_permission_request=_approve_all,  # MANDATORY — see §Permissions
            mcp_servers={                        # specialists only; orchestrator omits this
                "<key>": {
                    "type": "http",
                    "url": settings.<which>_mcp_url,
                    "tools": ["*"],
                    "timeout": int(settings.copilot_timeout_seconds * 1000),
                },
            },
        ),
    )
    return _RunnableAgent(agent=agent)

_RunnableAgent is a @dataclass(frozen=True) adapter exposing async def run(self, message: str) -> AgentResponse[None]. The shared make_app calls .run(req.goal) on it.

Permissions (do NOT skip)

The Copilot SDK runs every tool call through a permission gate. The handler must return PermissionDecisionApproveOnce(). Without a handler, every call returns:

Read the full file on GitHub · 135 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 135 lines · 0 tokens per session scan A 2002c14763df

Subscribe to this mod's changes

copilot-sdk-gpt55 is a skill published in the GitHub repository microsoft/AKS-Lab-GitHubCopilot (7 stars, last pushed 28d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,499 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.