Registry /
azure / agent-framework-purview
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
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 40.5MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 4.0s · import 0.000s · 40MB
35MB installed
● package 35MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PurviewAgent
✓ from agent_framework_purview.purview_agent import PurviewAgent
AgentProcessor
✓ from agent_framework.core.processor import AgentProcessor
DefaultAzureCredential
✓ from azure.identity.aio import DefaultAzureCredential
This quickstart demonstrates how to initialize the `PurviewAgent` and use it to interact with Azure Purview. It sets up `DefaultAzureCredential` for authentication and configures the agent with the Purview account name. It then invokes the agent to 'find assets' based on a query string. Ensure your Azure environment variables for authentication (e.g., `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`) and `AZURE_PURVIEW_ACCOUNT_NAME` are set.
import os
import asyncio
from agent_framework_purview.purview_agent import PurviewAgent
from agent_framework.core.processor import AgentProcessor
from azure.identity.aio import DefaultAzureCredential
async def main():
# Ensure AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, etc., are set
# for DefaultAzureCredential to authenticate. For local development,
# 'az login' or environment variables are common. For production,
# Managed Identity is recommended.
credential = DefaultAzureCredential()
# The Purview Agent requires the Azure Purview account name.
# Replace 'your_purview_account_name' or set AZURE_PURVIEW_ACCOUNT_NAME env var.
purview_account_name = os.environ.get(
"AZURE_PURVIEW_ACCOUNT_NAME", "your_purview_account_name"
)
if purview_account_name == "your_purview_account_name":
print("WARNING: Please set AZURE_PURVIEW_ACCOUNT_NAME environment variable or update the code.")
return
purview_agent_config = {
"azure_purview_account_name": purview_account_name,
"purview_scope": ["https://purview.azure.net/.default"], # Standard scope
}
try:
purview_agent: PurviewAgent = await AgentProcessor.create_agent(
PurviewAgent,
credential=credential,
config=purview_agent_config
)
print(f"Agent created for Purview account: {purview_account_name}")
# Example invocation: find assets matching a query string
print("Invoking agent to find assets...")
response = await purview_agent.invoke(
"find assets",
query_string="Sales Data"
)
print("\n--- Purview Agent Response ---")
print(f"Content: {response.content}")
if response.citations:
print(f"Citations: {response.citations}")
else:
print("No citations found.")
except Exception as e:
print(f"An error occurred: {e}")
finally:
await credential.close()
if __name__ == "__main__":
asyncio.run(main())
Debug
Known issues
breakingThis library is in beta (`1.x.x` versions starting with `b`). API surfaces, configuration options, and internal implementations are subject to change without strict adherence to semantic versioning until a stable `1.0.0` release.fixMonitor GitHub repository and PyPI for updates. Test thoroughly when upgrading between beta versions and before moving to production.
affects: All beta versions (1.0.0b*)
gotchaProper Azure authentication setup is crucial. `DefaultAzureCredential` relies on environment variables, Azure CLI login, Managed Identity, etc. Incorrect setup will lead to authentication errors.fixEnsure environment variables like `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET` are correctly configured, or use `az login` (for CLI credential), or configure Managed Identity for Azure-hosted services. Refer to `azure-identity` documentation.
affects: All versions
gotchaThis library is an extension of the `agent-framework` core library. It is not standalone and requires `agent-framework` to be installed and used for agent creation and processing.fixEnsure `agent-framework` is installed alongside `agent-framework-purview`. Understand the `AgentProcessor` patterns for creating and invoking agents.
affects: All versions
gotchaMost interactions with the Purview agent, including its initialization (`AgentProcessor.create_agent`) and invocation (`purview_agent.invoke`), are asynchronous. Users must use `async/await` and run their code within an `asyncio` event loop.fixWrap your agent code in an `async` function and run it using `asyncio.run(your_async_function())`.
affects: All versions
gotchaThe `PurviewAgentConfig` requires the `azure_purview_account_name` parameter to specify which Purview account to connect to. Failing to provide this will result in configuration errors or inability to connect.fixProvide the `azure_purview_account_name` in the `config` dictionary when calling `AgentProcessor.create_agent`, or ensure it's loaded from environment variables if the agent's internal configuration supports it.
affects: All versions
Upgrade
Version history
1.0.0b260521latest on PyPI · released May 22, 2026
Audit
Dependencies
agent-frameworkrequiredCore dependency for the underlying agent framework functionality.
azure-identityrequiredRequired for Azure authentication, often via DefaultAzureCredential.
msgraph-corerequiredProvides core functionality for interacting with Microsoft Graph APIs.
azure-purview-datamaprequiredProvides Purview Data Map client functionality.
pydanticrequiredUsed for data validation and settings management.
python-dotenvoptionalOptional for loading environment variables from .env files during local development.