agents-v2-py
بناء وكلاء استضافة Azure AI المبنيين على الحاويات
نشر وكلاء AI مخصصين كخدمات مُحَوَّلة في Azure AI Foundry دون إدارة البنية التحتية. Use the Azure AI Projects SDK to define, deploy, and manage hosted agents with your own Docker images and integrated tools.
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "agents-v2-py". إنشاء وكيل استاكرة بـ 2 نواة CPU، 4Gi ذاكرة، وأداة البحث عن الملفات
النتيجة المتوقعة:
Created hosted agent: data-processor-agent
Version: v1.0.0
State: Active
Resource allocation: 2 CPU, 4Gi memory
Tools enabled: code_interpreter, file_search
استخدام "agents-v2-py". List all versions of my-hosted-agent
النتيجة المتوقعة:
Version: v1.0.0, State: Active, Created: 2024-01-15
Version: v1.1.0, State: Active, Created: 2024-01-20
Version: v2.0.0, State: Active, Created: 2024-01-25
التدقيق الأمني
آمنThis skill is a Python SDK documentation guide for Azure AI Foundry hosted agents. All 79 static analysis findings were evaluated and dismissed as false positives. The markdown backticks were incorrectly flagged as shell execution, environment variable usage follows security best practices, and documentation URLs are not active network calls. No malicious patterns detected.
مشكلات منخفضة المخاطر (1)
عوامل الخطر
🔑 متغيرات البيئة (7)
درجة الجودة
ماذا يمكنك بناءه
نشر وكيل مخصص لمعالجة البيانات
إنشاء وكيل استضافة مع حاوية مخصصة تعالج الملفات باستخدام مفسير الأكواد وأدوات البحث عن الملفات لخطوط أنابيب البيانات الآلية.
بناء مساعد AI مزود بـ MCP
نشر وكيل يدمج أدوات خارجية عبر بروتوكول MCP، مما يتيح اتصالاً سلسًا بواجهات API وخدمات مخصصة.
نظام تنسيق الوكلاء المتعددين
إنشاء وإدارة多名多位 استضافة متخصصين بموارد مختلفة وتكوينات أدوات لسير العمل المعقدة.
جرّب هذه الموجهات
Create a hosted agent using ImageBasedHostedAgentDefinition with my container image at myregistry.azurecr.io/my-agent:v1, allocating 1 CPU and 2Gi memory with code interpreter enabled.
Create a hosted agent that passes AZURE_AI_PROJECT_ENDPOINT and MODEL_NAME as environment variables to the container, using gpt-4o-mini as the model.
Deploy a hosted agent with both code interpreter and MCP tools. The MCP server is at https://my-mcp-server.example.com with label 'custom-tools'.
Write an async Python function that creates a hosted agent, lists all agent versions, and deletes outdated versions older than v2.0.
أفضل الممارسات
- Use specific image tags instead of 'latest' for production deployments to ensure reproducibility
- Start with minimum resource allocation (1 CPU, 2Gi) and scale up based on actual usage patterns
- Store all configuration in environment variables and use Azure Key Vault for sensitive values
تجنب
- Hardcoding secrets or connection strings directly in the agent definition code
- Using the 'latest' image tag in production which can cause unexpected behavior after image updates
- Allocating maximum resources (4 CPU, 8Gi) without profiling actual resource requirements