Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@

# PRLabel: %Hosted Agents
/sdk/agentserver/ @JC-386 @lusu-msft
# PRLabel: %Hosted Agents
/sdk/agentserver/azure-ai-agentserver-githubcopilot/ @jodeklotzms @pradeepkintali @tendau @ganeshyb @code-vicar
Comment thread
pvaneck marked this conversation as resolved.

# ServiceLabel: %Hosted Agents
# ServiceOwners: @JC-386 @lusu-msft
Expand Down
2 changes: 1 addition & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,7 +2196,7 @@
"words": ["envml", "paginators"]
},
{
"filename": "sdk/agentserver/azure-ai-agentserver-github/**",
"filename": "sdk/agentserver/azure-ai-agentserver-githubcopilot/**",
"words": ["RAPI", "BYOK", "byok", "NCUS", "ncusacr", "fstring", "ename", "valeriepham", "coreai", "Vnext", "PYTHONIOENCODING"]
}
],
Expand Down
12 changes: 0 additions & 12 deletions sdk/agentserver/azure-ai-agentserver-github/samples/README.md

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# azure-ai-agentserver-github — Getting Started
# azure-ai-agentserver-githubcopilot — Getting Started

Instructions for using, testing, and contributing to the GitHub Copilot SDK adapter package for Azure AI Agent Server.

Expand All @@ -11,7 +11,7 @@ This package bridges the GitHub Copilot SDK to Azure AI Foundry's hosted agent p
**Hero code sample:**

```python
from azure.ai.agentserver.github import GitHubCopilotAdapter
from azure.ai.agentserver.githubcopilot import GitHubCopilotAdapter

adapter = GitHubCopilotAdapter.from_project(".")
adapter.run()
Expand All @@ -24,8 +24,8 @@ That's it — skill discovery, session management, auth, and RAPI event mapping
## Package Structure

```
azure-ai-agentserver-github/
├── azure/ai/agentserver/github/
azure-ai-agentserver-githubcopilot/
├── azure/ai/agentserver/githubcopilot/
│ ├── __init__.py ← Public API: GitHubCopilotAdapter, CopilotAdapter, ToolAcl
│ ├── _copilot_adapter.py ← Core + convenience adapter classes
│ ├── _copilot_request_converter.py ← RAPI request → Copilot prompt + attachments
Expand Down Expand Up @@ -54,8 +54,8 @@ This package is the **production home** for the adapter code that previously liv
| | foundry-declarative-agent | This package |
|---|---|---|
| **Purpose** | Reference repo with example agents, deploy scripts, skills | The adapter library itself |
| **Adapter code** | Vendored in `.foundry/runtime/vendor/` | First-party in `azure/ai/agentserver/github/` |
| **How agents use it** | Copies vendor code into container | `pip install azure-ai-agentserver-github` |
| **Adapter code** | Vendored in `.foundry/runtime/vendor/` | First-party in `azure/ai/agentserver/githubcopilot/` |
| **How agents use it** | Copies vendor code into container | `pip install azure-ai-agentserver-githubcopilot` |
| **Where it ships** | Not shipped — internal reference | Ships via Azure SDK pipeline |

Going forward, adapter code changes should be made here. The foundry-declarative-agent repo will eventually consume this package via `pip install` instead of vendoring.
Expand Down Expand Up @@ -93,7 +93,7 @@ Going forward, adapter code changes should be made here. The foundry-declarative
Install the package and its dependencies locally for validation and testing:

```bash
cd sdk/agentserver/azure-ai-agentserver-github
cd sdk/agentserver/azure-ai-agentserver-githubcopilot
pip install --pre -e ".[dev]" 2>/dev/null || pip install --pre azure-ai-agentserver-core github-copilot-sdk==0.2.0 azure-identity PyYAML python-dotenv
```

Expand All @@ -105,17 +105,17 @@ Always run these checks before any deploy:
# Syntax check
python -c "
import py_compile, sys
for f in ['azure/ai/agentserver/github/_copilot_adapter.py',
'azure/ai/agentserver/github/_copilot_response_converter.py',
'azure/ai/agentserver/github/_copilot_request_converter.py',
'azure/ai/agentserver/github/_tool_acl.py']:
for f in ['azure/ai/agentserver/githubcopilot/_copilot_adapter.py',
'azure/ai/agentserver/githubcopilot/_copilot_response_converter.py',
'azure/ai/agentserver/githubcopilot/_copilot_request_converter.py',
'azure/ai/agentserver/githubcopilot/_tool_acl.py']:
py_compile.compile(f, doraise=True)
print(f' OK {f}')
print('Syntax OK')
"

