Registry / llm-agents / agent-framework-azure-ai-search

agent-framework-azure-ai-search

JSON →
library1.0.0b260521pypiunverified

The `agent-framework-azure-ai-search` library provides an integration for Azure AI Search with Microsoft's Agent Framework. It offers an `AzureAISearch` tool wrapper, enabling agents to perform search queries against Azure AI Search indexes. Currently in beta version `1.0.0b260409`, its development is active with frequent updates as part of the broader Agent Framework initiative.

pip install agent-framework-azure-ai-search
INSTALL
IMPORT
SIG · AGENT-FRAMEWORK-AZ
A
agent-framework-azure-ai-search
llm-agentsenv1.0.0b260521
Install
4.4s avg
Import
Disk
42MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.0b260521 · 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
✓ —
✓ 5.2s
py 3.11
✓ —
✓ 4.4s
py 3.12
✓ —
✓ 3.95s
py 3.13
✓ —
✓ 4.05s
py 3.9
✕ build_error
✕ build_error
42MB installed
● package 42MB
Code
Verified usage

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

AzureAISearch
from agent_framework_azure_ai_search.tool import AzureAISearch
from agent_framework_azure_ai_search import AzureAISearch
The `AzureAISearch` class is located within the `tool` submodule, not directly at the top-level package.

This quickstart demonstrates how to initialize the `AzureAISearch` tool and invoke it directly. It highlights the required environment variables for authentication and target index, and shows how to perform a search query. For full integration, this tool would be passed to an `Agent` instance from `agent-framework-core`.

import asyncio import os from agent_framework_azure_ai_search.tool import AzureAISearch async def main(): # Set these environment variables or replace with actual values # AZURE_AI_SEARCH_ENDPOINT = os.environ.get('AZURE_AI_SEARCH_ENDPOINT', 'YOUR_AI_SEARCH_ENDPOINT') # AZURE_AI_SEARCH_API_KEY = os.environ.get('AZURE_AI_SEARCH_API_KEY', 'YOUR_AI_SEARCH_API_KEY') # AZURE_AI_SEARCH_INDEX_NAME = os.environ.get('AZURE_AI_SEARCH_INDEX_NAME', 'YOUR_AI_SEARCH_INDEX_NAME') # The AzureAISearch tool automatically picks up environment variables. # Ensure AZURE_AI_SEARCH_ENDPOINT and AZURE_AI_SEARCH_API_KEY are set. # AZURE_AI_SEARCH_INDEX_NAME is optional for default index. # For demonstration, we'll try to get values from env, provide placeholders if not found endpoint = os.environ.get('AZURE_AI_SEARCH_ENDPOINT', 'https://example.search.windows.net') api_key = os.environ.get('AZURE_AI_SEARCH_API_KEY', 'YOUR_AI_SEARCH_API_KEY') index_name = os.environ.get('AZURE_AI_SEARCH_INDEX_NAME', 'your-default-index') if endpoint == 'https://example.search.windows.net' or api_key == 'YOUR_AI_SEARCH_API_KEY': print("WARNING: Azure AI Search credentials or endpoint not set. Using placeholder values.") print("Please set AZURE_AI_SEARCH_ENDPOINT and AZURE_AI_SEARCH_API_KEY environment variables.") return # Temporarily set environment variables for quickstart if not already present # In a real application, set them once before running. os.environ['AZURE_AI_SEARCH_ENDPOINT'] = endpoint os.environ['AZURE_AI_SEARCH_API_KEY'] = api_key os.environ['AZURE_AI_SEARCH_INDEX_NAME'] = index_name try: # Create an instance of the Azure AI Search tool search_tool = AzureAISearch() # Example of invoking the tool directly (as an agent might) print(f"Searching for 'Python programming language':") result = await search_tool.invoke(query='Python programming language', index_name=index_name) print(f"Search Result: {result[:500]}...") # Truncate for display except Exception as e: print(f"An error occurred: {e}") finally: # Clean up temporary environment variables if 'AZURE_AI_SEARCH_ENDPOINT' in os.environ: del os.environ['AZURE_AI_SEARCH_ENDPOINT'] if 'AZURE_AI_SEARCH_API_KEY' in os.environ: del os.environ['AZURE_AI_SEARCH_API_KEY'] if 'AZURE_AI_SEARCH_INDEX_NAME' in os.environ: del os.environ['AZURE_AI_SEARCH_INDEX_NAME'] if __name__ == '__main__': asyncio.run(main())
Debug
Known issues
breakingAs a beta library, `agent-framework-azure-ai-search` is subject to frequent breaking changes. API signatures, class names, or configuration methods may change without a major version bump, following the active development of the broader Agent Framework.
fix
Pin your dependency to an exact version (`agent-framework-azure-ai-search==X.Y.Z`) and review changelogs or GitHub releases frequently when upgrading.
affects: All beta versions (e.x., 1.0.0bX)
gotchaIncorrect or missing environment variables for Azure AI Search (`AZURE_AI_SEARCH_ENDPOINT`, `AZURE_AI_SEARCH_API_KEY`) are common causes of runtime errors. The tool relies on these for authentication.
fix
Ensure `AZURE_AI_SEARCH_ENDPOINT` (your Azure AI Search service URL) and `AZURE_AI_SEARCH_API_KEY` (an admin API key) are correctly set in your environment before initializing the `AzureAISearch` tool. Optionally, set `AZURE_AI_SEARCH_INDEX_NAME` for a default index.
affects: All versions
gotchaThis package is part of the Microsoft Agent Framework ecosystem. Compatibility issues can arise if the `agent-framework-core` dependency is not aligned with the version expected by this package. The specified dependency is `agent-framework-core>=1.0.0b240327`.
fix
Always install `agent-framework-core` and `agent-framework-azure-ai-search` in compatible versions. Refer to the `pyproject.toml` for specific version requirements of `agent-framework-core`.
affects: All versions
Upgrade
Version history
1.0.0b260521latest on PyPI · released May 22, 2026
Audit
Dependencies
agent-framework-corerequiredRequired for core agent framework functionality, including `Agent` and `Agency` classes.
azure-search-documentsrequiredUnderlying Azure SDK for interacting with Azure AI Search.
Agent activity
75 hits · last 30 days
node
64
Bingbot
1
Perplexity
1
OpenAI (training)
1
Resources

No resource links recorded.

agent-framework-azure-ai-search — pip install agent-framework-azure-ai-search · libregistry