المهارات agents-v2-py
📦

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.

يدعم: Claude Codex Code(CC)
🥉 75 برونزي
1

تنزيل ZIP المهارة

2

رفع في Claude

اذهب إلى Settings → Capabilities → Skills → Upload skill

3

فعّل وابدأ الاستخدام

اختبرها

استخدام "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

التدقيق الأمني

آمن
v1 • 2/24/2026

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
الملفات التي تم فحصها
327
الأسطر التي تم تحليلها
2
النتائج
1
إجمالي عمليات التدقيق
مشكلات منخفضة المخاطر (1)
Environment Variable Access for Configuration
The skill uses os.environ to read AZURE_AI_PROJECT_ENDPOINT. This is legitimate configuration access following security best practices (avoiding hardcoded secrets). Low risk as it only reads expected environment configuration.
تم تدقيقه بواسطة: claude

درجة الجودة

38
الهندسة المعمارية
100
قابلية الصيانة
87
المحتوى
50
المجتمع
100
الأمان
100
الامتثال للمواصفات

ماذا يمكنك بناءه

نشر وكيل مخصص لمعالجة البيانات

إنشاء وكيل استضافة مع حاوية مخصصة تعالج الملفات باستخدام مفسير الأكواد وأدوات البحث عن الملفات لخطوط أنابيب البيانات الآلية.

بناء مساعد 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.
دمج أدوات MCP
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

الأسئلة المتكررة

ما هو الحد الأدنى لإصدار SDK المطلوب للوكلاء المستضافين؟
Azure AI Projects SDK version 2.0.0b3 or later is required for ImageBasedHostedAgentDefinition support.
كيف أمنح وكيلي الإذن بالسحب من ACR؟
Grant the Azure AI Project's managed identity the 'AcrPull' role assignment on your Azure Container Registry resource.
ما البروتوكولات التي يدعمها الوكلاء المستضافون؟
Hosted agents currently support AgentProtocol.RESPONSES with version 'v1' for standard agent interactions.
هل يمكنني استخدام أدوات متعددة في وكيل مستضاف واحد؟
Yes, you can combine code_interpreter, file_search, and MCP tools in a single agent definition.
كيف أتعامل مع الأخطاء أثناء إنشاء الوكيل؟
Wrap agent creation in try/except blocks and check for common errors like ImagePullBackOff, InvalidContainerImage, and CapabilityHostNotFound.
هل يجب حذف إصدارات الوكيل القديمة؟
Yes, delete unused agent versions to free resources. Use list_versions to identify outdated versions before deletion.

تفاصيل المطور

المؤلف

sickn33

الترخيص

MIT

مرجع

main

بنية الملفات

📄 SKILL.md