본문으로 건너뛰기
Skillpedia
에이전트40k · #7208

foundry-hosted-agent-copilotkit

하는 일

이 도구는 React(CopilotKit 사용)로 만든 웹 애플리케이션을, Foundry라는 유료 Microsoft 서비스에서 실행되는 지능형 '에이전트'(Microsoft Agent Framework로 만든)에 연결하도록 돕습니다. 둘 사이의 통신을 도와 더 고급 애플리케이션을 만들 수 있게 합니다.

사용하는 경우

  • ✓지능형 에이전트가 필요한 새 웹 애플리케이션을 만들 때.
  • ✓기존 웹 애플리케이션에 지능형 에이전트를 추가하거나 수정할 때.
  • ✓웹 애플리케이션이 승인과 대화 기록 같은 고급 AI 기능을 쓰도록 하고 싶을 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/foundry-hosted-agent-copilotkit/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/foundry-hosted-agent-copilotkit/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“CopilotKit을 쓰는 React 앱을 Microsoft Foundry의 지능형 에이전트와 어떻게 연결하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 AG-UI라는 프로토콜을 사용해 React 애플리케이션(CopilotKit)과 지능형 에이전트(Microsoft Agent Framework) 사이의 통신을 설정합니다. 에이전트를 호스팅하고 대화를 관리하는 데는 Microsoft 서비스(Foundry)를 사용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

CopilotKit + AG-UI + Microsoft Foundry hosted agents

Use this skill when a React/Next.js app uses CopilotKit and talks over AG-UI to a Microsoft Agent Framework (MAF) agent hosted in Microsoft Foundry. This covers new builds and changes to existing apps. Foundry hosted agents are a paid Azure service.

Scaffold the agent with azd ai agent init and the frontend with your usual React/Next.js tooling. Then follow this skill for everything that connects them.

Mental model

React (CopilotKit v2)        CopilotKitProvider / CopilotChat threadId=<conv_ id> / useInterrupt
      │ HTTP
CopilotKit runtime           CopilotRuntime({ agents: { default: new HttpAgent({ url }) } })
      │ AG-UI (SSE)
AG-UI gateway (FastAPI)      add_agent_framework_fastapi_endpoint(app, AgentFrameworkAgent(FoundryAgent(...),
                               use_service_session=True, service_session_id_from_thread_id=True))   ← keeps no thread state
      │ OpenAI Responses + Entra token (https://ai.azure.com/.default)
Foundry hosted agent         ResponsesHostServer(Agent(tools=[...]))  ← deployed with azd

A deployed hosted agent does not speak AG-UI. It exposes .../agents/<name>/endpoint/protocols/openai/responses (Responses protocol) or .../protocols/invocations. Translate with MAF's own adapter (FoundryAgent + agent-framework-ag-ui) instead of writing an SSE translator by hand. Browsers cannot hold the Entra token, so the gateway is always server-side.

Use the platform first

Before you write any plumbing, check this table. Each row is something older codebases built by hand.

Need Native primitive (don't hand-roll)
Conversation history across turns and restarts Foundry conversations: create one per chat, use its conv_… ID as the AG-UI thread ID, and the gateway passes it through (no snapshot store)
Durable tool approvals ResponsesHostServer persists approval requests by default (FoundryFunctionApprovalStore). The AG-UI adapter turns them into AG-UI interrupts and forwards decisions back to the hosted agent
Runs that survive browser disconnects Responses background: true + store: true, then poll or reconnect (see wiring)
Durable multi-step workflows with gates Invocations hosted agent + @multi_turn_task + FoundryStateStore
Per-user files for the agent Session Files API; the agent reads $HOME with its own tools. Never inline large documents into the prompt
Long-term user memory Foundry Memory Store (user scope) or FoundryMemoryProvider
Tool catalogs, web search, code interpreter Foundry Toolbox (FoundryToolbox) with Tool Search, instead of listing every tool up front
Live docs while coding The Microsoft Learn and Foundry MCP servers (bundled with this skill's plugin)

Choose the wiring

If the app needs… Use Gateway size
Hosted agent + chat + tools + approvals (default) A. AG-UI gateway over a Responses hosted agent ~50 lines of Python
Every state pattern, local prototype, no Foundry compute B. In-process AG-UI (agent runs inside the FastAPI app) ~15 lines
Background runs that keep going after disconnect, reconnect, per-user conversation lists C. Background-runs gateway (custom AG-UI agent over Foundry conversations) ~150 lines of TypeScript
Multi-step plan → approve → execute, irreversible steps that must not run twice D. Invocations hosted agent alongside A or C REST proxy

Code for each is in references/wiring.md. In an existing codebase, identify the wiring before you change anything:

  • FoundryAgent(...) wrapped by add_agent_framework_fastapi_endpoint means A.
  • Agent(client=...) wrapped directly means B.
  • A custom AbstractAgent calling /responses with background means C.
  • protocol: invocations in azure.yaml means D.

Workflow

  1. Pick or identify the wiring (table above).

  2. Use the latest release of every package (@copilotkit/*, @ag-ui/*, agent-framework-*, azd and its azure.ai.agents extension). Then ground on live sources:

    • the Microsoft Learn MCP server for MAF and Foundry
    • the Foundry MCP server for project state
    • docs.copilotkit.ai and the .d.ts files bundled in the installed @copilotkit/* packages
    • docs.ag-ui.com

    APIs move between minor versions, so don't trust memorized names.

…

자주 묻는 질문

'에이전트'란 무엇인가요?

작업을 수행하고, 명령을 이해하며, 가상 비서처럼 사용자와 상호작용할 수 있는 컴퓨터 프로그램입니다.

Microsoft Foundry가 무엇인가요?

지능형 에이전트를 클라우드에서 호스팅하고 관리해 애플리케이션이 접근할 수 있도록 해 주는 Microsoft 서비스입니다.

CopilotKit이 무엇인가요?

React용 라이브러리로, 웹 애플리케이션에 채팅 인터페이스를 쉽게 만들고 지능형 에이전트와 연동할 수 있게 합니다.

상세 정보

작성자의 원본 설명

Build and evolve agentic web apps that pair a CopilotKit React frontend with a Microsoft Agent Framework agent running as a Microsoft Foundry hosted agent, connected over the AG-UI protocol. Covers choosing the wiring, using Foundry-native primitives instead of hand-rolled plumbing, agent tools, human-in-the-loop approvals, generative UI and shared state, local run and azd deploy, debugging the ev

repo: github/awesome-copilot

인기도

GitHub 스타
40k
순위
#7208
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