技能 Azure.AI.Projects (.NET)
📦

Azure.AI.Projects (.NET)

安全

Build AI agents with Azure AI Foundry for .NET

Developers struggle to integrate Azure AI Foundry services into .NET applications. This skill provides complete SDK guidance for agents, connections, datasets, and evaluations with production-ready patterns.

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

下载技能 ZIP

2

在 Claude 中上传

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

3

开启并开始使用

测试它

正在使用“Azure.AI.Projects (.NET)”。 Create a math tutor agent that can solve equations step by step

预期结果:

Agent created with ID 'agent-12345'. Instructions set to guide users through equation solving with step-by-step explanations. Thread initialized and ready for user queries.

正在使用“Azure.AI.Projects (.NET)”。 Evaluate my agent's responses for relevance and accuracy

预期结果:

Evaluation job 'eval-67890' completed. Relevance score: 0.87, Accuracy score: 0.92. 15 of 20 test cases passed. Detailed report available in Azure AI Foundry portal.

安全审计

安全
v1 • 2/24/2026

This is a documentation-only skill providing guidance for Azure AI Projects SDK for .NET. Static analysis found 0 security issues with a risk score of 0/100. The skill contains code examples that follow Azure security best practices including DefaultAzureCredential for authentication and async patterns for I/O operations. No executable code, network calls, or suspicious patterns detected.

0
已扫描文件
0
分析行数
0
发现项
1
审计总数
未发现安全问题
审计者: claude

质量评分

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

你能构建什么

Enterprise AI Agent Development

Build production AI agents with persistent threads, tool integration, and versioned deployments for enterprise applications.

AI Model Evaluation Pipeline

Create automated evaluation workflows for AI models using built-in evaluators for relevance, fluency, and groundedness metrics.

RAG Solution with Azure AI Search

Implement retrieval-augmented generation solutions connecting AI agents to Azure AI Search indexes for knowledge-based responses.

试试这些提示

Basic Agent Setup
Help me create a simple persistent agent using Azure.AI.Projects SDK. I need an agent that can answer customer support questions using the gpt-4o-mini model. Show me the authentication setup and basic agent creation code.
Agent with File Search
I want to create an agent that can search through uploaded documentation files. Show me how to configure the FileSearchToolDefinition, upload a dataset, and attach it to a persistent agent in Azure AI Foundry.
Versioned Agent Deployment
Explain how to use Azure.AI.Projects.OpenAI package to create versioned agents. I need to deploy an agent with web search tools, get the response client, and manage agent versions for production rollout.
Evaluation Framework Setup
Help me set up an evaluation pipeline for my AI agent. Show me how to configure the Relevance evaluator, create an input dataset, run the evaluation, and interpret the results using the EvaluationsClient.

最佳实践

  • Use DefaultAzureCredential for production authentication to leverage managed identities and avoid hardcoded credentials
  • Always use async methods for I/O operations and poll with 500ms delays when waiting for agent runs to complete
  • Clean up resources by deleting threads, agents, and datasets when no longer needed to avoid unnecessary costs

避免

  • Do not use includeCredentials: true unless you specifically need credential values - this exposes sensitive information
  • Avoid synchronous methods in production code as they block threads and reduce scalability
  • Do not store agent or thread IDs in client-side code without proper validation and access controls

常见问题

What is the difference between AIProjectClient and PersistentAgentsClient?
AIProjectClient is the main entry point for all Azure AI Foundry operations. GetPersistentAgentsClient() returns a specialized client for low-level agent operations including thread management and run execution.
Do I need preview packages to use Azure AI Projects SDK?
The core SDK (Azure.AI.Projects) is generally available. Preview packages like Azure.AI.Projects.OpenAI and Azure.AI.Agents.Persistent are only needed for advanced features like versioned agents and low-level operations.
How do I authenticate to Azure AI Foundry from my .NET application?
Use DefaultAzureCredential which automatically tries multiple authentication methods including managed identities, Azure CLI credentials, and environment variables. This is the recommended approach for production deployments.
Can I use Azure AI Projects SDK with existing OpenAI code?
Yes, you can get an AzureOpenAIClient from the project client and use standard OpenAI chat completions. The SDK provides GetConnection and GetProjectResponsesClientForAgent methods for OpenAI integration.
What tools are available for Azure AI agents?
Available tools include Code Interpreter for Python execution, File Search for document queries, Bing Grounding for web search, Azure AI Search for custom indexes, OpenAPI for external APIs, Azure Functions, and MCP for Model Context Protocol.
How do I handle errors when calling Azure AI Foundry APIs?
Wrap API calls in try-catch blocks and handle RequestFailedException. Check the Status code, ErrorCode, and Message properties to determine the appropriate retry or fallback behavior.

开发者详情

文件结构

📄 SKILL.md