[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69ARBXH1YTN314DB6JTCDVT":3,"skill-same:01M69ARBXH1YTN314DB6JTCDVT":126},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":59,"ownerHtmlUrl":60,"ownerBlogUrl":61,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M69ARBXH1YTN314DB6JTCDVT","azure-ai-projects-py",null,"Build AI applications using the Azure AI Projects Python SDK (azure-ai-projects). Use when working with Foundry project clients, creating versioned agents with PromptAgentDefinition, running evaluations, managing connections\u002Fdeployments\u002Fdatasets\u002Findexes, or using OpenAI-compatible clients. This is the high-level Foundry SDK - for low-level agent operations, use azure-ai-agents-python skill.","microsoft\u002Fskills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69AJYYW4E1RMSYCQDJ4FJSH",3195,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,9,45],"azure ai","azure","azure ai projects py","azure ai projects","projects","python sdk","running","when","for","high","openai-compatible","with","project","connections","deployments","AI-agents","use","python","applications","openai","foundry","sdk","2026-11-10 10:12:30",false,"---\nname: azure-ai-projects-py\ndescription: Build AI applications using the Azure AI Projects Python SDK (azure-ai-projects). Use when working with Foundry project clients, creating versioned agents with PromptAgentDefinition, running evaluations, managing connections\u002Fdeployments\u002Fdatasets\u002Findexes, or using OpenAI-compatible clients. This is the high-level Foundry SDK - for low-level agent operations, use azure-ai-agents-python skill.\nlicense: MIT\nmetadata:\n  author: Microsoft\n  version: \"1.0.0\"\n  package: azure-ai-projects\n---\n\n# Azure AI Projects Python SDK (Foundry SDK)\n\nBuild AI applications on Microsoft Foundry using the `azure-ai-projects` SDK.\n\n## Installation\n\n```bash\npip install azure-ai-projects azure-identity\n```\n\n## Environment Variables\n\n```bash\nAZURE_AI_PROJECT_ENDPOINT=\"https:\u002F\u002F\u003Cresource>.services.ai.azure.com\u002Fapi\u002Fprojects\u002F\u003Cproject>\"  # Required for all auth methods\nAZURE_AI_MODEL_DEPLOYMENT_NAME=\"gpt-4o-mini\"  # Required for all auth methods\nAZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production\n```\n\n## Authentication & Lifecycle\n\n> **? Two rules apply to every code sample below:**\n>\n> 1. **Prefer `DefaultAzureCredential`.** It works locally (Azure CLI \u002F VS Code \u002F Developer CLI) and in Azure (managed identity, workload identity) with no code change. Avoid connection strings, account\u002FAPI keys — they bypass Entra audit and rotation.\n>    - Local dev: `DefaultAzureCredential` works as-is.\n>    - Production: set `AZURE_TOKEN_CREDENTIALS=prod` (or `AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>`) to constrain the credential chain to production-safe credentials.\n> 2. **Wrap every client in a context manager** so HTTP transports, sockets, and token caches are released deterministically:\n>    - Sync: `with \u003CClient>(...) as client:`\n>    - Async: `async with \u003CClient>(...) as client:` **and** `async with DefaultAzureCredential() as credential:` (from `azure.identity.aio`)\n>\n> Snippets may abbreviate this setup, but production code should always follow both rules.\n\n```python\nimport os\nfrom azure.identity import DefaultAzureCredential, ManagedIdentityCredential\nfrom azure.ai.projects import AIProjectClient\n\n# Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>\ncredential = DefaultAzureCredential()\n# Or use a specific credential directly in production:\n# See https:\u002F\u002Flearn.microsoft.com\u002Fpython\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-python#credential-classes\n# credential = ManagedIdentityCredential()\nwith AIProjectClient(\n    endpoint=os.environ[\"AZURE_AI_PROJECT_ENDPOINT\"],\n    credential=credential,\n) as client:\n    deployments = list(client.deployments.list())\n```\n\n## Client Operations Overview\n\n| Operation | Access | Purpose |\n|-----------|--------|---------|\n| `client.agents` | `.agents.*` | Agent CRUD, versions, threads, runs |\n| `client.connections` | `.connections.*` | List\u002Fget project connections |\n| `client.deployments` | `.deployments.*` | List model deployments |\n| `client.datasets` | `.datasets.*` | Dataset management |\n| `client.indexes` | `.indexes.*` | Index management |\n| `client.evaluations` | `.evaluations.*` | Run evaluations |\n| `client.red_teams` | `.red_teams.*` | Red team operations |\n\n## Two Client Approaches\n\n### 1. AIProjectClient (Native Foundry)\n\n```python\nfrom azure.ai.projects import AIProjectClient\n\nwith AIProjectClient(\n    endpoint=os.environ[\"AZURE_AI_PROJECT_ENDPOINT\"],\n    credential=DefaultAzureCredential(),\n) as client:\n    # Use Foundry-native operations\n    agent = client.agents.create_agent(\n        model=os.environ[\"AZURE_AI_MODEL_DEPLOYMENT_NAME\"],\n        name=\"my-agent\",\n        instructions=\"You are helpful.\",\n    )\n```\n\n### 2. OpenAI-Compatible Client\n\n```python\n# Get OpenAI-compatible client from project\nopenai_client = client.get_openai_client()\n\n# Use standard OpenAI API\nresponse = openai_client.chat.completions.create(\n    model=os.environ[\"AZURE_AI_MODEL_DEPLOYMENT_NAME\"],\n    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}],\n)\n```\n\n## Agent Operations\n\n### Create Agent (Basic)\n\n```python\nagent = client.agents.create_agent(\n    model=os.environ[\"AZURE_AI_MODEL_DEPLOYMENT_NAME\"],\n    name=\"my-agent\",\n    instructions=\"You are a helpful assistant.\",\n)\n```\n\n### Create Agent with Tools\n\n```python\nfrom azure.ai.agents.models import CodeInterpreterTool, FileSearchTool\n\nagent = client.agents.create_agent(\n    model=os.environ[\"AZURE_AI_MODEL_DEPLOYMENT_NAME\"],\n    name=\"tool-agent\",\n    instructions=\"You can execute code and search files.\",\n    tools=[CodeInterpreterTool(), FileSearchTool()],\n)\n```\n\n### Versioned Agents with PromptAgentDefinition\n\n```python\nfrom azure.ai.projects.models import PromptAgentDefinition\n\n# Create a versioned agent\nagent_version = client.agents.create_version(\n    agent_name=\"customer-support-agent\",\n    definition=PromptAgentDefinition(\n        model=os.environ[\"AZURE_AI_MODEL_DEPLOYMENT_NAME\"],\n        instructions=\"You are a customer support specialist.\",\n        tools=[],  # Add tools as needed\n    ),\n    version_label=\"v1.0\",\n)\n```\n\nSee [references\u002Fagents.md](references\u002Fagents.md) for detailed agent patterns.\n\n## Tools Overview\n\n| Tool | Class | Use Case |\n|------|-------|----------|\n| Code Interpreter | `CodeInterpreterTool` | Execute Python, generate files |\n| File Search | `FileSearchTool` | RAG over uploaded documents |\n| Bing Grounding | `BingGroundingTool` | Web search (requires connection) |\n| Azure AI Search | `AzureAISearchTool` | Search your indexes |\n| Function Calling | `FunctionTool` | Call your Python functions |\n| OpenAPI | `OpenApiTool` | Call REST APIs |\n| MCP | `McpTool` | Model Context Protocol servers |\n| Memory Search | `MemorySearchTool` | Search agent memory stores |\n| SharePoint | `SharepointGroundingTool` | Search SharePoint content |\n\nSee [references\u002Ftools.md](references\u002Ftools.md) for all tool patterns.\n\n## Thread and Message Flow\n\n```python\n# 1. Create thread\nthread = client.agents.threads.create()\n\n# 2. Add message\nclient.agents.messages.create(\n    thread_id=thread.id,\n    role=\"user\",\n    content=\"What's the weather like?\",\n)\n\n# 3. Create and process run\nrun = client.agents.runs.create_and_process(\n    thread_id=thread.id,\n    agent_id=agent.id,\n)\n\n# 4. Get response\nif run.status == \"completed\":\n    messages = client.agents.messages.list(thread_id=thread.id)\n    for msg in messages:\n        if msg.role == \"assistant\":\n            print(msg.content[0].text.value)\n```\n\n## Connections\n\n```python\n# List all connections\nconnections = client.connections.list()\nfor conn in connections:\n    print(f\"{conn.name}: {conn.connection_type}\")\n\n# Get specific connection\nconnection = client.connections.get(connection_name=\"my-search-connection\")\n```\n\nSee [references\u002Fconnections.md](references\u002Fconnections.md) for connection patterns.\n\n## Deployments\n\n```python\n# List available model deployments\ndeployments = client.deployments.list()\nfor deployment in deployments:\n    print(f\"{deployment.name}: {deployment.model}\")\n```\n\nSee [references\u002Fdeployments.md](references\u002Fdeployments.md) for deployment patterns.\n\n## Datasets and Indexes\n\n```python\n# List datasets\ndatasets = client.datasets.list()\n\n# List indexes\nindexes = client.indexes.list()\n```\n\nSee [references\u002Fdatasets-indexes.md](references\u002Fdatasets-indexes.md) for data operations.\n\n## Evaluation\n\n```python\n# Using OpenAI client for evals\nopenai_client = client.get_openai_client()\n\n# Create evaluation with built-in evaluators\neval_run = openai_client.evals.runs.create(\n    eval_id=\"my-eval\",\n    name=\"quality-check\",\n    data_source={\n        \"type\": \"custom\",\n        \"item_references\": [{\"item_id\": \"test-1\"}],\n    },\n    testing_criteria=[\n        {\"type\": \"fluency\"},\n        {\"type\": \"task_adherence\"},\n    ],\n)\n```\n\nSee [references\u002Fevaluation.md](references\u002Fevaluation.md) for evaluation patterns.\n\n## Async Client\n\n```python\nfrom azure.ai.projects.aio import AIProjectClient\n\nasync with AIProjectClient(\n    endpoint=os.environ[\"AZURE_AI_PROJECT_ENDPOINT\"],\n    credential=DefaultAzureCredential(),\n) as client:\n    agent = await client.agents.create_agent(...)\n    # ... async operations\n```\n\nSee [references\u002Fasync-patterns.md](references\u002Fasync-patterns.md) for async patterns.\n\n## Memory Stores\n\n```python\n# Create memory store for agent\nmemory_store = client.agents.create_memory_store(\n    name=\"conversation-memory\",\n)\n\n# Attach to agent for persistent memory\nagent = client.agents.create_agent(\n    model=os.environ[\"AZURE_AI_MODEL_DEPLOYMENT_NAME\"],\n    name=\"memory-agent\",\n    tools=[MemorySearchTool()],\n    tool_resources={\"memory\": {\"store_ids\": [memory_store.id]}},\n)\n```\n\n## Best Practices\n\n1. **Pick sync OR async and stay consistent.** Do not mix `azure.ai.projects` sync clients with `azure.ai.projects.aio` async clients in the same call path. Choose one mode per module.\n2. **Always use context managers for clients and async credentials.** Wrap every client in `with AIProjectClient(...) as client:` (sync) or `async with AIProjectClient(...) as client:` (async). For async `DefaultAzureCredential` from `azure.identity.aio`, also use `async with credential:` so tokens and transports are cleaned up.\n3. **Clean up agents** when done: `client.agents.delete_agent(agent.id)`\n4. **Use `create_and_process`** for simple runs, **streaming** for real-time UX\n5. **Use versioned agents** for production deployments\n6. **Prefer connections** for external service integration (AI Search, Bing, etc.)\n\n## SDK Comparison\n\n| Feature | `azure-ai-projects` | `azure-ai-agents` |\n|---------|---------------------|-------------------|\n| Level | High-level (Foundry) | Low-level (Agents) |\n| Client | `AIProjectClient` | `AgentsClient` |\n| Versioning | `create_version()` | Not available |\n| Connections | Yes | No |\n| Deployments | Yes | No |\n| Datasets\u002FIndexes | Yes | No |\n| Evaluation | Via OpenAI client | No |\n| When to use | Full Foundry integration | Standalone agent apps |\n\n## Reference Files\n\n- [references\u002Fagents.md](references\u002Fagents.md): Agent operations with PromptAgentDefinition\n- [references\u002Ftools.md](references\u002Ftools.md): All agent tools with examples\n- [references\u002Fevaluation.md](references\u002Fevaluation.md): Evaluation operations overview\n- [references\u002Fbuilt-in-evaluators.md](references\u002Fbuilt-in-evaluators.md): Complete built-in evaluator reference\n- [references\u002Fcustom-evaluators.md](references\u002Fcustom-evaluators.md): Code and prompt-based evaluator patterns\n- [references\u002Fconnections.md](references\u002Fconnections.md): Connection operations\n- [references\u002Fdeployments.md](references\u002Fdeployments.md): Deployment enumeration\n- [references\u002Fdatasets-indexes.md](references\u002Fdatasets-indexes.md): Dataset and index operations\n- [references\u002Fasync-patterns.md](references\u002Fasync-patterns.md): Async client usage\n- [references\u002Fapi-reference.md](references\u002Fapi-reference.md): Complete API reference for all 373 SDK exports (v2.0.0b4)\n- [scripts\u002Frun_batch_evaluation.py](scripts\u002Frun_batch_evaluation.py): CLI tool for batch evaluations\n","# Azure AI Projects Python SDK (Foundry SDK)\n\nBuild AI applications on Microsoft Foundry using the `azure-ai-projects` SDK.\n\n## Installation\n\n```bash\npip install azure-ai-projects azure-identity\n```\n\n## Environment Variables\n\n```bash\nAZURE_AI_PROJECT_ENDPOINT=\"https:\u002F\u002F\u003Cresource>.services.ai.azure.com\u002Fapi\u002Fprojects\u002F\u003Cproject>\"  # Required for all auth methods\nAZURE_AI_MODEL_DEPLOYMENT_NAME=\"gpt-4o-mini\"  # Required for all auth methods\nAZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production\n```\n\n## Authentication & Lifecycle\n\n> **? Two rules apply to every code sample below:**\n>\n> 1. **Prefer `DefaultAzureCredential`.** It works locally (Azure CLI \u002F VS Code \u002F Developer CLI) and in Azure (managed identity, workload identity) with no code change. Avoid connection strings, account\u002FAPI keys — they bypass Entra audit and rotation.\n>    - Local dev: `DefaultAzureCredential` works as-is.\n>    - Production: set `AZURE_TOKEN_CREDENTIALS=prod` (or `AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>`) to constrain the credential chain to production-safe credentials.\n> 2. **Wrap every client in a context manager** so HTTP transports, sockets, and token caches are released deterministically:\n>    - Sync: `with \u003CClient>(...) as client:`\n>    - Async: `async with \u003CClient>(...) as client:` **and** `async with DefaultAzureCredential() as credential:` (from `azure.identity.aio`)\n>\n> Snippets may abbreviate this setup, but production code should always follow both rules.\n\n```python\nimport os\nfrom azure.identity import DefaultAzureCredential, ManagedIdentityCredential\nfrom azure.ai.projects import AIProjectClient\n\n# Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>\ncredential = DefaultAzureCredential()\n# Or use a specific credential directly in production:\n# See https:\u002F\u002Flearn.microsoft.com\u002Fpython\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-python#credential-classes\n# credential = ManagedIdentityCredential()\nwith AIProjectClient(\n    endpoint=os.environ[\"AZURE_AI_PROJECT_ENDPOINT\"],\n    credential=credential,\n) as client:\n    deployments = list(client.deployments.list())\n```\n\n## Client Operations Overview\n\n| Operation | Access | Purpose |\n|-----------|--------|---------|\n| `client.agents` | `.agents.*` | Agent CRUD, versions, threads, runs |\n| `client.connections` | `.connections.*` | List\u002Fget project connections |\n| `client.deployments` | `.deployments.*` | List model deployments |\n| `client.datasets` | `.datasets.*` | Dataset management |\n| `client.indexes` | `.indexes.*` | Index management |\n| `client.evaluations` | `.evaluations.*` | Run evaluations |\n| `client.red_teams` | `.red_teams.*` | Red team operations |\n\n## Two Client Approaches\n\n### 1. AIProjectClient (Native Foundry)\n\n```python\nfrom azure.ai.projects import AIProjectClient\n\nwith AIProjectClient(\n    endpoint=os.environ[\"AZURE_AI_PROJECT_ENDPOINT\"],\n    credential=DefaultAzureCredential(),\n) as client:\n    # Use Foundry-native operations\n    agent = client.agents.create_agent(\n        model=os.environ[\"AZURE_AI_MODEL_DEPLOYMENT_NAME\"],\n        name=\"my-agent\",\n        instructions=\"You are helpful.\",\n    )\n```\n\n### 2. OpenAI-Compatible Client\n\n```python\n# Get OpenAI-compatible client from project\nopenai_client = client.get_openai_client()\n\n# Use standard OpenAI API\nresponse = openai_client.chat.completions.create(\n    model=os.environ[\"AZURE_AI_MODEL_DEPLOYMENT_NAME\"],\n    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}],\n)\n```\n\n## Agent Operations\n\n### Create Agent (Basic)\n\n```python\nagent = client.agents.create_agent(\n    model=os.environ[\"AZURE_AI_MODEL_DEPLOYMENT_NAME\"],\n    name=\"my-agent\",\n    instructions=\"You are a helpful assistant.\",\n)\n```\n\n### Create Agent with Tools\n\n```python\nfrom azure.ai.agents.models import CodeInterpreterTool, FileSearchTool\n\nagent = client.agents.create_agent(\n    model=os.environ[\"AZURE_AI_MODEL_DEPLOYMENT_NAME\"],\n    name=\"tool-agent\",\n    instructions=\"You can execute code and search files.\",\n    tools=[CodeInterpreterTool(), FileSearchTool()],\n)\n```\n\n### Versioned Agents with PromptAgentDefinition\n\n```python\nfrom azure.ai.projects.models import PromptAgentDefinition\n\n# Create a versioned agent\nagent_version = client.agents.create_version(\n    agent_name=\"customer-support-agent\",\n    definition=PromptAgentDefinition(\n        model=os.environ[\"AZURE_AI_MODEL_DEPLOYMENT_NAME\"],\n        instructions=\"You are a customer support specialist.\",\n        tools=[],  # Add tools as needed\n    ),\n    version_label=\"v1.0\",\n)\n```\n\nSee [references\u002Fagents.md](references\u002Fagents.md) for detailed agent patterns.\n\n## Tools Overview\n\n| Tool | Class | Use Case |\n|------|-------|----------|\n| Code Interpreter | `CodeInterpreterTool` | Execute Python, generate files |\n| File Search | `FileSearchTool` | RAG over uploaded documents |\n| Bing Grounding | `BingGroundingTool` | Web search (requires connection) |\n| Azure AI Search | `AzureAISearchTool` | Search your indexes |\n| Function Calling | `FunctionTool` | Call your Python functions |\n| OpenAPI | `OpenApiTool` | Call REST APIs |\n| MCP | `McpTool` | Model Context Protocol servers |\n| Memory Search | `MemorySearchTool` | Search agent memory stores |\n| SharePoint | `SharepointGroundingTool` | Search SharePoint content |\n\nSee [references\u002Ftools.md](references\u002Ftools.md) for all tool patterns.\n\n## Thread and Message Flow\n\n```python\n# 1. Create thread\nthread = client.agents.threads.create()\n\n# 2. Add message\nclient.agents.messages.create(\n    thread_id=thread.id,\n    role=\"user\",\n    content=\"What's the weather like?\",\n)\n\n# 3. Create and process run\nrun = client.agents.runs.create_and_process(\n    thread_id=thread.id,\n    agent_id=agent.id,\n)\n\n# 4. Get response\nif run.status == \"completed\":\n    messages = client.agents.messages.list(thread_id=thread.id)\n    for msg in messages:\n        if msg.role == \"assistant\":\n            print(msg.content[0].text.value)\n```\n\n## Connections\n\n```python\n# List all connections\nconnections = client.connections.list()\nfor conn in connections:\n    print(f\"{conn.name}: {conn.connection_type}\")\n\n# Get specific connection\nconnection = client.connections.get(connection_name=\"my-search-connection\")\n```\n\nSee [references\u002Fconnections.md](references\u002Fconnections.md) for connection patterns.\n\n## Deployments\n\n```python\n# List available model deployments\ndeployments = client.deployments.list()\nfor deployment in deployments:\n    print(f\"{deployment.name}: {deployment.model}\")\n```\n\nSee [references\u002Fdeployments.md](references\u002Fdeployments.md) for deployment patterns.\n\n## Datasets and Indexes\n\n```python\n# List datasets\ndatasets = client.datasets.list()\n\n# List indexes\nindexes = client.indexes.list()\n```\n\nSee [references\u002Fdatasets-indexes.md](references\u002Fdatasets-indexes.md) for data operations.\n\n## Evaluation\n\n```python\n# Using OpenAI client for evals\nopenai_client = client.get_openai_client()\n\n# Create evaluation with built-in evaluators\neval_run = openai_client.evals.runs.create(\n    eval_id=\"my-eval\",\n    name=\"quality-check\",\n    data_source={\n        \"type\": \"custom\",\n        \"item_references\": [{\"item_id\": \"test-1\"}],\n    },\n    testing_criteria=[\n        {\"type\": \"fluency\"},\n        {\"type\": \"task_adherence\"},\n    ],\n)\n```\n\nSee [references\u002Fevaluation.md](references\u002Fevaluation.md) for evaluation patterns.\n\n## Async Client\n\n```python\nfrom azure.ai.projects.aio import AIProjectClient\n\nasync with AIProjectClient(\n    endpoint=os.environ[\"AZURE_AI_PROJECT_ENDPOINT\"],\n    credential=DefaultAzureCredential(),\n) as client:\n    agent = await client.agents.create_agent(...)\n    # ... async operations\n```\n\nSee [references\u002Fasync-patterns.md](references\u002Fasync-patterns.md) for async patterns.\n\n## Memory Stores\n\n```python\n# Create memory store for agent\nmemory_store = client.agents.create_memory_store(\n    name=\"conversation-memory\",\n)\n\n# Attach to agent for persistent memory\nagent = client.agents.create_agent(\n    model=os.environ[\"AZURE_AI_MODEL_DEPLOYMENT_NAME\"],\n    name=\"memory-agent\",\n    tools=[MemorySearchTool()],\n    tool_resources={\"memory\": {\"store_ids\": [memory_store.id]}},\n)\n```\n\n## Best Practices\n\n1. **Pick sync OR async and stay consistent.** Do not mix `azure.ai.projects` sync clients with `azure.ai.projects.aio` async clients in the same call path. Choose one mode per module.\n2. **Always use context managers for clients and async credentials.** Wrap every client in `with AIProjectClient(...) as client:` (sync) or `async with AIProjectClient(...) as client:` (async). For async `DefaultAzureCredential` from `azure.identity.aio`, also use `async with credential:` so tokens and transports are cleaned up.\n3. **Clean up agents** when done: `client.agents.delete_agent(agent.id)`\n4. **Use `create_and_process`** for simple runs, **streaming** for real-time UX\n5. **Use versioned agents** for production deployments\n6. **Prefer connections** for external service integration (AI Search, Bing, etc.)\n\n## SDK Comparison\n\n| Feature | `azure-ai-projects` | `azure-ai-agents` |\n|---------|---------------------|-------------------|\n| Level | High-level (Foundry) | Low-level (Agents) |\n| Client | `AIProjectClient` | `AgentsClient` |\n| Versioning | `create_version()` | Not available |\n| Connections | Yes | No |\n| Deployments | Yes | No |\n| Datasets\u002FIndexes | Yes | No |\n| Evaluation | Via OpenAI client | No |\n| When to use | Full Foundry integration | Standalone agent apps |\n\n## Reference Files\n\n- [references\u002Fagents.md](references\u002Fagents.md): Agent operations with PromptAgentDefinition\n- [references\u002Ftools.md](references\u002Ftools.md): All agent tools with examples\n- [references\u002Fevaluation.md](references\u002Fevaluation.md): Evaluation operations overview\n- [references\u002Fbuilt-in-evaluators.md](references\u002Fbuilt-in-evaluators.md): Complete built-in evaluator reference\n- [references\u002Fcustom-evaluators.md](references\u002Fcustom-evaluators.md): Code and prompt-based evaluator patterns\n- [references\u002Fconnections.md](references\u002Fconnections.md): Connection operations\n- [references\u002Fdeployments.md](references\u002Fdeployments.md): Deployment enumeration\n- [references\u002Fdatasets-indexes.md](references\u002Fdatasets-indexes.md): Dataset and index operations\n- [references\u002Fasync-patterns.md](references\u002Fasync-patterns.md): Async client usage\n- [references\u002Fapi-reference.md](references\u002Fapi-reference.md): Complete API reference for all 373 SDK exports (v2.0.0b4)\n- [scripts\u002Frun_batch_evaluation.py](scripts\u002Frun_batch_evaluation.py): CLI tool for batch evaluations\n",{"name":5,"license":15,"metadata":51,"description":7},{"author":12,"package":52,"version":53},"azure-ai-projects","1.0.0","main","3f5b461b2314e01c400564051e92469114c5b68f",".github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py",365,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills","https:\u002F\u002Fmicrosoft.github.io\u002Fskills\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-12 02:02:58",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add microsoft\u002Fskills --skill azure-ai-projects-py",{"tool":70,"command":71},"bunx","bunx skills add microsoft\u002Fskills --skill azure-ai-projects-py",{"tool":73,"command":74},"pnpm","pnpm dlx skills add microsoft\u002Fskills --skill azure-ai-projects-py","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py\u002FSKILL.md",true,[78,84,88,92,96,100,104,108,112,116,120],{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fagents.md","REFERENCE","参考文档",6869,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py\u002Freferences\u002Fagents.md",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fapi-reference.md",27988,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py\u002Freferences\u002Fapi-reference.md",{"path":89,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fasync-patterns.md",7009,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py\u002Freferences\u002Fasync-patterns.md",{"path":93,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Fbuilt-in-evaluators.md",11759,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py\u002Freferences\u002Fbuilt-in-evaluators.md",{"path":97,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Fconnections.md",4767,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py\u002Freferences\u002Fconnections.md",{"path":101,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Fcustom-evaluators.md",14411,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py\u002Freferences\u002Fcustom-evaluators.md",{"path":105,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":106,"sourceHtmlUrl":107},"references\u002Fdatasets-indexes.md",4272,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py\u002Freferences\u002Fdatasets-indexes.md",{"path":109,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":110,"sourceHtmlUrl":111},"references\u002Fdeployments.md",3569,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py\u002Freferences\u002Fdeployments.md",{"path":113,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":114,"sourceHtmlUrl":115},"references\u002Fevaluation.md",10975,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py\u002Freferences\u002Fevaluation.md",{"path":117,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":118,"sourceHtmlUrl":119},"references\u002Ftools.md",12016,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py\u002Freferences\u002Ftools.md",{"path":121,"resourceType":122,"resourceTypeDesc":123,"sizeBytes":124,"sourceHtmlUrl":125},"scripts\u002Frun_batch_evaluation.py","SCRIPT","脚本",12507,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-python\u002Fskills\u002Fazure-ai-projects-py\u002Fscripts\u002Frun_batch_evaluation.py",[127,147,184,211,231,268],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":134,"publishedAt":46},"01M69B4JCRQV5SPXAFCKXQRV0H","skill-creator","Guide for creating effective skills for AI coding agents working with Azure SDKs and Microsoft Foundry services. Use when creating new skills or updating existing skills.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fskill-creator\u002FSKILL.md",[133],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[135,136,137,9,44,138,139,25,140,141,142,40,143,35,144,32,145,31,146],"skill creator","creator","coding agents","microsoft foundry","ai coding agents","services","coding","guide","ai coding","sdks","Existing","new",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":163,"publishedAt":46},"01M69B4FD57V1MYKRWAJJECTZ7","podcast-generation","Generate AI-powered podcast-style audio narratives using Azure OpenAI's GPT Realtime Mini model via WebSocket. Use when building text-to-speech features, audio narrative generation, podcast creation from content, or integrating with Azure OpenAI Realtime API for real audio output. Covers full-stack implementation from React frontend to Python FastAPI backend with WebSocket streaming.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpodcast-generation\u002FSKILL.md",[153,156,159,162],{"categoryNo":154,"categoryName":155,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":157,"categoryName":158,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":160,"categoryName":161,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[164,165,166,167,41,168,169,25,170,171,172,173,174,175,176,177,178,179,180,181,182,31,183],"podcast generation","podcast","generation","frontend","react","realtime","azure openai","generate","streaming","api","Audio","stack","text","model","fastapi","creation","python fastapi","narrative","features","fastapi backend",{"skillNo":185,"name":186,"nameZh":6,"description":187,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":188,"categories":189,"keywords":191,"publishedAt":46},"01M69B4CYPM5SESY5ZWEFDXEQZ","microsoft-docs","Understand Microsoft technologies by querying official documentation. Use whenever the user asks how something works, wants tutorials, needs configuration options, limits, quotas, or best practices for any Microsoft technology (Azure, .NET, M365, Windows, Power Platform, etc.)—even if they don't mention \"docs.\" If the question is about understanding a concept rather than writing code, this is the right skill.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmicrosoft-docs\u002FSKILL.md",[190],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[192,9,193,194,195,196,197,198,199,200,201,25,202,203,204,40,205,67,206,207,208,209,210,32],"docs","microsoft docs","MCP","writing","cli","mcp server","windows","power platform","official","documentation","learn","best practices","question","power","back","technology","platform","learn mcp","concept",{"skillNo":212,"name":213,"nameZh":6,"description":214,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":215,"categories":216,"keywords":218,"publishedAt":46},"01M69B49C3YPD1ZJ3NC0HPCY58","mcp-builder","Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP), Node\u002FTypeScript (MCP SDK), or C#\u002F.NET (Microsoft MCP SDK).","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmcp-builder\u002FSKILL.md",[217],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[194,219,220,221,41,222,45,223,9,224,225,177,226,227,142,40,228,229,230,35,32,31],"mcp builder","builder","typescript","llms","model context protocol","fastmcp","Tools","node","context","integrate","mcp sdk","building mcp servers",{"skillNo":232,"name":233,"nameZh":6,"description":234,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":235,"categories":236,"keywords":249,"publishedAt":46},"01M69B467A7CDMFQ0T6Q0ZA12Q","kql","KQL language expertise for writing correct, efficient Kusto Query Language queries. Covers syntax gotchas, join patterns, dynamic types, datetime pitfalls, regex patterns, serialization, memory management, result-size discipline, and advanced functions (geo, vector, graph). USE THIS SKILL whenever writing, debugging, or reviewing KQL queries — even simple ones — because the gotchas section prevents the most common errors that waste tool calls and cause expensive retry cascades. Trigger on: KQL, Kusto, ADX, Azure Data Explorer, Fabric Real-Time Intelligence, EventHouse, Log Analytics, log analysis, data exploration, time series, anomaly detection, summarize, where clause, join, extend, project, let statement, parse operator, extract function, any mention of pipe-forward query syntax.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fkql\u002FSKILL.md",[237,240,241,246],{"categoryNo":238,"categoryName":239,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":242,"categoryName":243,"taxonomyType":244,"taxonomyTypeDesc":245},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",{"categoryNo":247,"categoryName":248,"taxonomyType":244,"taxonomyTypeDesc":245},"01JBSEEDCAT000000000000036","内容创作者",[233,195,250,251,252,25,253,254,255,256,257,258,259,260,261,36,262,263,264,32,265,266,267],"summarize","memory","analytics","vector","time series","tool","discipline","log","geo","exploration","pipe","time","regex","join","datetime","section","anomaly","parse",{"skillNo":269,"name":270,"nameZh":6,"description":271,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":272,"categories":273,"keywords":274,"publishedAt":46},"01M69B44HJQ7897EZ7NE7DWQX3","github-issue-creator","Convert raw notes, error logs, voice dictation, or screenshots into crisp GitHub-flavored markdown issue reports. Use when the user pastes bug info, error messages, or informal descriptions and wants a structured GitHub issue. Supports images\u002FGIFs for visual evidence.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgithub-issue-creator\u002FSKILL.md",[],[275,276,277,278,136,279,280,281,282,283,284,285,40,286,287,288,289,290,291,32,31],"github","github issue creator","github issue","issue","issue creator","screenshots","notes","logs","error messages","messages","convert","evidence","reports","images","info","visual","error"]