hosted-agents-v2-py
하는 일
이 도구는 Azure의 클라우드에서 컨테이너 안에 실행되는 맞춤형 '에이전트'를 만들도록 해 줍니다. 특정 작업을 수행하도록 설정할 수 있는 프로그램이라고 생각하면 됩니다.
사용하는 경우
- ✓격리된 환경(컨테이너)에서 실행되는 프로그램이 필요할 때.
- ✓다른 Azure 서비스와 상호작용하도록 에이전트를 설정할 때.
- ✓코드를 실행하거나 특정 도구를 사용할 수 있는 AI 어시스턴트를 만들 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hosted-agents-v2-py/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“특정 컨테이너 이미지를 사용하고, CPU 코어 2개와 메모리 4GB를 갖춘 에이전트를 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
SDK라는 특별한 코드를 사용해 에이전트의 설정, CPU와 메모리 같은 자원 요구량, 사용할 수 있는 도구를 정의합니다. 그 후 Azure가 에이전트를 실행하는 작업을 맡습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Compatibility and maintenance
Primary editorial path for this compatibility group. The instruction-only procedure remains local; no executable support files are bundled so existing installations continue to work offline. This is one shared procedure, not an additional capability. Preserve the callable ID when an existing manifest or client configuration uses it. Modified in AAS on 2026-09-05; original metadata and license notices are retained.
Azure AI Hosted Agents (Python)
Build container-based hosted agents using HostedAgentDefinition from the Azure AI Projects SDK.
Installation
pip install 'azure-ai-projects==2.3.0' azure-identity
These are SDK 2.3.0 instruction fragments aligned with the current Microsoft hosted-agent guide. Validate the installed schema and service support before provisioning; documentation inspection is not a cloud integration test.
Environment Variables
export AZURE_AI_PROJECT_ENDPOINT="https://<resource>.services.ai.azure.com/api/projects/<project>"
Prerequisites
Before creating hosted agents:
- Container Image - Build and push to Azure Container Registry (ACR)
- ACR Pull Permissions - Grant the project identity the registry role supported by its permission mode; current hosted-agent guidance uses Container Registry Repository Reader
- Capability Host - Confirm current project/region hosted-agent availability and the application's network policy; do not enable public hosting automatically
- SDK Version - Ensure
azure-ai-projects==2.3.0
Authentication
Use the approved Azure credential flow for the intended tenant/subscription; this sketch uses DefaultAzureCredential:
from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient
import os
credential = DefaultAzureCredential()
client = AIProjectClient(
endpoint=os.environ["AZURE_AI_PROJECT_ENDPOINT"],
credential=credential
)
Core Workflow
1. Imports
import os
from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient
from azure.ai.projects.models import (
HostedAgentDefinition,
ContainerConfiguration,
ProtocolVersionRecord,
AgentEndpointProtocol,
)
2. Create Hosted Agent
client = AIProjectClient(
endpoint=os.environ["AZURE_AI_PROJECT_ENDPOINT"],
credential=DefaultAzureCredential()
)
agent = client.agents.create_version(
agent_name="my-hosted-agent",
definition=HostedAgentDefinition(
protocol_versions=[
ProtocolVersionRecord(protocol=AgentEndpointProtocol.RESPONSES, version="2.0.0")
],
cpu="1",
memory="2Gi",
container_configuration=ContainerConfiguration(image=os.environ["REVIEWED_CONTAINER_IMAGE"]),
environment_variables={
"AZURE_AI_PROJECT_ENDPOINT": os.environ["AZURE_AI_PROJECT_ENDPOINT"],
"MODEL_NAME": os.environ["MODEL_DEPLOYMENT_NAME"]
}
)
)
print(f"Created agent: {agent.name} (version: {agent.version})")
3. List Agent Versions
versions = client.agents.list_versions(agent_name="my-hosted-agent")
for version in versions:
print(f"Version: {version.version}") # Inspect supported status fields via get_version
Inspect the exact returned model for supported fields; a created version is not proof a running container is healthy. Close synchronous client/credential resources through their supported context managers or close() methods.
4. Delete Agent Version
client.agents.delete_version(
agent_name="my-hosted-agent",
agent_version=agent.version
)
HostedAgentDefinition Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
protocol_versions |
list[ProtocolVersionRecord] |
Yes | Protocol versions the agent supports |
container_configuration |
ContainerConfiguration |
Yes for an image deployment | Reviewed registry image reference |
cpu |
str |
No | CPU allocation (e.g., "1", "2") |
memory |
str |
No | Memory allocation (e.g., "2Gi", "4Gi") |
environment_variables |
dict[str, str] |
No | Environment variables for the container |
Protocol Versions
The protocol_versions parameter specifies which protocols your agent supports:
from azure.ai.projects.models import ProtocolVersionRecord, AgentEndpointProtocol
# RESPONSES protocol - standard agent responses
…
자주 묻는 질문
'호스팅 에이전트'란 무엇인가요?
직접 만든 프로그램을 Azure가 컨테이너 환경에서 실행해 주어, 작업을 수행할 준비가 된 상태로 두는 것입니다.
이것을 사용하려면 코딩을 알아야 하나요?
네, 에이전트를 설정하려면 Python 코드를 조금 작성해야 합니다. 다만 도구가 Azure에서 실행하는 과정을 간단하게 해 줍니다.
에이전트가 코드 인터프리터 같은 도구를 사용하게 할 수 있나요?
네, 코드 인터프리터나 다른 Azure 전용 도구를 사용하도록 에이전트를 설정할 수 있습니다.
상세 정보
작성자의 원본 설명
Build hosted agents using Azure AI Projects SDK with HostedAgentDefinition. Use when creating container-based agents in Azure AI Foundry.
인기도
- GitHub 스타
- 48k
- 순위
- #4827
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.