[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69AMKB8QF04SRFBVA02MXP7":3,"skill-same:01M69AMKB8QF04SRFBVA02MXP7":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":58,"ownerHtmlUrl":59,"ownerBlogUrl":60,"ownerDescription":61,"updatedAt":62,"install":63,"resources":76},"01M69AMKB8QF04SRFBVA02MXP7","azure-ai-projects-dotnet",null,"Azure AI Projects SDK for .NET. High-level client for Azure AI Foundry projects including agents, connections, datasets, deployments, evaluations, and indexes. Use for AI Foundry project management, versioned agents, and orchestration. Triggers: \"AI Projects\", \"AIProjectClient\", \"Foundry project\", \"versioned agents\", \"evaluations\", \"datasets\", \"connections\", \"deployments .NET\".","microsoft\u002Fskills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69AJYYW4E1RMSYCQDJ4FJSH",3195,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-dotnet\u002Fskills\u002Fazure-ai-projects-dotnet\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,9,43],"dotnet","azure ai","azure","azure ai projects dotnet","azure ai projects","projects","for","sdk","high","client","triggers","project","connections","indexes","datasets","deployments","use","azure ai foundry","foundry","orchestration","2026-11-10 10:12:30",false,"---\nname: azure-ai-projects-dotnet\ndescription: |\n  Azure AI Projects SDK for .NET. High-level client for Azure AI Foundry projects including agents, connections, datasets, deployments, evaluations, and indexes. Use for AI Foundry project management, versioned agents, and orchestration. Triggers: \"AI Projects\", \"AIProjectClient\", \"Foundry project\", \"versioned agents\", \"evaluations\", \"datasets\", \"connections\", \"deployments .NET\".\nlicense: MIT\nmetadata:\n  author: Microsoft\n  version: \"1.0.0\"\n  package: Azure.AI.Projects\n---\n\n# Azure.AI.Projects (.NET)\n\nHigh-level SDK for Azure AI Foundry project operations including agents, connections, datasets, deployments, evaluations, and indexes.\n\n## Installation\n\n```bash\ndotnet add package Azure.AI.Projects\ndotnet add package Azure.Identity\n\n# Optional: For versioned agents with OpenAI extensions\ndotnet add package Azure.AI.Projects.OpenAI --prerelease\n\n# Optional: For low-level agent operations\ndotnet add package Azure.AI.Agents.Persistent --prerelease\n```\n\n**Current Versions**: GA v1.1.0, Preview v1.2.0-beta.5\n\n## Environment Variables\n\n```bash\nPROJECT_ENDPOINT=https:\u002F\u002F\u003Cresource>.services.ai.azure.com\u002Fapi\u002Fprojects\u002F\u003Cproject>  # Required: Azure AI project endpoint\nMODEL_DEPLOYMENT_NAME=gpt-4o-mini  # Required: model deployment name\nCONNECTION_NAME=\u003Cyour-connection-name>  # Optional: project connection name\nAI_SEARCH_CONNECTION_NAME=\u003Cai-search-connection>  # Optional: Azure AI Search connection name\nAZURE_TOKEN_CREDENTIALS=prod  # Required only if DefaultAzureCredential is used in production\n```\n\n## Authentication\n\n```csharp\nusing Azure.Identity;\nusing Azure.AI.Projects;\n\nvar endpoint = Environment.GetEnvironmentVariable(\"PROJECT_ENDPOINT\");\n\u002F\u002F Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>\nvar credential = new DefaultAzureCredential(\n    DefaultAzureCredential.DefaultEnvironmentVariableName\n);\n\u002F\u002F Or use a specific credential directly in production:\n\u002F\u002F See https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-dotnet#credential-classes\n\u002F\u002F var credential = new ManagedIdentityCredential();\nAIProjectClient projectClient = new AIProjectClient(\n    new Uri(endpoint), \n    credential);\n```\n\n## Client Hierarchy\n\n```\nAIProjectClient\n├── Agents          → AIProjectAgentsOperations (versioned agents)\n├── Connections     → ConnectionsClient\n├── Datasets        → DatasetsClient\n├── Deployments     → DeploymentsClient\n├── Evaluations     → EvaluationsClient\n├── Evaluators      → EvaluatorsClient\n├── Indexes         → IndexesClient\n├── Telemetry       → AIProjectTelemetry\n├── OpenAI          → ProjectOpenAIClient (preview)\n└── GetPersistentAgentsClient() → PersistentAgentsClient\n```\n\n## Core Workflows\n\n### 1. Get Persistent Agents Client\n\n```csharp\n\u002F\u002F Get low-level agents client from project client\nPersistentAgentsClient agentsClient = projectClient.GetPersistentAgentsClient();\n\n\u002F\u002F Create agent\nPersistentAgent agent = await agentsClient.Administration.CreateAgentAsync(\n    model: \"gpt-4o-mini\",\n    name: \"Math Tutor\",\n    instructions: \"You are a personal math tutor.\");\n\n\u002F\u002F Create thread and run\nPersistentAgentThread thread = await agentsClient.Threads.CreateThreadAsync();\nawait agentsClient.Messages.CreateMessageAsync(thread.Id, MessageRole.User, \"Solve 3x + 11 = 14\");\nThreadRun run = await agentsClient.Runs.CreateRunAsync(thread.Id, agent.Id);\n\n\u002F\u002F Poll for completion\ndo\n{\n    await Task.Delay(500);\n    run = await agentsClient.Runs.GetRunAsync(thread.Id, run.Id);\n}\nwhile (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress);\n\n\u002F\u002F Get messages\nawait foreach (var msg in agentsClient.Messages.GetMessagesAsync(thread.Id))\n{\n    foreach (var content in msg.ContentItems)\n    {\n        if (content is MessageTextContent textContent)\n            Console.WriteLine(textContent.Text);\n    }\n}\n\n\u002F\u002F Cleanup\nawait agentsClient.Threads.DeleteThreadAsync(thread.Id);\nawait agentsClient.Administration.DeleteAgentAsync(agent.Id);\n```\n\n### 2. Versioned Agents with Tools (Preview)\n\n```csharp\nusing Azure.AI.Projects.OpenAI;\n\n\u002F\u002F Create agent with web search tool\nPromptAgentDefinition agentDefinition = new(model: \"gpt-4o-mini\")\n{\n    Instructions = \"You are a helpful assistant that can search the web\",\n    Tools = {\n        ResponseTool.CreateWebSearchTool(\n            userLocation: WebSearchToolLocation.CreateApproximateLocation(\n                country: \"US\",\n                city: \"Seattle\",\n                region: \"Washington\"\n            )\n        ),\n    }\n};\n\nAgentVersion agentVersion = await projectClient.Agents.CreateAgentVersionAsync(\n    agentName: \"myAgent\",\n    options: new(agentDefinition));\n\n\u002F\u002F Get response client\nProjectResponsesClient responseClient = projectClient.OpenAI.GetProjectResponsesClientForAgent(agentVersion.Name);\n\n\u002F\u002F Create response\nResponseResult response = responseClient.CreateResponse(\"What's the weather in Seattle?\");\nConsole.WriteLine(response.GetOutputText());\n\n\u002F\u002F Cleanup\nprojectClient.Agents.DeleteAgentVersion(agentName: agentVersion.Name, agentVersion: agentVersion.Version);\n```\n\n### 3. Connections\n\n```csharp\n\u002F\u002F List all connections\nforeach (AIProjectConnection connection in projectClient.Connections.GetConnections())\n{\n    Console.WriteLine($\"{connection.Name}: {connection.ConnectionType}\");\n}\n\n\u002F\u002F Get specific connection\nAIProjectConnection conn = projectClient.Connections.GetConnection(\n    connectionName, \n    includeCredentials: true);\n\n\u002F\u002F Get default connection\nAIProjectConnection defaultConn = projectClient.Connections.GetDefaultConnection(\n    includeCredentials: false);\n```\n\n### 4. Deployments\n\n```csharp\n\u002F\u002F List all deployments\nforeach (AIProjectDeployment deployment in projectClient.Deployments.GetDeployments())\n{\n    Console.WriteLine($\"{deployment.Name}: {deployment.ModelName}\");\n}\n\n\u002F\u002F Filter by publisher\nforeach (var deployment in projectClient.Deployments.GetDeployments(modelPublisher: \"Microsoft\"))\n{\n    Console.WriteLine(deployment.Name);\n}\n\n\u002F\u002F Get specific deployment\nModelDeployment details = (ModelDeployment)projectClient.Deployments.GetDeployment(\"gpt-4o-mini\");\n```\n\n### 5. Datasets\n\n```csharp\n\u002F\u002F Upload single file\nFileDataset fileDataset = projectClient.Datasets.UploadFile(\n    name: \"my-dataset\",\n    version: \"1.0\",\n    filePath: \"data\u002Ftraining.txt\",\n    connectionName: connectionName);\n\n\u002F\u002F Upload folder\nFolderDataset folderDataset = projectClient.Datasets.UploadFolder(\n    name: \"my-dataset\",\n    version: \"2.0\",\n    folderPath: \"data\u002Ftraining\",\n    connectionName: connectionName,\n    filePattern: new Regex(\".*\\\\.txt\"));\n\n\u002F\u002F Get dataset\nAIProjectDataset dataset = projectClient.Datasets.GetDataset(\"my-dataset\", \"1.0\");\n\n\u002F\u002F Delete dataset\nprojectClient.Datasets.Delete(\"my-dataset\", \"1.0\");\n```\n\n### 6. Indexes\n\n```csharp\n\u002F\u002F Create Azure AI Search index\nAzureAISearchIndex searchIndex = new(aiSearchConnectionName, aiSearchIndexName)\n{\n    Description = \"Sample Index\"\n};\n\nsearchIndex = (AzureAISearchIndex)projectClient.Indexes.CreateOrUpdate(\n    name: \"my-index\",\n    version: \"1.0\",\n    index: searchIndex);\n\n\u002F\u002F List indexes\nforeach (AIProjectIndex index in projectClient.Indexes.GetIndexes())\n{\n    Console.WriteLine(index.Name);\n}\n\n\u002F\u002F Delete index\nprojectClient.Indexes.Delete(name: \"my-index\", version: \"1.0\");\n```\n\n### 7. Evaluations\n\n```csharp\n\u002F\u002F Create evaluation configuration\nvar evaluatorConfig = new EvaluatorConfiguration(id: EvaluatorIDs.Relevance);\nevaluatorConfig.InitParams.Add(\"deployment_name\", BinaryData.FromObjectAsJson(\"gpt-4o\"));\n\n\u002F\u002F Create evaluation\nEvaluation evaluation = new Evaluation(\n    data: new InputDataset(\"\u003Cdataset_id>\"),\n    evaluators: new Dictionary\u003Cstring, EvaluatorConfiguration> \n    { \n        { \"relevance\", evaluatorConfig } \n    }\n)\n{\n    DisplayName = \"Sample Evaluation\"\n};\n\n\u002F\u002F Run evaluation\nEvaluation result = projectClient.Evaluations.Create(evaluation: evaluation);\n\n\u002F\u002F Get evaluation\nEvaluation getResult = projectClient.Evaluations.Get(result.Name);\n\n\u002F\u002F List evaluations\nforeach (var eval in projectClient.Evaluations.GetAll())\n{\n    Console.WriteLine($\"{eval.DisplayName}: {eval.Status}\");\n}\n```\n\n### 8. Get Azure OpenAI Chat Client\n\n```csharp\nusing Azure.AI.OpenAI;\nusing OpenAI.Chat;\n\nClientConnection connection = projectClient.GetConnection(typeof(AzureOpenAIClient).FullName!);\n\nif (!connection.TryGetLocatorAsUri(out Uri uri) || uri is null)\n    throw new InvalidOperationException(\"Invalid URI.\");\n\nuri = new Uri($\"https:\u002F\u002F{uri.Host}\");\n\nAzureOpenAIClient azureOpenAIClient = new AzureOpenAIClient(uri, new DefaultAzureCredential());\nChatClient chatClient = azureOpenAIClient.GetChatClient(\"gpt-4o-mini\");\n\nChatCompletion result = chatClient.CompleteChat(\"List all rainbow colors\");\nConsole.WriteLine(result.Content[0].Text);\n```\n\n## Available Agent Tools\n\n| Tool | Class | Purpose |\n|------|-------|---------|\n| Code Interpreter | `CodeInterpreterToolDefinition` | Execute Python code |\n| File Search | `FileSearchToolDefinition` | Search uploaded files |\n| Function Calling | `FunctionToolDefinition` | Call custom functions |\n| Bing Grounding | `BingGroundingToolDefinition` | Web search via Bing |\n| Azure AI Search | `AzureAISearchToolDefinition` | Search Azure AI indexes |\n| OpenAPI | `OpenApiToolDefinition` | Call external APIs |\n| Azure Functions | `AzureFunctionToolDefinition` | Invoke Azure Functions |\n| MCP | `MCPToolDefinition` | Model Context Protocol tools |\n\n## Key Types Reference\n\n| Type | Purpose |\n|------|---------|\n| `AIProjectClient` | Main entry point |\n| `PersistentAgentsClient` | Low-level agent operations |\n| `PromptAgentDefinition` | Versioned agent definition |\n| `AgentVersion` | Versioned agent instance |\n| `AIProjectConnection` | Connection to Azure resource |\n| `AIProjectDeployment` | Model deployment info |\n| `AIProjectDataset` | Dataset metadata |\n| `AIProjectIndex` | Search index metadata |\n| `Evaluation` | Evaluation configuration and results |\n\n## Best Practices\n\n1. **Use `DefaultAzureCredential`** for production authentication\n2. **Use async methods** (`*Async`) for all I\u002FO operations\n3. **Poll with appropriate delays** (500ms recommended) when waiting for runs\n4. **Clean up resources** — delete threads, agents, and files when done\n5. **Use versioned agents** (via `Azure.AI.Projects.OpenAI`) for production scenarios\n6. **Store connection IDs** rather than names for tool configurations\n7. **Use `includeCredentials: true`** only when credentials are needed\n8. **Handle pagination** — use `AsyncPageable\u003CT>` for listing operations\n\n## Error Handling\n\n```csharp\nusing Azure;\n\ntry\n{\n    var result = await projectClient.Evaluations.CreateAsync(evaluation);\n}\ncatch (RequestFailedException ex)\n{\n    Console.WriteLine($\"Error: {ex.Status} - {ex.ErrorCode}: {ex.Message}\");\n}\n```\n\n## Related SDKs\n\n| SDK | Purpose | Install |\n|-----|---------|---------|\n| `Azure.AI.Projects` | High-level project client (this SDK) | `dotnet add package Azure.AI.Projects` |\n| `Azure.AI.Agents.Persistent` | Low-level agent operations | `dotnet add package Azure.AI.Agents.Persistent` |\n| `Azure.AI.Projects.OpenAI` | Versioned agents with OpenAI | `dotnet add package Azure.AI.Projects.OpenAI` |\n\n## Reference Links\n\n| Resource | URL |\n|----------|-----|\n| NuGet Package | https:\u002F\u002Fwww.nuget.org\u002Fpackages\u002FAzure.AI.Projects |\n| API Reference | https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fazure.ai.projects |\n| GitHub Source | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-net\u002Ftree\u002Fmain\u002Fsdk\u002Fai\u002FAzure.AI.Projects |\n| Samples | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-net\u002Ftree\u002Fmain\u002Fsdk\u002Fai\u002FAzure.AI.Projects\u002Fsamples |\n","# Azure.AI.Projects (.NET)\n\nHigh-level SDK for Azure AI Foundry project operations including agents, connections, datasets, deployments, evaluations, and indexes.\n\n## Installation\n\n```bash\ndotnet add package Azure.AI.Projects\ndotnet add package Azure.Identity\n\n# Optional: For versioned agents with OpenAI extensions\ndotnet add package Azure.AI.Projects.OpenAI --prerelease\n\n# Optional: For low-level agent operations\ndotnet add package Azure.AI.Agents.Persistent --prerelease\n```\n\n**Current Versions**: GA v1.1.0, Preview v1.2.0-beta.5\n\n## Environment Variables\n\n```bash\nPROJECT_ENDPOINT=https:\u002F\u002F\u003Cresource>.services.ai.azure.com\u002Fapi\u002Fprojects\u002F\u003Cproject>  # Required: Azure AI project endpoint\nMODEL_DEPLOYMENT_NAME=gpt-4o-mini  # Required: model deployment name\nCONNECTION_NAME=\u003Cyour-connection-name>  # Optional: project connection name\nAI_SEARCH_CONNECTION_NAME=\u003Cai-search-connection>  # Optional: Azure AI Search connection name\nAZURE_TOKEN_CREDENTIALS=prod  # Required only if DefaultAzureCredential is used in production\n```\n\n## Authentication\n\n```csharp\nusing Azure.Identity;\nusing Azure.AI.Projects;\n\nvar endpoint = Environment.GetEnvironmentVariable(\"PROJECT_ENDPOINT\");\n\u002F\u002F Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>\nvar credential = new DefaultAzureCredential(\n    DefaultAzureCredential.DefaultEnvironmentVariableName\n);\n\u002F\u002F Or use a specific credential directly in production:\n\u002F\u002F See https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-dotnet#credential-classes\n\u002F\u002F var credential = new ManagedIdentityCredential();\nAIProjectClient projectClient = new AIProjectClient(\n    new Uri(endpoint), \n    credential);\n```\n\n## Client Hierarchy\n\n```\nAIProjectClient\n├── Agents          → AIProjectAgentsOperations (versioned agents)\n├── Connections     → ConnectionsClient\n├── Datasets        → DatasetsClient\n├── Deployments     → DeploymentsClient\n├── Evaluations     → EvaluationsClient\n├── Evaluators      → EvaluatorsClient\n├── Indexes         → IndexesClient\n├── Telemetry       → AIProjectTelemetry\n├── OpenAI          → ProjectOpenAIClient (preview)\n└── GetPersistentAgentsClient() → PersistentAgentsClient\n```\n\n## Core Workflows\n\n### 1. Get Persistent Agents Client\n\n```csharp\n\u002F\u002F Get low-level agents client from project client\nPersistentAgentsClient agentsClient = projectClient.GetPersistentAgentsClient();\n\n\u002F\u002F Create agent\nPersistentAgent agent = await agentsClient.Administration.CreateAgentAsync(\n    model: \"gpt-4o-mini\",\n    name: \"Math Tutor\",\n    instructions: \"You are a personal math tutor.\");\n\n\u002F\u002F Create thread and run\nPersistentAgentThread thread = await agentsClient.Threads.CreateThreadAsync();\nawait agentsClient.Messages.CreateMessageAsync(thread.Id, MessageRole.User, \"Solve 3x + 11 = 14\");\nThreadRun run = await agentsClient.Runs.CreateRunAsync(thread.Id, agent.Id);\n\n\u002F\u002F Poll for completion\ndo\n{\n    await Task.Delay(500);\n    run = await agentsClient.Runs.GetRunAsync(thread.Id, run.Id);\n}\nwhile (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress);\n\n\u002F\u002F Get messages\nawait foreach (var msg in agentsClient.Messages.GetMessagesAsync(thread.Id))\n{\n    foreach (var content in msg.ContentItems)\n    {\n        if (content is MessageTextContent textContent)\n            Console.WriteLine(textContent.Text);\n    }\n}\n\n\u002F\u002F Cleanup\nawait agentsClient.Threads.DeleteThreadAsync(thread.Id);\nawait agentsClient.Administration.DeleteAgentAsync(agent.Id);\n```\n\n### 2. Versioned Agents with Tools (Preview)\n\n```csharp\nusing Azure.AI.Projects.OpenAI;\n\n\u002F\u002F Create agent with web search tool\nPromptAgentDefinition agentDefinition = new(model: \"gpt-4o-mini\")\n{\n    Instructions = \"You are a helpful assistant that can search the web\",\n    Tools = {\n        ResponseTool.CreateWebSearchTool(\n            userLocation: WebSearchToolLocation.CreateApproximateLocation(\n                country: \"US\",\n                city: \"Seattle\",\n                region: \"Washington\"\n            )\n        ),\n    }\n};\n\nAgentVersion agentVersion = await projectClient.Agents.CreateAgentVersionAsync(\n    agentName: \"myAgent\",\n    options: new(agentDefinition));\n\n\u002F\u002F Get response client\nProjectResponsesClient responseClient = projectClient.OpenAI.GetProjectResponsesClientForAgent(agentVersion.Name);\n\n\u002F\u002F Create response\nResponseResult response = responseClient.CreateResponse(\"What's the weather in Seattle?\");\nConsole.WriteLine(response.GetOutputText());\n\n\u002F\u002F Cleanup\nprojectClient.Agents.DeleteAgentVersion(agentName: agentVersion.Name, agentVersion: agentVersion.Version);\n```\n\n### 3. Connections\n\n```csharp\n\u002F\u002F List all connections\nforeach (AIProjectConnection connection in projectClient.Connections.GetConnections())\n{\n    Console.WriteLine($\"{connection.Name}: {connection.ConnectionType}\");\n}\n\n\u002F\u002F Get specific connection\nAIProjectConnection conn = projectClient.Connections.GetConnection(\n    connectionName, \n    includeCredentials: true);\n\n\u002F\u002F Get default connection\nAIProjectConnection defaultConn = projectClient.Connections.GetDefaultConnection(\n    includeCredentials: false);\n```\n\n### 4. Deployments\n\n```csharp\n\u002F\u002F List all deployments\nforeach (AIProjectDeployment deployment in projectClient.Deployments.GetDeployments())\n{\n    Console.WriteLine($\"{deployment.Name}: {deployment.ModelName}\");\n}\n\n\u002F\u002F Filter by publisher\nforeach (var deployment in projectClient.Deployments.GetDeployments(modelPublisher: \"Microsoft\"))\n{\n    Console.WriteLine(deployment.Name);\n}\n\n\u002F\u002F Get specific deployment\nModelDeployment details = (ModelDeployment)projectClient.Deployments.GetDeployment(\"gpt-4o-mini\");\n```\n\n### 5. Datasets\n\n```csharp\n\u002F\u002F Upload single file\nFileDataset fileDataset = projectClient.Datasets.UploadFile(\n    name: \"my-dataset\",\n    version: \"1.0\",\n    filePath: \"data\u002Ftraining.txt\",\n    connectionName: connectionName);\n\n\u002F\u002F Upload folder\nFolderDataset folderDataset = projectClient.Datasets.UploadFolder(\n    name: \"my-dataset\",\n    version: \"2.0\",\n    folderPath: \"data\u002Ftraining\",\n    connectionName: connectionName,\n    filePattern: new Regex(\".*\\\\.txt\"));\n\n\u002F\u002F Get dataset\nAIProjectDataset dataset = projectClient.Datasets.GetDataset(\"my-dataset\", \"1.0\");\n\n\u002F\u002F Delete dataset\nprojectClient.Datasets.Delete(\"my-dataset\", \"1.0\");\n```\n\n### 6. Indexes\n\n```csharp\n\u002F\u002F Create Azure AI Search index\nAzureAISearchIndex searchIndex = new(aiSearchConnectionName, aiSearchIndexName)\n{\n    Description = \"Sample Index\"\n};\n\nsearchIndex = (AzureAISearchIndex)projectClient.Indexes.CreateOrUpdate(\n    name: \"my-index\",\n    version: \"1.0\",\n    index: searchIndex);\n\n\u002F\u002F List indexes\nforeach (AIProjectIndex index in projectClient.Indexes.GetIndexes())\n{\n    Console.WriteLine(index.Name);\n}\n\n\u002F\u002F Delete index\nprojectClient.Indexes.Delete(name: \"my-index\", version: \"1.0\");\n```\n\n### 7. Evaluations\n\n```csharp\n\u002F\u002F Create evaluation configuration\nvar evaluatorConfig = new EvaluatorConfiguration(id: EvaluatorIDs.Relevance);\nevaluatorConfig.InitParams.Add(\"deployment_name\", BinaryData.FromObjectAsJson(\"gpt-4o\"));\n\n\u002F\u002F Create evaluation\nEvaluation evaluation = new Evaluation(\n    data: new InputDataset(\"\u003Cdataset_id>\"),\n    evaluators: new Dictionary\u003Cstring, EvaluatorConfiguration> \n    { \n        { \"relevance\", evaluatorConfig } \n    }\n)\n{\n    DisplayName = \"Sample Evaluation\"\n};\n\n\u002F\u002F Run evaluation\nEvaluation result = projectClient.Evaluations.Create(evaluation: evaluation);\n\n\u002F\u002F Get evaluation\nEvaluation getResult = projectClient.Evaluations.Get(result.Name);\n\n\u002F\u002F List evaluations\nforeach (var eval in projectClient.Evaluations.GetAll())\n{\n    Console.WriteLine($\"{eval.DisplayName}: {eval.Status}\");\n}\n```\n\n### 8. Get Azure OpenAI Chat Client\n\n```csharp\nusing Azure.AI.OpenAI;\nusing OpenAI.Chat;\n\nClientConnection connection = projectClient.GetConnection(typeof(AzureOpenAIClient).FullName!);\n\nif (!connection.TryGetLocatorAsUri(out Uri uri) || uri is null)\n    throw new InvalidOperationException(\"Invalid URI.\");\n\nuri = new Uri($\"https:\u002F\u002F{uri.Host}\");\n\nAzureOpenAIClient azureOpenAIClient = new AzureOpenAIClient(uri, new DefaultAzureCredential());\nChatClient chatClient = azureOpenAIClient.GetChatClient(\"gpt-4o-mini\");\n\nChatCompletion result = chatClient.CompleteChat(\"List all rainbow colors\");\nConsole.WriteLine(result.Content[0].Text);\n```\n\n## Available Agent Tools\n\n| Tool | Class | Purpose |\n|------|-------|---------|\n| Code Interpreter | `CodeInterpreterToolDefinition` | Execute Python code |\n| File Search | `FileSearchToolDefinition` | Search uploaded files |\n| Function Calling | `FunctionToolDefinition` | Call custom functions |\n| Bing Grounding | `BingGroundingToolDefinition` | Web search via Bing |\n| Azure AI Search | `AzureAISearchToolDefinition` | Search Azure AI indexes |\n| OpenAPI | `OpenApiToolDefinition` | Call external APIs |\n| Azure Functions | `AzureFunctionToolDefinition` | Invoke Azure Functions |\n| MCP | `MCPToolDefinition` | Model Context Protocol tools |\n\n## Key Types Reference\n\n| Type | Purpose |\n|------|---------|\n| `AIProjectClient` | Main entry point |\n| `PersistentAgentsClient` | Low-level agent operations |\n| `PromptAgentDefinition` | Versioned agent definition |\n| `AgentVersion` | Versioned agent instance |\n| `AIProjectConnection` | Connection to Azure resource |\n| `AIProjectDeployment` | Model deployment info |\n| `AIProjectDataset` | Dataset metadata |\n| `AIProjectIndex` | Search index metadata |\n| `Evaluation` | Evaluation configuration and results |\n\n## Best Practices\n\n1. **Use `DefaultAzureCredential`** for production authentication\n2. **Use async methods** (`*Async`) for all I\u002FO operations\n3. **Poll with appropriate delays** (500ms recommended) when waiting for runs\n4. **Clean up resources** — delete threads, agents, and files when done\n5. **Use versioned agents** (via `Azure.AI.Projects.OpenAI`) for production scenarios\n6. **Store connection IDs** rather than names for tool configurations\n7. **Use `includeCredentials: true`** only when credentials are needed\n8. **Handle pagination** — use `AsyncPageable\u003CT>` for listing operations\n\n## Error Handling\n\n```csharp\nusing Azure;\n\ntry\n{\n    var result = await projectClient.Evaluations.CreateAsync(evaluation);\n}\ncatch (RequestFailedException ex)\n{\n    Console.WriteLine($\"Error: {ex.Status} - {ex.ErrorCode}: {ex.Message}\");\n}\n```\n\n## Related SDKs\n\n| SDK | Purpose | Install |\n|-----|---------|---------|\n| `Azure.AI.Projects` | High-level project client (this SDK) | `dotnet add package Azure.AI.Projects` |\n| `Azure.AI.Agents.Persistent` | Low-level agent operations | `dotnet add package Azure.AI.Agents.Persistent` |\n| `Azure.AI.Projects.OpenAI` | Versioned agents with OpenAI | `dotnet add package Azure.AI.Projects.OpenAI` |\n\n## Reference Links\n\n| Resource | URL |\n|----------|-----|\n| NuGet Package | https:\u002F\u002Fwww.nuget.org\u002Fpackages\u002FAzure.AI.Projects |\n| API Reference | https:\u002F\u002Flearn.microsoft.com\u002Fdotnet\u002Fapi\u002Fazure.ai.projects |\n| GitHub Source | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-net\u002Ftree\u002Fmain\u002Fsdk\u002Fai\u002FAzure.AI.Projects |\n| Samples | https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-net\u002Ftree\u002Fmain\u002Fsdk\u002Fai\u002FAzure.AI.Projects\u002Fsamples |\n",{"name":5,"license":15,"metadata":49,"description":52},{"author":12,"package":50,"version":51},"Azure.AI.Projects","1.0.0","Azure AI Projects SDK for .NET. High-level client for Azure AI Foundry projects including agents, connections, datasets, deployments, evaluations, and indexes. Use for AI Foundry project management, versioned agents, and orchestration. Triggers: \"AI Projects\", \"AIProjectClient\", \"Foundry project\", \"versioned agents\", \"evaluations\", \"datasets\", \"connections\", \"deployments .NET\".\n","main","3f5b461b2314e01c400564051e92469114c5b68f",".github\u002Fplugins\u002Fazure-sdk-dotnet\u002Fskills\u002Fazure-ai-projects-dotnet",365,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills","https:\u002F\u002Fmicrosoft.github.io\u002Fskills\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-12 02:02:58",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add microsoft\u002Fskills --skill azure-ai-projects-dotnet",{"tool":69,"command":70},"bunx","bunx skills add microsoft\u002Fskills --skill azure-ai-projects-dotnet",{"tool":72,"command":73},"pnpm","pnpm dlx skills add microsoft\u002Fskills --skill azure-ai-projects-dotnet","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fplugins\u002Fazure-sdk-dotnet\u002Fskills\u002Fazure-ai-projects-dotnet\u002FSKILL.md",true,[],[78,100,138,165,185,222],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":85,"publishedAt":44},"01M69B4JCRQV5SPXAFCKXQRV0H","skill-creator","Guide for creating effective skills for AI coding agents working with Azure SDKs and Microsoft Foundry services. Use when creating new skills or updating existing skills.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fskill-creator\u002FSKILL.md",[84],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[86,87,88,9,42,89,90,26,91,92,93,40,94,95,96,30,97,98,99],"skill creator","creator","coding agents","microsoft foundry","ai coding agents","services","coding","guide","ai coding","with","sdks","Existing","when","new",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":116,"publishedAt":44},"01M69B4FD57V1MYKRWAJJECTZ7","podcast-generation","Generate AI-powered podcast-style audio narratives using Azure OpenAI's GPT Realtime Mini model via WebSocket. Use when building text-to-speech features, audio narrative generation, podcast creation from content, or integrating with Azure OpenAI Realtime API for real audio output. Covers full-stack implementation from React frontend to Python FastAPI backend with WebSocket streaming.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpodcast-generation\u002FSKILL.md",[106,109,112,115],{"categoryNo":107,"categoryName":108,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":110,"categoryName":111,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":113,"categoryName":114,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[117,118,119,120,121,122,123,26,124,125,126,127,128,129,130,131,132,133,134,135,136,98,137],"podcast generation","podcast","generation","frontend","python","react","realtime","azure openai","generate","streaming","api","Audio","stack","text","model","fastapi","creation","python fastapi","narrative","features","fastapi backend",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":145,"publishedAt":44},"01M69B4CYPM5SESY5ZWEFDXEQZ","microsoft-docs","Understand Microsoft technologies by querying official documentation. Use whenever the user asks how something works, wants tutorials, needs configuration options, limits, quotas, or best practices for any Microsoft technology (Azure, .NET, M365, Windows, Power Platform, etc.)—even if they don't mention \"docs.\" If the question is about understanding a concept rather than writing code, this is the right skill.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmicrosoft-docs\u002FSKILL.md",[144],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[146,9,147,148,149,150,151,152,153,154,155,26,156,157,158,40,159,66,160,161,162,163,164,30],"docs","microsoft docs","MCP","writing","cli","mcp server","windows","power platform","official","documentation","learn","best practices","question","power","back","technology","platform","learn mcp","concept",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":172,"publishedAt":44},"01M69B49C3YPD1ZJ3NC0HPCY58","mcp-builder","Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP), Node\u002FTypeScript (MCP SDK), or C#\u002F.NET (Microsoft MCP SDK).","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmcp-builder\u002FSKILL.md",[171],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[148,173,174,175,121,176,31,177,9,178,179,131,180,181,93,40,182,183,184,95,30,98],"mcp builder","builder","typescript","llms","model context protocol","fastmcp","Tools","node","context","integrate","mcp sdk","building mcp servers",{"skillNo":186,"name":187,"nameZh":6,"description":188,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":189,"categories":190,"keywords":203,"publishedAt":44},"01M69B467A7CDMFQ0T6Q0ZA12Q","kql","KQL language expertise for writing correct, efficient Kusto Query Language queries. Covers syntax gotchas, join patterns, dynamic types, datetime pitfalls, regex patterns, serialization, memory management, result-size discipline, and advanced functions (geo, vector, graph). USE THIS SKILL whenever writing, debugging, or reviewing KQL queries — even simple ones — because the gotchas section prevents the most common errors that waste tool calls and cause expensive retry cascades. Trigger on: KQL, Kusto, ADX, Azure Data Explorer, Fabric Real-Time Intelligence, EventHouse, Log Analytics, log analysis, data exploration, time series, anomaly detection, summarize, where clause, join, extend, project, let statement, parse operator, extract function, any mention of pipe-forward query syntax.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fkql\u002FSKILL.md",[191,194,195,200],{"categoryNo":192,"categoryName":193,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":196,"categoryName":197,"taxonomyType":198,"taxonomyTypeDesc":199},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",{"categoryNo":201,"categoryName":202,"taxonomyType":198,"taxonomyTypeDesc":199},"01JBSEEDCAT000000000000036","内容创作者",[187,149,204,205,206,26,207,208,209,210,211,212,213,214,215,35,216,217,218,30,219,220,221],"summarize","memory","analytics","vector","time series","tool","discipline","log","geo","exploration","pipe","time","regex","join","datetime","section","anomaly","parse",{"skillNo":223,"name":224,"nameZh":6,"description":225,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":226,"categories":227,"keywords":228,"publishedAt":44},"01M69B44HJQ7897EZ7NE7DWQX3","github-issue-creator","Convert raw notes, error logs, voice dictation, or screenshots into crisp GitHub-flavored markdown issue reports. Use when the user pastes bug info, error messages, or informal descriptions and wants a structured GitHub issue. Supports images\u002FGIFs for visual evidence.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgithub-issue-creator\u002FSKILL.md",[],[229,230,231,232,87,233,234,235,236,237,238,239,40,240,241,242,243,244,245,30,98],"github","github issue creator","github issue","issue","issue creator","screenshots","notes","logs","error messages","messages","convert","evidence","reports","images","info","visual","error"]