Registry / azure / agent-framework-azure-ai

agent-framework-azure-ai

JSON →
library1.0.0rc6pypypi✓ verified 21d ago

The `agent-framework-azure-ai` library provides an integration layer for various Azure AI services (e.g., Azure OpenAI, Azure AI Search, Azure Speech, Azure Vision) with the Microsoft Agent Framework. It enables developers to easily incorporate these powerful Azure capabilities into their agent-based applications. Currently at version `1.0.0rc6`, its release cadence is tied to the evolving Microsoft Agent Framework and Azure AI services, with new release candidates emerging as features stabilize.

pip install agent-framework-azure-ai
INSTALL
IMPORT
SIG · AGENT-FRAMEWORK-AZ
A
agent-framework-azure-ai
azurepythonv1.0.0rc6
Install
10.8s avg
Import
Disk
110MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.0rc6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 13.2s
py 3.11
✓ —
✓ 10.9s
py 3.12
✓ —
✓ 9.1s
py 3.13
✓ —
✓ 9.9s
py 3.9
✕ build_error
✕ build_error
110MB installed
● package 110MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AzureOpenAIService
from agent_framework_azure_ai.azure_open_ai_service import AzureOpenAIService
AzureAISearchService
from agent_framework_azure_ai.ai_search_service import AzureAISearchService
AzureSpeechService
from agent_framework_azure_ai.azure_speech_service import AzureSpeechService
AzureVisionService
from agent_framework_azure_ai.azure_vision_service import AzureVisionService
Agent
from agent_framework.core.agent import Agent
Imported from the parent `agent-framework` library.

This quickstart demonstrates how to initialize the `AzureOpenAIService` provided by the library and integrate it as an LLM with the Microsoft Agent Framework. It requires proper Azure OpenAI service credentials set as environment variables.

import os from agent_framework.core.agent import Agent from agent_framework.core.model import ModelConfig from agent_framework_azure_ai.azure_open_ai_service import AzureOpenAIService # Ensure environment variables are set for Azure OpenAI azure_openai_endpoint = os.environ.get("AZURE_OPENAI_ENDPOINT", "https://YOUR_AZURE_OPENAI_ENDPOINT.openai.azure.com/") azure_openai_api_key = os.environ.get("AZURE_OPENAI_API_KEY", "YOUR_AZURE_OPENAI_API_KEY") azure_openai_deployment_name = os.environ.get("AZURE_OPENAI_DEPLOYMENT_NAME", "YOUR_DEPLOYMENT_NAME") if "YOUR_AZURE_OPENAI" in azure_openai_endpoint or "YOUR_AZURE_OPENAI" in azure_openai_api_key or "YOUR_DEPLOYMENT_NAME" in azure_openai_deployment_name: print("Please set AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_API_KEY, and AZURE_OPENAI_DEPLOYMENT_NAME environment variables.") print("Example: export AZURE_OPENAI_ENDPOINT='https://your-resource.openai.azure.com/'") print("Example: export AZURE_OPENAI_API_KEY='...' ") print("Example: export AZURE_OPENAI_DEPLOYMENT_NAME='gpt-4o' ") exit(1) # 1. Initialize the Azure OpenAI Service as an LLM azure_llm_service = AzureOpenAIService( azure_endpoint=azure_openai_endpoint, api_key=azure_openai_api_key, deployment_name=azure_openai_deployment_name, model_config=ModelConfig(max_tokens=256) # Optional: Configure LLM behavior ) # 2. Create an Agent and provide it the Azure LLM agent = Agent(name="AzureAIAgent").with_llm(azure_llm_service) # 3. Use the agent to get a response print(f"Agent '{agent.name}' is ready to chat...") response = agent.chat("What is the capital of France?") print(f"Agent response: {response.output}") # Example with a simple tool (if using other Azure AI services as tools) # from agent_framework.core.tool import Tool # class MyAzureAISearchTool(Tool): # def call(self, query: str) -> str: # # Placeholder for actual Azure AISearchService logic # return f"Searching Azure AI Search for: {query}" # agent.with_tool(MyAzureAISearchTool()) # response_with_tool = agent.chat("Find documents about renewable energy.")
Debug
Known issues
breakingThis library is currently in Release Candidate (RC) status (`1.0.0rc6`). APIs, module paths, and behaviors are subject to significant change without backward compatibility guarantees until a stable `1.0.0` release. Users should expect frequent updates and potential breaking changes.
fix
Regularly check the official GitHub repository and PyPI for updates. Pin dependency versions for production, but anticipate necessary code modifications during upgrades.
affects: Pre-1.0.0 releases (e.g., all `rc` versions)
gotchaThis library is an extension for the `agent-framework`. It *requires* `agent-framework` to be installed and understood. Core concepts like `Agent`, `LLM`, `Tool` come from the parent framework, not this library.
fix
Familiarize yourself with the `agent-framework` documentation before using this integration library.
affects: All versions
gotchaProper configuration of Azure AI service credentials (endpoint, API key, deployment name, etc.) via environment variables or explicit parameters is critical. Misconfigurations often lead to authentication errors or incorrect service routing.
fix
Ensure `AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_API_KEY`, `AZURE_OPENAI_DEPLOYMENT_NAME` (and similar for other services) are correctly set. Double-check your Azure resource configurations.
affects: All versions
breakingThe library explicitly pins `pydantic<2` in its `install_requires`. Using `pydantic>=2` in your project alongside this library will cause dependency conflicts and likely runtime errors.
fix
Ensure your project's `pydantic` version is less than 2. If other dependencies require `pydantic>=2`, you may face irreconcilable conflicts until this library updates its `pydantic` compatibility.
affects: All versions up to `1.0.0rc6`
Upgrade
Version history
1.0.0rc6latest on PyPI · released Mar 30, 2026
Audit
Dependencies
agent-frameworkrequiredCore dependency; this library extends the Microsoft Agent Framework.
openairequiredRequired for Azure OpenAI service integration, especially for API calls.
pydanticrequiredDependency for data validation, explicitly pinned to `<2`.
azure-search-documentsoptionalRequired only if using Azure AI Search service integration.
azure-cognitiveservices-speechoptionalRequired only if using Azure Speech service integration.
azure-ai-visionoptionalRequired only if using Azure Vision service integration.
Agent activity
73 hits · last 30 days
node
64
Perplexity
1
OpenAI (training)
1
Resources
agent-framework-azure-ai — pip install agent-framework-azure-ai · libregistry