Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

Implements a GitHub Copilot Agent Skill that enables Copilot to invoke Microsoft Foundry Agent endpoints for advanced AI capabilities.

Implementation

Skill Definition (.github/skills/foundry-agent/SKILL.md)

  • YAML frontmatter with skill metadata following GitHub Copilot Agent Skills spec
  • Embedded implementation examples in Python, TypeScript, and C#
  • Error handling patterns for HTTP, timeout, connection, and auth failures

Client Examples (examples/)

  • Python implementation using requests with full error handling and CLI
  • TypeScript implementation using axios with type safety
  • Both support environment-based configuration and conversation context

Configuration

  • FOUNDRY_AGENT_ENDPOINT: Foundry Agent URL
  • FOUNDRY_AGENT_API_KEY: Optional authentication
  • VS Code setting: chat.useAgentSkills: true

Usage Pattern

# Python client example
client = FoundryAgentClient()
result = client.ask("Analyze the latest trends")

# Request payload
{
  "message": "user prompt",
  "conversation_id": "optional-uuid"
}

The skill automatically activates when Copilot detects user prompts requiring advanced AI processing beyond standard capabilities.

Files

  • .github/skills/foundry-agent/SKILL.md - Skill definition (222 lines)
  • examples/python_example.py - Python implementation (157 lines)
  • examples/typescript_example.ts - TypeScript implementation (180 lines)
  • examples/{requirements.txt,package.json} - Dependencies
  • README.md, ARCHITECTURE.md, examples/README.md - Documentation
  • .gitignore - Standard exclusions

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • your-foundry-endpoint.azure.com
    • Triggering command: /usr/bin/python3 python3 examples/python_example.py (dns block)
    • Triggering command: /usr/bin/python3 python3 ./examples/python_example.py Test the Foundry Agent integration (dns block)
    • Triggering command: /usr/bin/python3 python3 ./examples/python_example.py (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Github copilot skill example that calls foundry agent application.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 20, 2026 23:08
Co-authored-by: adyada <118839465+adyada@users.noreply.github.com>
Co-authored-by: adyada <118839465+adyada@users.noreply.github.com>
Co-authored-by: adyada <118839465+adyada@users.noreply.github.com>
Copilot AI changed the title [WIP] Add functionality to call foundry agent application Add GitHub Copilot Agent Skill for Foundry Agent integration Jan 20, 2026
Copilot AI requested a review from adyada January 20, 2026 23:16
@adyada adyada marked this pull request as ready for review January 21, 2026 02:08
def __init__(
self,
endpoint: Optional[str] = None,
api_key: Optional[str] = None
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot change it to use DefaultAzureCredential token based authentication

Returns:
The agent's response as a dictionary
"""
payload = {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot change it to openai responses API format

@adyada adyada merged commit ce402b8 into main Jan 24, 2026
Copilot AI requested a review from adyada January 24, 2026 01:04
Copilot stopped work on behalf of adyada due to an error January 24, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants