francoscorporation/antigravity-awesome-skills/agents-v2-py
Claude Code and agent skill by francoscorporation/antigravity-awesome-skills
- community
Checking that the SKILL.md file is still in the repository.
Build container-based Foundry Agents using Azure AI Projects SDK with ImageBasedHostedAgentDefinition. Use when creating hosted agents that run custom code in Azure AI Foundry with your own container images. Triggers: "ImageBasedHostedAgentDefinition", "hosted agent", "container agent", "Foundry Agent", "create_version", "ProtocolVersionRecord", "AgentProtocol.RESPONSES", "custom agent image".
Install
npx vskill@latest install francoscorporation/antigravity-awesome-skills/agents-v2-pySKILL.md
The same SKILL.md was published earlier as francoscorporation/antigravity-awesome-skills/agents-v2-py.
Azure AI Hosted Agents (Python)
Build container-based hosted agents using ImageBasedHostedAgentDefinition from the Azure AI Projects SDK.
Installation
Minimum SDK Version: 2.0.0b3 or later required for hosted agent support.
Environment Variables
Prerequisites
Before creating hosted agents:
- Container Image - Build and push to Azure Container Registry (ACR)
- ACR Pull Permissions - Grant your project's managed identity
AcrPullrole on the ACR - Capability Host - Account-level capability host with
enablePublicHostingEnvironment=true - SDK Version - Ensure
azure-ai-projects>=2.0.0b3
Authentication
Always use DefaultAzureCredential:
Core Workflow
1. Imports
2. Create Hosted Agent
3. List Agent Versions
4. Delete Agent Version
ImageBasedHostedAgentDefinition Parameters
| Parameter | Type | Required | Description | |
|---|---|---|---|---|
container_protocol_versions | list[ProtocolVersionRecord] | Yes | Protocol versions the agent supports | |
image | str | Yes | Full container image path (registry/image:tag) | |
cpu | str | No | CPU allocation (e.g., "1", "2") | |
memory | str | No | Memory allocation (e.g., "2Gi", "4Gi") | |
tools | list[dict] | No | Tools available to the agent | |
environment_variables | dict[str, str] | No | Environment variables for the container |
Protocol Versions
The container_protocol_versions parameter specifies which protocols your agent supports:
Available Protocols:
| Protocol | Description | |
|---|---|---|
AgentProtocol.RESPONSES | Standard response protocol for agent interactions |
Resource Allocation
Specify CPU and memory for your container:
Resource Limits:
| Resource | Min | Max | Default | |
|---|---|---|---|---|
| CPU | 0.5 | 4 | 1 | |
| Memory | 1Gi | 8Gi | 2Gi |
Tools Configuration
Add tools to your hosted agent:
Code Interpreter
MCP Tools
Multiple Tools
Environment Variables
Pass configuration to your container:
Best Practice: Never hardcode secrets. Use environment variables or Azure Key Vault.
Complete Example
Async Pattern
Common Errors
| Error | Cause | Solution | |
|---|---|---|---|
ImagePullBackOff | ACR pull permission denied | Grant AcrPull role to project's managed 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 AgentProtocol.RESPONSES with version "v1" |
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
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/agents-v2-py/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
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/francoscorporation/antigravity-awesome-skills/agents-v2-py)