Skip to main content

GitHub Copilot SDK adapter for Azure AI Agent Server

Project description

Azure AI Agent Server – GitHub Copilot SDK Adapter

This package provides an adapter that lets you run a GitHub Copilot SDK session as an Azure AI Agent Server endpoint, in the same way that azure-ai-agentserver-langgraph and azure-ai-agentserver-agentframework wrap their respective frameworks.

Getting Started

Install

pip install azure-ai-agentserver-copilot

Prerequisites

  • Python 3.10+
  • GitHub Copilot CLI installed and in $PATH
  • Valid GitHub Copilot authentication (gh auth login)

Install azd app (Local Development)

azd app lets you run all project services locally with a single command, with auto-dependencies, a real-time dashboard, and AI-powered debugging via MCP.

  1. Install the Azure Developer CLI (if not already installed):

    # Windows
    winget install microsoft.azd
    
    # macOS
    brew tap azure/azd && brew install azd
    
    # Linux
    curl -fsSL https://aka.ms/install-azd.sh | bash
    
  2. Add the extension source and install azd app:

    azd extension source add -n jongio -t url -l https://jongio.github.io/azd-extensions/registry.json
    azd extension install jongio.azd.app
    
  3. Run the project:

    azd app run
    

Usage

import asyncio
from azure.ai.agentserver.copilot import from_copilot

async def main():
    agent = from_copilot({"model": "gpt-5"})
    await agent.run_async()

asyncio.run(main())

Once the server is running, send requests:

# Non-streaming
curl -sS -H "Content-Type: application/json" \
  -X POST http://localhost:8088/responses \
  -d '{"input":"What is the capital of France?","stream":false}'

# Streaming
curl -N -H "Content-Type: application/json" \
  -X POST http://localhost:8088/responses \
  -d '{"input":"Explain Python decorators briefly.","stream":true}'

Key Concepts

The adapter converts incoming OpenAI-format requests into Copilot SDK MessageOptions, runs them through a Copilot session, and converts the resulting SessionEvent objects back into OpenAI-format responses.

Both streaming (Server-Sent Events) and non-streaming (JSON) modes are supported.

Troubleshooting

Problem Fix
CopilotClient fails to start Ensure the Copilot CLI is installed and gh auth login has been run.
Timeout errors The default session timeout is 300 s. For long-running prompts, set a higher timeout.

Next Steps

See the samples directory for runnable examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file tonybaloney_azure_ai_agentserver_copilot-1.0.0b3.tar.gz.

File metadata

  • Download URL: tonybaloney_azure_ai_agentserver_copilot-1.0.0b3.tar.gz
  • Upload date:
  • Size: 76.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tonybaloney_azure_ai_agentserver_copilot-1.0.0b3.tar.gz
Algorithm Hash digest
SHA256 37082628b9781964fec1b8ab5196718393b047b28fea73918d4d5d727cd23f56
MD5 6d051516f8e22025aeff0cebf41bd843
BLAKE2b-256 c5942646af04f0e7011a8c0181696e2ae52a74132903c8bc4d6090c4085a5876

See more details on using hashes here.

File details

Details for the file tonybaloney_azure_ai_agentserver_copilot-1.0.0b3-py3-none-any.whl.

File metadata

  • Download URL: tonybaloney_azure_ai_agentserver_copilot-1.0.0b3-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tonybaloney_azure_ai_agentserver_copilot-1.0.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 397e82913b1951b75c7e204e31f0bc4d3e54dc2ca0ed0e24d4986cca98f108e8
MD5 54dccdc0ffd1873dff38798dc48fcc43
BLAKE2b-256 d0dd06281cdb78bbe1db791d2345bd4b9d2121247b04b97e2f6a337ca573455c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page