agents-v2-py
하는 일
이 도구를 쓰면 특정 Python 코드를 사용해 컨테이너 안에서 실행되는 AI '에이전트'를 만들 수 있습니다. 에이전트가 내부적으로 어떻게 작동할지 더 많이 제어하고 싶은 사람을 위한 도구입니다.
사용하는 경우
- ✓컨테이너에 에이전트 코드가 준비되어 있을 때.
- ✓에이전트의 CPU와 메모리 같은 자원을 설정해야 할 때.
- ✓AI 에이전트의 여러 버전을 관리하는 경우.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/agents-v2-py/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“컨테이너 이미지를 사용해 호스팅 AI 에이전트를 만들려면 어떻게 하나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
'azure-ai-projects' 라이브러리와 함께 Python 코드를 사용해 에이전트를 정의합니다. 여기에는 컨테이너 이미지, 자원(CPU/메모리), 에이전트 실행에 필요한 환경 변수를 지정하는 작업이 포함됩니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Compatibility and maintenance
Compatibility alias of hosted-agents-v2-py; use that ID for new references when no existing contract requires this one. The instruction-only procedure remains local; no executable support files are bundled so existing installations
continue to work offline. This compatibility guide documents the hosted-agent procedure, not an additional capability; older copies may use retired preview names.
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
…
자주 묻는 질문
'호스팅 에이전트'란 무엇인가요?
클라우드에서 격리된 환경(컨테이너)에서 실행되며 명령을 받을 준비가 된 AI 프로그램입니다.
이것을 쓰려면 Python을 알아야 하나요?
네, 에이전트를 설정하고 실행하려면 Python 코드를 작성하고 실행해야 합니다.
'컨테이너'란 무엇인가요?
프로그램이 실행되는 데 필요한 모든 것을 담은 패키지로 생각하면 됩니다. 어디서든 같은 방식으로 작동하도록 보장합니다.
상세 정보
작성자의 원본 설명
Build container-based Foundry Agents with Azure AI Projects SDK (HostedAgentDefinition). Use when creating hosted agents with custom container images in Azure AI Foundry.
인기도
- GitHub 스타
- 48k
- 순위
- #3691
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.