Azure AI Language Conversations Py
MicrosoftOfficialCreated by Microsoft
- Skill
- Tool integration
- Data and AI
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides guidance and code patterns for using the azure-ai-language-conversations Python SDK to perform Conversational Language Understanding (CLU). It focuses on using the ConversationAnalysisClient to analyze user input for intents and entities, supporting both standard and orchestration-based projects. The documentation emphasizes secure authentication via DefaultAzureCredential and the use of context managers for resource lifecycle management.
What it does
- Provides patterns for initializing the ConversationAnalysisClient.
- Demonstrates how to structure conversation payloads for intent and entity analysis.
- Shows how to implement secure authentication using DefaultAzureCredential.
- Includes examples for configuring retry policies for transient errors.
- Explains how to filter results based on confidence scores.
- Covers routing logic for orchestration-based CLU projects.
When to use it
- When integrating natural language understanding into Python applications.
- When building conversational interfaces that require intent classification.
- When extracting entities from user-provided text.
- When migrating from legacy API key authentication to Entra ID.
Advantages
- Promotes secure, portable authentication patterns.
- Ensures deterministic resource cleanup using context managers.
- Provides clear examples for both sync and async development patterns.
- Offers guidance on handling advanced scenarios like confidence filtering and retries.
Usage examples
- “How do I analyze a user query for intent using the Azure AI Language SDK?”
- The agent provides a code snippet using ConversationAnalysisClient to send a text query to a deployed CLU project and extract the top intent.
- “How can I filter out low-confidence intent predictions in my Python code?”
- The agent demonstrates how to access the confidence score from the prediction result and implement a threshold check before processing the intent.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/microsoft/azure-ai-language-conversations-py/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip azure-ai-language-conversations-py.zip -d .agents/skills
Documentation by Microsoft
Azure AI Language Conversations for Python
System Prompt
You are an expert Python developer specializing in Azure AI Services and Natural Language Processing.
Your task is to help users implement Conversational Language Understanding (CLU) using the azure-ai-language-conversations SDK.
When responding to requests about Azure AI Language Conversations:
Always use the latest version of the
azure-ai-language-conversationsSDK.Emphasize the use of
ConversationAnalysisClientwithDefaultAzureCredential.Provide clear code examples demonstrating how to structure the conversation payload.
Handle exceptions properly.
Authentication & Lifecycle
🔑 Two rules apply to every code sample below:
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:
DefaultAzureCredentialworks as-is.Production: set
AZURE_TOKEN_CREDENTIALS=prod(orAZURE_TOKEN_CREDENTIALS=<specific_credential>) to constrain the credential chain to production-safe credentials.Wrap every client in a context manager so HTTP transports, sockets, and token caches are released deterministically:
Sync:
with <Client>(...) as client:Async:
async with <Client>(...) as client:andasync with DefaultAzureCredential() as credential:(fromazure.identity.aio)Snippets may abbreviate this setup, but production code should always follow both rules.
ConversationAnalysisClient accepts a TokenCredential such as DefaultAzureCredential. Use the token credential — it works locally (Azure CLI / VS Code / Developer CLI) and in Azure (managed identity, workload identity) with no code change.
Legacy: API Key (existing keyed deployments)
New code should use DefaultAzureCredential. Use AzureKeyCredential only if you have an existing keyed deployment that hasn't been migrated to Entra ID yet — for example, regulated environments still completing their Entra rollout.
import os
from azure.core.credentials import AzureKeyCredential
from azure.ai.language.conversations import ConversationAnalysisClient
endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"]
key = os.environ["AZURE_CONVERSATIONS_KEY"]
with ConversationAnalysisClient(endpoint, AzureKeyCredential(key)) as client:
# See "Basic Conversation Analysis" below for the analyze_conversation payload
...Best Practices
Pick sync OR async and stay consistent. Do not mix
azure.ai.language.conversationssync clients withazure.ai.language.conversations.aioasync clients in the same call path. Choose one mode per module.Always use context managers for clients and async credentials. Wrap every client in
with ConversationAnalysisClient(...) as client:(sync) orasync with ConversationAnalysisClient(...) as client:(async). For asyncDefaultAzureCredentialfromazure.identity.aio, also useasync with credential:so tokens and transports are cleaned up.Use
DefaultAzureCredentialfor portable auth across local dev and Azure (avoid API keys; they bypass Entra audit and rotation).Use environment variables for the endpoint, project name, and deployment name.
Clearly map the
participantIdandidin theconversationItempayload.
Examples
Basic Conversation Analysis
import os
from azure.identity import DefaultAzureCredential
from azure.ai.language.conversations import ConversationAnalysisClient
endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"]
project_name = os.environ["AZURE_CONVERSATIONS_PROJECT"]
deployment_name = os.environ["AZURE_CONVERSATIONS_DEPLOYMENT"]
# DefaultAzureCredential works locally and in Azure with no code change.
credential = DefaultAzureCredential()
with ConversationAnalysisClient(endpoint, credential) as client:
query = "Send an email to Carol about the tomorrow's meeting"
result = client.analyze_conversation(
task={
"kind": "Conversation",
"analysisInput": {
"conversationItem": {
"participantId": "1",
"id": "1",
"modality": "text",
"language": "en",
"text": query
},
"isLoggingEnabled": False
},
"parameters": {
"projectName": project_name,
"deploymentName": deployment_name,
"verbose": True
}
}
)
print(f"Top intent: {result['result']['prediction']['topIntent']}")Reference Files
| File | Contents |
|---|---|
| references/capabilities.md | Additional non-hero capabilities, operation-group coverage, and production checklists. |
| references/non-hero-scenarios.md | Dedicated non-hero examples for secondary/advanced scenarios. |
Files
- ATTRIBUTION.mdAdded by AutoGineer1013 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md5.4 KiB
- references/capabilities.md1.1 KiB
- references/non-hero-scenarios.md5.3 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs an API key, Needs Python
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Microsoft
- Publisher
- Microsoft (Official)
- Source
- microsoft/skills · .github/plugins/azure-sdk-python/skills/azure-ai-language-conversations-py · commit 0696600
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Microsoft.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download azure-ai-language-conversations-py.zip