Agent Framework Azure Hosted Agents Skill · Data Ai

Agent Framework Azure Hosted Agents

Master 1 core workflow to build persistent agents on Azure AI Foundry using the Microsoft Agent Framework Python SDK.

Start building today!

  • Azure AI Foundry
  • Python SDK
  • Agentic Workflows
  • Cloud Orchestration
  • Persistent State

About This Skill

Leverage the Microsoft Agent Framework Python SDK to build persistent agents. This framework provides 1 streamlined core workflow for managing AzureAIAgentsProvider, tools, and conversation persistence.

Quick Start

  1. 1Install the framework using pip install agent-framework-azure-ai --pre
  2. 2Configure your AZURE_AI_PROJECT_ENDPOINT environment variable
  3. 3Initialize the AzureAIAgentsProvider with AzureCliCredential
Example Command
pip install agent-framework-azure-ai --pre

Core Capabilities

Architecture

A robust multi-layer flow from User Query through AzureAIAgentsProvider to persistent Agent Service.

Installation

Easy deployment via pip for both the full framework and Azure-specific lightweight packages.

Environment Variables

Seamless configuration of project endpoints, model deployments, and Bing connection IDs.

Authentication

Secure integration using AzureCliCredential for development and DefaultAzureCredential for production.

Usage Examples

Before

Manual management of stateless API calls and conversation history.

After

Persistent AgentThread handling conversation state automatically on Azure.

Before

Hardcoded logic for tool execution.

After

Dynamic tool calling via the AzureAIAgentsProvider.

Before

Waiting for the full JSON payload to arrive.

After

Immediate user feedback via token streaming.

SKILL.md

---
name: agent-framework-azure-ai-py
description: "Build persistent agents on Azure AI Foundry using the Microsoft Agent Framework Python SDK."
risk: unknown
source: community
date_added: "2026-02-27"
---

# Agent Framework Azure Hosted Agents

Build persistent agents on Azure AI Foundry using the Microsoft Agent Framework Python SDK.

## Architecture

```
User Query → AzureAIAgentsProvider → Azure AI Agent Service (Persistent)
                    ↓
              Agent.run() / Agent.run_stream()
                    ↓
              Tools: Functions | Hosted (Code/Search/Web) | MCP
                    ↓
              AgentThread (conversation persistence)
```

## Installation

```bash
# Full framework (recommended)
pip install agent-framework --pre

# Or Azure-specific package only
pip install agent-framework-azure-ai --pre
```

## Environment Variables

```bash
export AZURE_AI_PROJECT_ENDPOINT="https://<project>.services.ai.azure.com/api/projects/<project-id>"
export AZURE_AI_MODEL_DEPLOYMENT_NAME="gpt-4o-mini"
export BING_CONNECTION_ID="your-bing-connection-id"  # For web search
```

## Authentication

```python
from azure.identity.aio import AzureCliCredential, DefaultAzureCredential

# Development
credential = AzureCliCredential()

# Production
credential = DefaultAzureCredential()
```

## Core Workflow

### Basic Agent

```python
import asyncio
from agent_framework.azure import AzureAIAgentsProvider
from azure.identity.aio import AzureCliCredential

async def main():
    async with (
        AzureCliCredential() as credential,
        AzureAIAgentsProvider(credential=credential) as provider,
    ):
        agent = await provider.create_agent(
            name="MyAgent",
            instructions="You are a helpful assistant.",
        )
        
        result = await agent.run("Hello!")
        print(result.text)

asyncio.run(main())
```

### Agent with Function Tools

```python
from typing import Annotated
from pydantic import Field
from agent_framework.azure i

Frequently Asked Questions

FAQ

What tool compatibility does the framework support?
It supports Functions, Hosted tools (Code/Search/Web), and the Model Context Protocol (MCP).
Who is the target audience for this skill?
Primarily AI Engineers, Python Developers, and Cloud Architects working within the Azure ecosystem.
How does this differ from standard OpenAI API calls?
Unlike standard calls, this framework provides built-in persistence, Azure AI Foundry integration, and managed agent threads.
Is there support for different authentication methods?
Yes, it supports AzureCliCredential for local dev and DefaultAzureCredential for production environments.
What are the expected results after deployment?
You will achieve scalable, persistent agents capable of complex tool use and long-running conversations on Azure.

Discussion

Discussion

0 comments
U

Trigger Phrases

Use these phrases to activate this skill in your AI coding assistant:

Create Azure AgentDeploy persistent agentInitialize AzureAIAgentsProviderRun agent streamConfigure agent tools
Agent Framework Azure AI Agent Skill for Developers