foundry-hosted-agent-copilotkit
Skill by github
Guides developers building React apps with CopilotKit that connect over AG-UI to a Microsoft Agent Framework agent hosted in Microsoft Foundry. Covers wiring, tools, approvals, shared state and azd deployment.
Install foundry-hosted-agent-copilotkit
Built from the published package, never by AI.
git clone --depth 1 https://github.com/github/awesome-copilot /tmp/awesome-copilot && mkdir -p ~/.claude/skills && cp -r /tmp/awesome-copilot/skills/foundry-hosted-agent-copilotkit ~/.claude/skills/foundry-hosted-agent-copilotkitRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install foundry-hosted-agent-copilotkit in Claude Code
git clone --depth 1 https://github.com/github/awesome-copilot /tmp/awesome-copilot && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/awesome-copilot/skills/foundry-hosted-agent-copilotkit ~/.gemini/antigravity-cli/skills/foundry-hosted-agent-copilotkitAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install foundry-hosted-agent-copilotkit in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill guides building and changing web apps that pair a CopilotKit React frontend with a Microsoft Agent Framework agent running as a Microsoft Foundry hosted agent. The two are connected over the AG-UI protocol. It covers choosing the wiring, using Foundry-native primitives such as conversations and tool approvals, agent tools, human-in-the-loop approvals, generative UI and shared state.
The skill describes four wiring options, including an AG-UI gateway over a Responses hosted agent, and gives playbooks for local runs, azd deployment, debugging the event stream and safe dependency upgrades. It says a deployed hosted agent does not speak AG-UI, so a server-side gateway translates the traffic using the Microsoft adapter. It is aimed at developers building agentic apps on Foundry. Foundry hosted agents are a paid Azure service.
Written from the project's SKILL.md and checked against it.
What it can do
- Wiring choiceCompares four ways to connect the CopilotKit frontend, AG-UI gateway and hosted agent.
- Foundry-native primitivesUses Foundry conversations, approval storage and Toolbox instead of hand-built plumbing.
- Human-in-the-loop approvalsShows how approval-gated tools pause for approve or reject decisions in the UI.
- Generative UI and shared stateMaps frontend tools, tool renderers and shared state to CopilotKit v2 hooks.
- Agent toolsDefines typed agent tools with @tool and redeploys them with the hosted agent.
- Local run and azd deployRuns the agent locally with azd ai agent run and deploys it with azd deploy.
- Debugging the event streamTests each layer from the hosted agent to the browser to find where a flow fails.
- Safe upgradesUpgrades CopilotKit, AG-UI and Agent Framework packages together and re-checks behavior.
What you need
- Microsoft Foundry project and Azure access
- Paid Azure plan for Foundry hosted agents
- Azure Developer CLI (azd) with the azure.ai.agents extension
- Python for the FastAPI gateway and hosted agent
- React or Next.js app for the frontend
Try asking
- Set up a CopilotKit frontend that talks to my Foundry hosted agent over AG-UI.
- Add an approval step before my agent's delete tool runs and show it in the chat UI.
- My chat works in curl but not in the browser. Help me find which layer is failing.
Good to know
- Foundry hosted agents are a paid Azure service.
- A deployed hosted agent does not speak AG-UI, so a server-side gateway is required.
- With the gateway wiring, shared state events must be declared on the gateway agent before the feature is promised.
- The background-runs wiring emits no state events unless they are synthesized.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/foundry-hosted-agent-copilotkit/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md10 KB -
references/hitl.md8 KB -
references/troubleshooting.md8 KB -
references/wiring.md18 KB
Alternatives to foundry-hosted-agent-copilotkit
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
foundry-hosted-agent-copilotkit: common questions
Does the Foundry hosted agent speak AG-UI directly?
No. It exposes the Responses or invocations protocol. The skill uses the Microsoft Agent Framework adapter to translate between AG-UI and the hosted agent.
Why must the gateway run on the server?
Browsers cannot hold the Entra token needed to call the Foundry endpoint, so the gateway is always server-side.
How are tool approvals stored?
With the Responses hosted agent, ResponsesHostServer persists approval requests by default using FoundryFunctionApprovalStore. The AG-UI adapter turns them into interrupts.
How do I install foundry-hosted-agent-copilotkit?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is foundry-hosted-agent-copilotkit free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is foundry-hosted-agent-copilotkit safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to foundry-hosted-agent-copilotkit?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
