Azure AI Foundry Agent Framework
Helps Python developers build persistent Azure AI Foundry agents with hosted tools, MCP integrations, threads, and streaming.
The skill recommends DefaultAzureCredential, production credential constraints, and context-managed clients, reducing credential exposure and resource-leak risk. However, multiple HostedMCPTool examples use never_require approval and show bearer API keys, file uploads, and external API calls without default confirmation, data-flow/retention disclosure, least-privilege boundaries, or rollback guidance, so points are deducted.
Architecture, installation, authentication, threads, tools, MCP, and error-handling paths are documented, including retry and fallback examples. However, dependencies use --pre, key APIs are not reproduced by skill-specific tests, exception handling is broad, and compatibility and diagnosable failure guidance are incomplete, so the static score is conservative.
The intended audience and core scenarios are clear: persistent agents, hosted tools, MCP, threads, and streaming. Non-fit boundaries, trigger exclusions, service-availability constraints, Chinese support, and mainland-China network reachability are not addressed, while core functionality depends on Azure services, so points are deducted.
The documentation is layered and links four focused reference files, with installation, environment variables, examples, some operational guidance, MIT licensing, author, and version metadata. It lacks a changelog, compatibility matrix, explicit maintenance/update path, systematic FAQ, and fuller preview-dependency disclosure, so points are deducted.
Examples cover basic agents, function tools, hosted tools, streaming, threads, structured outputs, MCP, retries, and fallbacks, making the skill potentially useful as implementation guidance. However, all key outcomes require real Azure configuration and services, examples contain placeholders, and no skill-specific verified outputs or alternative comparisons are provided, so the static cap and uncertainty reduce the score.
The supplied files contain auditable snippets, configuration details, and repository-level CI/test material, providing limited traceability. They do not show a committed test suite covering this skill's key paths or third-party execution evidence, so API correctness cannot be confirmed statically and the score remains conservative.
- Do not use approval_mode="never_require" by default for MCP tools with write, delete, private-data, or external side effects; require approval selectively and restrict allowed_tools.
- Do not copy bearer API keys, project endpoints, file contents, or thread identifiers from examples into production; verify credentials, data flows, retention, and permission scope.
- Installation uses --pre, and examples depend on Azure AI Foundry, Bing, MCP endpoints, and network reachability; pin compatible versions and validate mainland-China connectivity and regional service availability before deployment.
What it does & when to use it
This Agent Skill targets developers building persistent agents on Azure AI Foundry with the Microsoft Agent Framework Python SDK. It covers AzureAIAgentsProvider, function tools, hosted code and search tools, MCP, conversation threads, streaming responses, and structured outputs. The guidance prioritizes DefaultAzureCredential and deterministic cleanup through asynchronous context managers. It is a strong fit for teams that already have an Azure AI Foundry project and want implementation patterns in Python; it is not a standalone runtime or a complete Azure deployment guide.
It guides a coding agent in producing asynchronous Python code that installs agent-framework or agent-framework-azure-ai, configures an Azure AI Foundry project endpoint and model deployment, creates or retrieves agents through AzureAIAgentsProvider, registers functions and hosted tools, calls Agent.run() or Agent.run_stream(), preserves multi-turn context with AgentThread, and validates structured responses with Pydantic models. It also demonstrates HostedMCPTool, MCPStreamableHTTPTool, and Bing search connections.
- A Python developer needs an asynchronous Azure AI Foundry agent with custom function tools.
- A team wants an agent that can execute code, search files, or perform Bing web searches.
- An application must preserve multi-turn context and resume conversations through AgentThread.
- A developer needs responses validated against a Pydantic structured-output model.
- A team needs to connect service-managed or client-managed MCP tools.
- An application needs to display agent responses incrementally through streaming.
Pros & cons
- Covers a broad end-to-end workflow: agents, function tools, hosted tools, MCP, threads, streaming, and structured outputs.
- Provides explicit credential, production configuration, and resource-cleanup guidance.
- Includes reusable Python examples and a concise provider-method reference.
- Uses the MIT license, and the repository identifies itself as actively maintained and expanding.
- Requires an Azure AI Foundry project endpoint, model deployment, and appropriate identity permissions; permission details are not specified.
- Web search requires a separate Bing connection ID, while MCP examples depend on an accessible MCP service.
- Examples install pre-release packages with --pre; no version pinning or compatibility matrix is provided.
- The supplied material does not show independent test coverage or detailed error-handling guidance for this specific skill.
- The scope is Azure AI Foundry with the Python Agent Framework SDK and should not be treated as coverage for sibling SDK skills.
How to install
Install the collection with npx skills add microsoft/skills, then select the required skill in the wizard. The README says skills are installed into the selected coding agent's directory, such as .github/skills/ for GitHub Copilot. This skill's source file is .github/plugins/azure-sdk-python/skills/agent-framework-azure-ai-py/SKILL.md. For the code examples, install either pip install agent-framework --pre or pip install agent-framework-azure-ai --pre. The source does not specify a fixed Python version, standalone CLI, or separately published skill package.
How to use
After loading the skill into a coding agent, use a request such as: “Build a persistent Azure AI Foundry agent with the Microsoft Agent Framework Python SDK, DefaultAzureCredential, hosted code execution, MCP, conversation threads, and streaming.” Set AZURE_AI_PROJECT_ENDPOINT and AZURE_AI_MODEL_DEPLOYMENT_NAME before running the generated code. Web search additionally requires BING_CONNECTION_ID. For production use of DefaultAzureCredential, the source recommends AZURE_TOKEN_CREDENTIALS=prod or a specific credential and requires async context managers for credentials and clients.