# Import check (catches missing deps, broken references)
python -c "from azure.ai.agentserver.github import GitHubCopilotAdapter; print('Imports OK')"
python -c "from azure.ai.agentserver.githubcopilot import GitHubCopilotAdapter; print('Imports OK')"
```

---
Expand Down Expand Up @@ -180,7 +180,7 @@ from dotenv import load_dotenv
load_dotenv(override=False)
logging.basicConfig(level=getattr(logging, os.environ.get("LOG_LEVEL", "INFO").upper(), logging.INFO))

from azure.ai.agentserver.github import GitHubCopilotAdapter
from azure.ai.agentserver.githubcopilot import GitHubCopilotAdapter
adapter = GitHubCopilotAdapter.from_project(".")
adapter.run()
```
Expand All @@ -197,7 +197,7 @@ my-agent/
│ ├── my-skill/SKILL.md
│ └── another/SKILL.md
├── Dockerfile
├── requirements.txt ← includes azure-ai-agentserver-github
├── requirements.txt ← includes azure-ai-agentserver-githubcopilot
└── .env
```

Expand Down Expand Up @@ -273,9 +273,9 @@ Bump the version deliberately and test before merging.
## Contributing

1. Get access: follow steps at `aka.ms/jointhesdk` (join Microsoft + Azure orgs, request Azure SDK Partners)
2. Branch from `feature/agentserver-github`
2. Branch from `feature/agentserver-githubcopilot`
3. Make changes, validate locally (syntax + import checks)
4. Deploy and test on ADC before pushing
5. PR against the feature branch

The adapter code is in `azure/ai/agentserver/github/`. Files prefixed with `_` are private implementation. The public API is exported from `__init__.py`.
The adapter code is in `azure/ai/agentserver/githubcopilot/`. Files prefixed with `_` are private implementation. The public API is exported from `__init__.py`.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ recursive-include doc *.rst *.md
include azure/__init__.py
include azure/ai/__init__.py
include azure/ai/agentserver/__init__.py
include azure/ai/agentserver/github/py.typed
include azure/ai/agentserver/githubcopilot/py.typed
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ event model and the Foundry Responses API (RAPI) protocol.
### Install the package

```bash
pip install azure-ai-agentserver-github
pip install azure-ai-agentserver-githubcopilot
```

### Quick start
Expand All @@ -27,7 +27,7 @@ pip install azure-ai-agentserver-github
from dotenv import load_dotenv
load_dotenv()

from azure.ai.agentserver.github import GitHubCopilotAdapter
from azure.ai.agentserver.githubcopilot import GitHubCopilotAdapter

adapter = GitHubCopilotAdapter.from_project(".")
adapter.run()
Expand Down Expand Up @@ -108,7 +108,7 @@ rules:
from dotenv import load_dotenv
load_dotenv()

from azure.ai.agentserver.github import GitHubCopilotAdapter
from azure.ai.agentserver.githubcopilot import GitHubCopilotAdapter

adapter = GitHubCopilotAdapter.from_project(".")
adapter.run()
Expand All @@ -118,7 +118,7 @@ adapter.run()

```python
from azure.identity import ManagedIdentityCredential
from azure.ai.agentserver.github import GitHubCopilotAdapter
from azure.ai.agentserver.githubcopilot import GitHubCopilotAdapter

credential = ManagedIdentityCredential()
adapter = GitHubCopilotAdapter.from_project(".", credential=credential)
Expand All @@ -128,7 +128,7 @@ adapter.run()
### With explicit skill directories

