hosted-agents-v2-py
Deploy Azure AI Hosted Agents with Python
Streamline container-based AI agent deployment on Azure using the official Projects SDK. Automate provisioning, scaling, and management of custom agent environments without manual infrastructure configuration.
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "hosted-agents-v2-py". Create a hosted agent with image 'myacr.azurecr.io/processor:v2', 2 CPUs, 4GiB memory, and code interpreter tool
النتيجة المتوقعة:
- Created agent: data-processor-agent
- Version: 3
- State: Succeeded
- Agent ID: agent_abc123xyz
استخدام "hosted-agents-v2-py". List all versions of agent 'my-hosted-agent'
النتيجة المتوقعة:
- Version: 1, State: Succeeded, Created: 2025-01-15T10:30:00Z
- Version: 2, State: Failed, Created: 2025-01-16T14:22:00Z
- Version: 3, State: Succeeded, Created: 2025-01-17T09:15:00Z
استخدام "hosted-agents-v2-py". Delete version 2 of agent 'my-hosted-agent'
النتيجة المتوقعة:
- Deleting agent version...
- Successfully deleted version 2 of my-hosted-agent
التدقيق الأمني
مخاطر منخفضةStatic analysis detected 79 potential issues across documentation code examples. After evaluation, all findings are FALSE POSITIVES. The file SKILL.md contains documentation with code examples showing shell commands (pip install, bash scripts) and environment variable access patterns typical for legitimate Azure AI development tutorials. No executable code is present. The 'weak cryptography' findings are false positives from detecting the word 'version' in context. No malicious intent or security risks identified.
مشكلات متوسطة المخاطر (2)
مشكلات منخفضة المخاطر (2)
عوامل الخطر
⚙️ الأوامر الخارجية (3)
🌐 الوصول إلى الشبكة (3)
🔑 متغيرات البيئة (3)
درجة الجودة
ماذا يمكنك بناءه
Data Processing Pipeline Agent
Deploy a containerized agent that processes large datasets using code interpreter tools, with automatic scaling based on workload demands.
Custom Tool Integration Agent
Create agents that connect to custom MCP servers and external APIs, enabling specialized business process automation within Azure AI infrastructure.
Development Environment Agent
Provision isolated development environments with pre-configured tools and configurations for team collaboration and rapid prototyping.
جرّب هذه الموجهات
Create a hosted agent using Azure AI Projects SDK. The agent should use container image 'myregistry.azurecr.io/my-agent:v1.0', require 2 CPU cores and 4GiB memory, support code interpreter tool, and set MODEL_NAME environment variable to 'gpt-4o-mini'.
Build an agent with both code interpreter and file search tools enabled. Connect to MCP server at 'https://tools.example.com' with label 'custom-tools'. Allocate 1 CPU core and 2GiB memory. Pass AZURE_AI_PROJECT_ENDPOINT from your environment to the agent.
Implement an asynchronous agent creation workflow using AIProjectClient from azure.ai.projects.aio. Create an agent named 'async-processor' with minimal resources (0.5 CPU, 1GiB memory). Use async context managers for proper resource cleanup.
Create a production agent deployment script with error handling. Include try/except blocks for ImagePullBackOff and InvalidContainerImage errors. Log agent state after creation. Implement cleanup logic to delete unused agent versions older than 30 days.
أفضل الممارسات
- Use specific image tags instead of 'latest' for reproducible deployments
- Start with minimum resource allocation and scale up based on monitoring metrics
- Store sensitive configuration in Azure Key Vault, reference via environment variables
- Implement comprehensive error handling for common failures like ImagePullBackOff
- Clean up unused agent versions regularly to optimize resource utilization
تجنب
- Hardcoding secrets or API keys directly in environment_variables dictionary
- Using 'latest' image tag in production deployments causes unpredictable behavior
- Allocating maximum resources without testing actual usage patterns leads to waste
- Skipping AcrPull role permissions setup causes authentication failures
- Creating agent versions without deletion strategy accumulates unused resources