技能 agent-framework-azure-ai-py
📦

agent-framework-azure-ai-py

安全 ⚡ 包含脚本⚙️ 外部命令🌐 网络访问

Build Azure AI Foundry Agents

Create persistent AI agents on Azure AI Foundry using the Microsoft Agent Framework Python SDK. This skill provides code examples for building agents with hosted tools, function tools, and conversation threads.

支持: Claude Codex Code(CC)
🥉 72 青铜
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“agent-framework-azure-ai-py”。 Create a basic Azure AI agent

预期结果:

The agent will be created with AzureAIAgentsProvider. It can then process user queries and return responses using the configured instructions and tools.

正在使用“agent-framework-azure-ai-py”。 What's the weather in Seattle?

预期结果:

Weather in Seattle: 72°F, sunny

正在使用“agent-framework-azure-ai-py”。 Calculate factorial of 20

预期结果:

The agent uses HostedCodeInterpreterTool to execute Python code and return the result: 2432902008176640000

质量评分

38
架构
100
可维护性
87
内容
31
社区
100
安全
100
规范符合性

你能构建什么

Build Customer Service Agents

Create persistent AI agents that maintain conversation context across multiple interactions

Research Assistant with Tools

Build agents that can search the web, execute code, and analyze results

Enterprise Workflow Automation

Create agents that integrate with enterprise systems via MCP tools

试试这些提示

Basic Agent Setup
Create an Azure AI Foundry agent named 'MyAgent' with the instruction 'You are a helpful assistant' using the agent-framework-azure-ai-py skill.
Agent with Function Tools
Create an agent that can get weather information. Define a get_weather function that takes a location parameter and returns weather data.
Agent with Hosted Tools
Build an agent using HostedCodeInterpreterTool and HostedWebSearchTool that can execute Python code and search the web.
Multi-turn Conversation
Create an agent that maintains conversation context across multiple turns using thread management.

最佳实践

  • Always use async context managers (async with) for proper resource cleanup
  • Pass functions directly to the tools parameter - they are auto-converted to AIFunction
  • Use Annotated[type, Field(description=...)] for function parameters to provide clear descriptions
  • Use get_new_thread() for multi-turn conversations to maintain context

避免

  • Do not use synchronous operations inside async functions - this will cause deadlocks
  • Avoid hardcoding credentials - use AzureCliCredential or DefaultAzureCredential
  • Do not skip the async context manager - always use 'async with' for providers
  • Avoid passing non-async functions directly without proper wrapping

常见问题

What is Azure AI Foundry?
Azure AI Foundry is Microsoft's platform for building, deploying, and managing AI applications and agents at scale.
Do I need an Azure subscription?
Yes, you need an Azure subscription with Azure AI Foundry provisioned to use this skill.
What authentication methods are supported?
Use AzureCliCredential for development and DefaultAzureCredential for production deployments.
Can I use Claude Code with Azure AI agents?
Yes, this skill works with Claude, Codex, and Claude Code for building Azure AI Foundry agents.
What are hosted tools?
Hosted tools are Azure-managed capabilities including code interpreter, file search, and web search that agents can use.
How do I manage conversation state?
Use thread objects (get_new_thread()) to maintain conversation context across multiple agent interactions.

开发者详情

文件结构

📄 SKILL.md