# Build Azure AI Hosted Agents with Python

Container-based Azure agents require precise SDK, identity, image, and protocol configuration. This skill provides focused Python patterns for creating and managing hosted agents.

## Install

```bash
npx skillstore add sickn33/hosted-agents-v2-py
```

## Metadata

- Status: approved
- Slug: sickn33-hosted-agents-v2-py
- Skillstore revision: r2
- Version status: missing
- Tree hash: 974d26ba5312d3447633c935aefbfa40307f55b07f5b30f2fa1a95d7c7049ed6
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/hosted-agents-v2-py
- Ref: 88a8e9a07f4c54ab105c1c41b6267c287146b07b
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: scripts, external\_commands, network, env\_access
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/sickn33-hosted-agents-v2-py
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-hosted-agents-v2-py/manifest

## Capabilities

- Installs the required Azure AI Projects and Azure Identity Python packages.
- Configures AIProjectClient with DefaultAzureCredential and an Azure project endpoint.
- Creates versioned hosted agents from Azure Container Registry images.
- Sets protocol versions, CPU, memory, tools, and container environment variables.
- Lists and deletes hosted agent versions through the Python SDK.
- Provides synchronous, asynchronous, and troubleshooting examples.

## Use Cases

- Prototype a hosted agent: Create a first hosted agent version from an existing container image with basic resource settings.
- Standardize agent deployment: Prepare repeatable SDK patterns for image versions, protocols, tools, and resource allocation.
- Diagnose deployment failures: Map common hosted agent errors to registry permissions, image paths, capability hosts, and protocol settings.

## Prompt Templates

### Plan a basic hosted agent

```
Plan a Python hosted agent named [agent name] using image [image path]. List required Azure resources and configuration values.
```

### Create a hosted agent

```
Create a Python implementation for [agent name] using [image path]. Use DefaultAzureCredential and configure [CPU] CPU with [memory] memory.
```

### Add tools and asynchronous access

```
Adapt my hosted agent for asynchronous creation. Add [tool list], preserve secure authentication, and explain required container environment variables.
```

### Review a production deployment

```
Review my hosted agent design for production. Assess image versioning, permissions, resources, protocols, cleanup, error handling, and secret management.
```

## Limitations

- Requires an existing Azure AI project, container image, registry access, and capability host.
- Does not build or validate the hosted agent container image.
- Does not provision Azure roles, registries, projects, or capability hosts.
- Requires environment-specific testing because SDK preview behavior and Azure limits can change.

## Best Practices

- Use immutable image tags for production deployments.
- Grant only required registry permissions to the project managed identity.
- Store secrets in Azure Key Vault and pass only necessary configuration to containers.

## Anti Patterns

- Do not use the latest image tag for production agent versions.
- Do not hardcode credentials or secrets in source code or container definitions.
- Do not create agents before validating registry access and capability host configuration.

## Security Audit

- Audited at: 2026-07-24T00:03:33.501\+00:00
- Summary: All 65 static alerts are false positives caused by Markdown syntax, Python imports, configuration placeholders, or documentation links. No malicious intent, secret access, command execution, or prompt injection was found.

## Stats

- Views: 136
- Downloads: 10
- Favorites: 0
- Popularity score: 0
