sickn33/antigravity-awesome-skills/agents-v2-py
- community
Checking that the SKILL.md file is still in the repository.
Build container-based Foundry Agents with Azure AI Projects SDK (HostedAgentDefinition). Use when creating hosted agents with custom container images in Azure AI Foundry.
Install
npx vskill@latest install sickn33/antigravity-awesome-skills/agents-v2-pySKILL.md
Compatibility and maintenance
Compatibility alias of hosted-agents-v2-py; use that ID for new references when no existing contract requires this one. The instruction-only procedure remains local; no executable support files are bundled so existing installations continue to work offline. This compatibility guide documents the hosted-agent procedure, not an additional capability; older copies may use retired preview names. Preserve the callable ID when an existing manifest or client configuration uses it. Modified in AAS on 2026-09-05; original metadata and license notices are retained.
Azure AI Hosted Agents (Python)
Build container-based hosted agents using HostedAgentDefinition from the Azure AI Projects SDK.
Installation
These are SDK 2.3.0 instruction fragments aligned with the current Microsoft hosted-agent guide. Validate the installed schema and service support before provisioning; documentation inspection is not a cloud integration test.
Environment Variables
Prerequisites
Before creating hosted agents:
- Container Image - Build and push to Azure Container Registry (ACR)
- ACR Pull Permissions - Grant the project identity the registry role supported by its permission mode; current hosted-agent guidance uses Container Registry Repository Reader
- Capability Host - Confirm current project/region hosted-agent availability and the application's network policy; do not enable public hosting automatically
- SDK Version - Ensure
azure-ai-projects==2.3.0
Authentication
Use the approved Azure credential flow for the intended tenant/subscription; this sketch uses DefaultAzureCredential:
Core Workflow
1. Imports
2. Create Hosted Agent
3. List Agent Versions
Inspect the exact returned model for supported fields; a created version is not proof a running container is healthy. Close synchronous client/credential resources through their supported context managers or close() methods.
4. Delete Agent Version
HostedAgentDefinition Parameters
| Parameter | Type | Required | Description | |
|---|---|---|---|---|
protocol_versions | list[ProtocolVersionRecord] | Yes | Protocol versions the agent supports | |
container_configuration | ContainerConfiguration | Yes for an image deployment | Reviewed registry image reference | |
cpu | str | No | CPU allocation (e.g., "1", "2") | |
memory | str | No | Memory allocation (e.g., "2Gi", "4Gi") | |
environment_variables | dict[str, str] | No | Environment variables for the container |
Protocol Versions
The protocol_versions parameter specifies which protocols your agent supports:
Available Protocols:
| Protocol | Description | |
|---|---|---|
AgentEndpointProtocol.RESPONSES | Standard response protocol for agent interactions |
Resource Allocation
Specify CPU and memory for your container:
Illustrative resource sizes; verify regional/SKU limits before provisioning:
| Resource | Min | Max | Default | |
|---|---|---|---|---|
| CPU | 0.5 | 4 | 1 | |
| Memory | 1Gi | 8Gi | 2Gi |
Tools Configuration
Configure tool support inside the selected container runtime/framework. The following tool dictionaries describe application-specific intent; do not assume a tools field exists on HostedAgentDefinition or that defining it provisions a tool or grants permission:
Code Interpreter
MCP Tools
Multiple Tools
Environment Variables
Pass configuration to your container:
Best Practice: Keep non-secret deployment names and a reviewed immutable image reference in configuration; secrets need the platform's actual protected injection mechanism. Arbitrary environment dictionaries do not establish Key Vault integration.
Complete Example
Async Pattern
Common Errors
| Error | Cause | Solution | |
|---|---|---|---|
ImagePullBackOff | ACR pull permission denied | Verify registry permission mode and scoped reader role for the project identity | |
InvalidContainerImage | Image not found | Verify image path and tag exist in ACR | |
CapabilityHostNotFound | No capability host configured | Create account-level capability host | |
ProtocolVersionNotSupported | Invalid protocol version | Use AgentEndpointProtocol.RESPONSES with version "2.0.0" |
Best Practices
- Version Your Images - Use specific tags, not
latestin production - Minimal Resources - Start with minimum CPU/memory, scale up as needed
- Environment Variables - Use for all configuration, never hardcode
- Error Handling - Wrap agent creation in try/except blocks
- Cleanup - Delete unused agent versions to free resources
Reference Links
When to Use
Use for reviewing or creating an explicitly requested container-based Foundry hosted agent. First confirm image digest, subscription/tenant, region, service availability, permissions and cost scope. Creating agents, granting roles and deleting versions are cloud writes; do them only within the user's authorization.
Review example
Given a pinned container image and test project, check SDK model fields and registry pull access, then prepare the create request. Provision only if authorized and record the exact returned version and observed health. Do not delete unrelated versions as routine cleanup. Expected result is a version-specific receipt, not an assumed deploy.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationWarning, 63 of 100Marginal. 1 run. Evaluated 7 months ago.
Source
- SKILL.md in the repositoryCheckingskills/agents-v2-py/SKILL.md
Popularity
- Repository stars
- 27,848
- Repository forks
- 4,670
- Repository npm downloads, 7 days
- 9,583
- 7-day trend score
- 73
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 27 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sickn33/antigravity-awesome-skills/agents-v2-py)