```python
from azure.ai.agentserver.github import GitHubCopilotAdapter
from azure.ai.agentserver.githubcopilot import GitHubCopilotAdapter

adapter = GitHubCopilotAdapter(
skill_directories=["/app/skills"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Usage::

from azure.ai.agentserver.github import GitHubCopilotAdapter
from azure.ai.agentserver.githubcopilot import GitHubCopilotAdapter

adapter = GitHubCopilotAdapter.from_project(".")
adapter.run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def _on_stream_event(event):

def get_trace_attributes(self):
attrs = super().get_trace_attributes()
attrs["service.namespace"] = "azure.ai.agentserver.github"
attrs["service.namespace"] = "azure.ai.agentserver.githubcopilot"
return attrs

def get_agent_identifier(self) -> str:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "azure-ai-agentserver-github"
name = "azure-ai-agentserver-githubcopilot"
dynamic = ["version", "readme"]
description = "GitHub Copilot SDK adapter for Azure AI Agent Server"
requires-python = ">=3.11"
Expand Down Expand Up @@ -41,7 +41,7 @@ exclude = [
]

[tool.setuptools.dynamic]
version = { attr = "azure.ai.agentserver.github._version.VERSION" }
version = { attr = "azure.ai.agentserver.githubcopilot._version.VERSION" }
readme = { file = ["README.md"], content-type = "text/markdown" }

[tool.setuptools.package-data]
Expand All @@ -55,7 +55,7 @@ lint.ignore = []
fix = false

[tool.ruff.lint.isort]
known-first-party = ["azure.ai.agentserver.github"]
known-first-party = ["azure.ai.agentserver.githubcopilot"]
combine-as-imports = true

[tool.azure-sdk-build]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Samples for azure-ai-agentserver-githubcopilot

## Quick start

```python
from azure.ai.agentserver.githubcopilot import GitHubCopilotAdapter

adapter = GitHubCopilotAdapter.from_project(".")
adapter.run()
```

See the [package README](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/agentserver/azure-ai-agentserver-githubcopilot) for environment variable configuration.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Integration Tests

End-to-end tests that deploy a minimal agent to Azure AI Foundry ADC
and verify the `azure-ai-agentserver-github` package works in a real
and verify the `azure-ai-agentserver-githubcopilot` package works in a real
hosted agent environment.

## Prerequisites
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from pathlib import Path

INTEGRATION_DIR = Path(__file__).resolve().parent
PACKAGE_ROOT = INTEGRATION_DIR.parent.parent # azure-ai-agentserver-github/
PACKAGE_ROOT = INTEGRATION_DIR.parent.parent # azure-ai-agentserver-githubcopilot/
TEST_AGENT_DIR = INTEGRATION_DIR / "test_agent"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from pathlib import Path

INTEGRATION_DIR = Path(__file__).resolve().parent
PROJECT_ROOT = INTEGRATION_DIR.parent.parent # azure-ai-agentserver-github/
PROJECT_ROOT = INTEGRATION_DIR.parent.parent # azure-ai-agentserver-githubcopilot/

# Add integration dir to path for _token_cache import
sys.path.insert(0, str(INTEGRATION_DIR))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ You are a helpful test assistant for the Azure AI Agent Server GitHub Copilot ad

You are friendly and concise. When asked what you can do, list your available skills.
When greeted, respond with a brief hello and mention that you are running on the
`azure-ai-agentserver-github` package.
`azure-ai-agentserver-githubcopilot` package.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Minimal test agent — proves the azure-ai-agentserver-github package works end-to-end."""
"""Minimal test agent — proves the azure-ai-agentserver-githubcopilot package works end-to-end."""

import logging
import os
Expand All @@ -8,7 +8,7 @@

logging.basicConfig(level=getattr(logging, os.environ.get("LOG_LEVEL", "INFO").upper(), logging.INFO))

from azure.ai.agentserver.github import GitHubCopilotAdapter
from azure.ai.agentserver.githubcopilot import GitHubCopilotAdapter

adapter = GitHubCopilotAdapter.from_project(".")
adapter.run()
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
azure-ai-agentserver-githubcopilot
python-dotenv
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ argument-hint: "[name]"
When the user greets you or asks you to say hello:

1. Respond with a friendly greeting
2. Mention the package name: `azure-ai-agentserver-github`
2. Mention the package name: `azure-ai-agentserver-githubcopilot`
3. Confirm that the skill system is working
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import pytest

from azure.ai.agentserver.core.models import CreateResponse
from azure.ai.agentserver.github._copilot_request_converter import (
from azure.ai.agentserver.githubcopilot._copilot_request_converter import (
CopilotRequestConverter,
ConvertedAttachments,
)
Expand Down
4 changes: 2 additions & 2 deletions sdk/agentserver/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ extends:
safeName: azureaiagentservercore
- name: azure-ai-agentserver-agentframework
safeName: azureaiagentserveragentframework
- name: azure-ai-agentserver-github
safeName: azureaiagentservergithub
- name: azure-ai-agentserver-githubcopilot
safeName: azureaiagentservergithubcopilot
Loading