[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EJYDGPCGS0JB3APRAPGMRF":3,"skill-same:01M7EJYDGPCGS0JB3APRAPGMRF":47},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":14,"repositoryHtmlUrl":30,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7EJYDGPCGS0JB3APRAPGMRF","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.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fcloud\u002Fazure-ai-projects-dotnet\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: azure-ai-projects-dotnet\ndescription: Azure AI Projects SDK for .NET. High-level client for Azure AI Foundry projects including agents, connections, datasets, deployments, evaluations, and indexes.\nrisk: critical\nsource: community\ndate_added: '2026-02-27'\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>\nMODEL_DEPLOYMENT_NAME=gpt-4o-mini\nCONNECTION_NAME=\u003Cyour-connection-name>\nAI_SEARCH_CONNECTION_NAME=\u003Cai-search-connection>\n```\n\n## Authentication\n\n```csharp\nusing Azure.Identity;\nusing Azure.AI.Projects;\n\nvar endpoint = Environment.GetEnvironmentVariable(\"PROJECT_ENDPOINT\");\nAIProjectClient projectClient = new AIProjectClient(\n    new Uri(endpoint), \n    new DefaultAzureCredential());\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\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\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>\nMODEL_DEPLOYMENT_NAME=gpt-4o-mini\nCONNECTION_NAME=\u003Cyour-connection-name>\nAI_SEARCH_CONNECTION_NAME=\u003Cai-search-connection>\n```\n\n## Authentication\n\n```csharp\nusing Azure.Identity;\nusing Azure.AI.Projects;\n\nvar endpoint = Environment.GetEnvironmentVariable(\"PROJECT_ENDPOINT\");\nAIProjectClient projectClient = new AIProjectClient(\n    new Uri(endpoint), \n    new DefaultAzureCredential());\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\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n",{"name":5,"risk":24,"source":25,"date_added":26,"description":7},"critical","community","2026-02-27","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fcloud\u002Fazure-ai-projects-dotnet","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill azure-ai-projects-dotnet",{"tool":39,"command":40},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill azure-ai-projects-dotnet",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill azure-ai-projects-dotnet","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fcloud\u002Fazure-ai-projects-dotnet\u002FSKILL.md",true,[],[48,56,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":55},"01M7EXRQF9GFM7D9BG6N5HAT34","oath","Auditing regulatory compliance (SOC2\u002FPCI-DSS\u002FHIPAA\u002FISO 27001): maps requirements, checks controls, designs audit trails, implements Policy as Code. Use when compliance auditing is needed.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Foath\u002FSKILL.md",[],[],"2026-11-15 14:25:24",{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EXRH7TYTNZJT0BQXEWAMW7","nexus","Orchestrating multi-specialist task chains and scope-adaptive product delivery: classifies intent, selects and executes the minimum viable chain, aggregates results, and verifies acceptance criteria. For multi-domain tasks, build-first delivery, and product lifecycle execution.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fnexus\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EXRCDPFWVEEEFR2ZQGJCYY","nest","Designing LLM-optimized folder structures: audits and restructures directories for context efficiency, progressive disclosure, and prompt cache performance. Not for general repo structure (Grove).","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fnest\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7EXR7JEER60TH0HD0AH4EE9","native","Implementing production iOS\u002FAndroid\u002FmacOS native features (SwiftUI, Compose) and iterating a screen against a reference design. Not for cross-platform RN\u002FFlutter (Port) or web (Artisan).","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fnative\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EXR133J7DD5961R80QTRZY","muse","Defining and managing design tokens, applying token systems to existing codebases, building design system foundations. Use for spacing, color, typography, dark mode, cross-platform output.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fmuse\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EXQWWX7ECQN0J50B41YN5N","morph","Converting document formats (Markdown\u002FWord\u002FExcel\u002FPDF\u002FHTML) and generating reusable conversion scripts. Use for distributable specs, accessibility-compliant PDFs, or Pandoc\u002FLibreOffice pipelines.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fmorph\u002FSKILL.md",[],[]]