Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 94
  • 42k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-copilotkit

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install foundry-hosted-agent-copilotkit in Claude Code

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

A

No 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 →

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.

foundry-hosted-agent-copilotkit Install

Add to stack

Loading.