Habilidades agents-v2-py
📦

agents-v2-py

Seguro 🔑 Variables de entorno

Build Container-Based Azure AI Hosted Agents

Deploy custom AI agents as containerized services in Azure AI Foundry without managing infrastructure. Use the Azure AI Projects SDK to define, deploy, and manage hosted agents with your own Docker images and integrated tools.

Soporta: Claude Codex Code(CC)
🥉 75 Bronce
1

Descargar el ZIP de la skill

2

Subir en Claude

Ve a Configuración → Capacidades → Skills → Subir skill

3

Activa y empieza a usar

Pruébalo

Usando "agents-v2-py". Create a hosted agent with 2 CPU cores, 4Gi memory, and file search tool

Resultado esperado:

Created hosted agent: data-processor-agent
Version: v1.0.0
State: Active
Resource allocation: 2 CPU, 4Gi memory
Tools enabled: code_interpreter, file_search

Usando "agents-v2-py". List all versions of my-hosted-agent

Resultado esperado:

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

Auditoría de seguridad

Seguro
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
Archivos escaneados
327
Líneas analizadas
2
hallazgos
1
Auditorías totales
Problemas de riesgo bajo (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.
Auditado por: claude

Puntuación de calidad

38
Arquitectura
100
Mantenibilidad
87
Contenido
50
Comunidad
100
Seguridad
100
Cumplimiento de la especificación

Lo que puedes crear

Deploy Custom Data Processing Agent

Create a hosted agent with a custom container that processes files using code interpreter and file search tools for automated data pipelines.

Build MCP-Enabled AI Assistant

Deploy an agent that integrates external tools via MCP protocol, enabling seamless connection to custom APIs and services.

Multi-Agent Orchestration System

Create and manage multiple specialized hosted agents with different resource allocations and tool configurations for complex workflows.

Prueba estos prompts

Basic Agent Creation
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.
Agent with Environment Configuration
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 Tool Integration
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'.
Async Agent Management
Write an async Python function that creates a hosted agent, lists all agent versions, and deletes outdated versions older than v2.0.

Mejores prácticas

  • 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

Evitar

  • 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

Preguntas frecuentes

What is the minimum SDK version required for hosted agents?
Azure AI Projects SDK version 2.0.0b3 or later is required for ImageBasedHostedAgentDefinition support.
How do I grant my agent permission to pull from ACR?
Grant the Azure AI Project's managed identity the 'AcrPull' role assignment on your Azure Container Registry resource.
What protocols do hosted agents support?
Hosted agents currently support AgentProtocol.RESPONSES with version 'v1' for standard agent interactions.
Can I use multiple tools in a single hosted agent?
Yes, you can combine code_interpreter, file_search, and MCP tools in a single agent definition.
How do I handle errors during agent creation?
Wrap agent creation in try/except blocks and check for common errors like ImagePullBackOff, InvalidContainerImage, and CapabilityHostNotFound.
Should I delete old agent versions?
Yes, delete unused agent versions to free resources. Use list_versions to identify outdated versions before deletion.

Detalles del desarrollador

Estructura de archivos

📄 SKILL.md