Simplify foundry-hosted-agent-copilotkit skill and add plugin with Learn + Foundry MCP (#4349)

* Simplify foundry-hosted-agent-copilotkit skill and add plugin

Rewrite the skill around Foundry-native primitives and the current
package lines (CopilotKit v2, @ag-ui 1.x, agent-framework-ag-ui 1.4,
azd azure.yaml-only hosted agents), verified end to end against a
deployed Foundry hosted agent with Playwright.

- Consolidate 6 references into wiring.md, hitl.md, troubleshooting.md
- Default wiring: FoundryAgent + AG-UI adapter gateway that keeps no
  thread state (Foundry conversation id is the AG-UI thread id)
- HITL via CopilotKit v2 useInterrupt; document two interop shims
- Drop obsolete workarounds for closed agent-framework issues
- Add foundry-hosted-agent-copilotkit plugin bundling the skill with
  Microsoft Learn and Foundry MCP servers

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address review: per-interrupt approvals, at-most-once wording, pinned ag-ui install

- hitl.md: render one card per open interrupt and resolve each by id;
  document how parallel gated calls surface with agent-framework-ag-ui 1.4.0
- wiring.md/SKILL.md: a pre-effect watermark is at-most-once; exactly-once
  needs a destination-enforced idempotency key or a single transaction
- wiring.md: install @ag-ui/client at the version the installed runtime pins

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Show conversation startup errors instead of an endless loading state

The wiring.md page example now checks the /api/thread response status,
validates the conv_ id, and renders caught network/JSON/HTTP errors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Aaron Powell <me@aaron-powell.com>
This commit is contained in:
Sunil Sattiraju
2026-10-07 17:00:22 +11:00
committed by GitHub
co-authored by Copilot Aaron Powell
parent 21c42ab3c0
commit 581d8099e4
14 changed files with 616 additions and 417 deletions
@@ -0,0 +1,24 @@
# Foundry Hosted Agent + CopilotKit Plugin
Build and evolve agentic web apps where a CopilotKit React frontend talks over the AG-UI protocol to a Microsoft Agent Framework agent running as a Microsoft Foundry hosted agent.
## What It Includes
### Skills
| Skill | Description |
| --- | --- |
| `/foundry-hosted-agent-copilotkit` | Choose the wiring, use Foundry-native primitives (conversations, durable approvals, background runs, Toolbox, memory, session files), add tools and human-in-the-loop approvals, deploy with `azd`, and debug the AG-UI event stream. |
### MCP Servers
| Server | Description |
| --- | --- |
| `microsoft-learn` | Microsoft Learn MCP server (`https://learn.microsoft.com/api/mcp`) for current Agent Framework and Foundry documentation and code samples. |
| `foundry` | Foundry MCP server (`https://mcp.ai.azure.com`) for inspecting Foundry projects, model deployments, and agents. Signs in with your Microsoft Entra ID account. |
## Requirements
- An Azure subscription with a Microsoft Foundry project (hosted agents are a paid preview service).
- Azure Developer CLI (`azd`) with the `azure.ai.agents` extension, and Azure CLI.
- Node.js and Python for the frontend, CopilotKit runtime, and AG-UI gateway.
@@ -0,0 +1,13 @@
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json",
"mcpServers": {
"microsoft-learn": {
"type": "streamable-http",
"url": "https://learn.microsoft.com/api/mcp"
},
"foundry": {
"type": "streamable-http",
"url": "https://mcp.ai.azure.com"
}
}
}
@@ -0,0 +1,27 @@
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "foundry-hosted-agent-copilotkit",
"description": "Build CopilotKit + AG-UI web apps on Microsoft Foundry hosted agents (Microsoft Agent Framework): wiring, native Foundry primitives, human-in-the-loop approvals, azd deploy, and debugging — with the Microsoft Learn and Foundry MCP servers for live grounding.",
"version": "1.0.0",
"keywords": [
"copilotkit",
"ag-ui",
"microsoft-foundry",
"hosted-agents",
"agent-framework",
"human-in-the-loop",
"azure"
],
"author": {
"name": "Sunil Sattiraju"
},
"repository": "https://github.com/github/awesome-copilot",
"license": "MIT",
"extensions": {
"com.github.awesome-copilot": {
"skills": [
"./skills/foundry-hosted-agent-copilotkit/"
]
}
}
}