skills.vishalvoidskills/vishalvoid
Technical & DevelopmentIntermediate

azure-ai-projects-py

AI Foundry project client and agents

Developer Setup

Setup & Installation

bash
npx skills add https://github.com/microsoft/skills --skill azure-ai-projects-py

Overview

What This Skill Does

Python SDK for building AI applications on Microsoft Azure Foundry. Wraps agent creation, thread management, evaluations, connections, deployments, datasets, and indexes under a single `AIProjectClient`. Also provides an OpenAI-compatible client for projects that use standard OpenAI API patterns.

Application

When to use this Skill

Documentation

Show Skills.md file

Azure AI Projects Python SDK (Foundry SDK)

Build AI applications on Microsoft Foundry using the azure-ai-projects SDK.

Installation

pip install azure-ai-projects azure-identity

Environment Variables

AZURE_AI_PROJECT_ENDPOINT="https://<resource>.services.ai.azure.com/api/projects/<project>"  # Required for all auth methods
AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini"  # Required for all auth methods
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production

Authentication & Lifecycle

🔑 Two rules apply to every code sample below:

  1. Prefer DefaultAzureCredential. It works locally (Azure CLI / VS Code / Developer CLI) and in Azure (managed identity, workload identity) with no code change. Avoid connection strings, account/API keys — they bypass Entra audit and rotation.
    • Local dev: DefaultAzureCredential works as-is.
    • Production: set AZURE_TOKEN_CREDENTIALS=prod (or AZURE_TOKEN_CREDENTIALS=<specific_credential>) to constrain the credential chain to production-safe credentials.
Lines 1 - 25 of 306

Recommendations

Explore other random skills

All skillsMy patterns