Sign in
Explore
Skills · SkillDevOps & CloudData & AIReviewed

azure-ai-projects-py

Build AI apps with the Azure AI Projects Python SDK: Foundry project clients, versioned agents, evaluations and connections.

Kind
Skill
Works with
Claude Code
Languages
Python
Source
microsoft/skills @ 2130750147de
Path
.github/plugins/azure-sdk-python/skills/azure-ai-projects-py/SKILL.md
License
MIT
Jobs
Implementation, Testing
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Azure AI Projects Python SDK (Foundry SDK)

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

## Installation

```bash
pip install azure-ai-projects azure-identity
```

## Environment Variables

```bash
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.
…