[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M715AB0TNZTJKWMK3XGPRCFQ":3,"skill-same:01M715AB0TNZTJKWMK3XGPRCFQ":64},{"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":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":14,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M715AB0TNZTJKWMK3XGPRCFQ","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.","sapsapshen\u002Fai-memory-router","sapsapshen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F20347959?v=4","01M6XDQEF1DP50DKF37H81J3J5","shenmian","01M6XDQEJPE41Y3DT2763X8ZJN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fazure-ai-projects-dotnet\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"azure ai projects dotnet","azure","dotnet","azure ai","azure ai projects","projects","foundry","client","indexes","2026","datasets","sdk","high","unknown","connections","deployments","for","azure ai foundry","community","2026-11-10 10:12:30",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: unknown\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","# 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",{"name":5,"risk":32,"source":37,"date_added":43,"description":7},"2026-02-27","main","7a38d8e7073e61c16eda85681cb32fb68a8657a5","skills-store\u002Fcursor\u002Fazure-ai-projects-dotnet","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router","https:\u002F\u002Fgithub.com\u002Fsapsapshen","2026-04-14 21:12:12",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add sapsapshen\u002Fai-memory-router --skill azure-ai-projects-dotnet",{"tool":56,"command":57},"bunx","bunx skills add sapsapshen\u002Fai-memory-router --skill azure-ai-projects-dotnet",{"tool":59,"command":60},"pnpm","pnpm dlx skills add sapsapshen\u002Fai-memory-router --skill azure-ai-projects-dotnet","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fcursor\u002Fazure-ai-projects-dotnet\u002FSKILL.md",true,[],[65,89,115,125,138,157],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":76,"publishedAt":38},"01M71ATQRKG48SH06FQ697T5G9","wechat-search","Search WeChat Official Account articles using OpenClaw's web search and fetch capabilities with compliance-focused design.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Fwechat-search-release\u002FSKILL.md",[71],{"categoryNo":72,"categoryName":73,"taxonomyType":74,"taxonomyTypeDesc":75},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[77,78,79,80,81,82,83,84,85,86,87,88],"wechat search","wechat","search","capabilities","openclaw","design","web search","compliance","web","official","fetch","with",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":38},"01M71ATNAVGZB35PFYM2GC5N00","trend-tap","Real-time trending topics aggregator across 7 platforms (X\u002FTwitter, Reddit, Google Trends, Hacker News, Zhihu, Bilibili, Weibo). Trigger: when user says 'trend', 'trends', 'trend tap', '热点', '热搜', or asks what is trending\u002Fhot. Do NOT use web_search — this skill already fetches live data from all platforms with zero API keys.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Ftrend-tap\u002FSKILL.md",[],[96,97,98,99,100,101,79,102,103,104,105,106,107,108,109,110,111,112,113,114],"trend","trend tap","tap","api keys","Bash","time","trending","hacker","aggregator","do","when","brew","live","data","google","install","read","across","api",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":38},"01M71ATJ9AM5KM15AA8PS302EB","trend-radar","Real-time trending topics aggregator across 7 platforms (X\u002FTwitter, Reddit, Google Trends, Hacker News, Zhihu, Bilibili, Weibo). Trigger: when user says 'trend', 'trends', 'trend pulse', '热点', '热搜', or asks what is trending\u002Fhot. Do NOT use web_search — this skill already fetches live data from all platforms with zero API keys.","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Ftrend-radar\u002FSKILL.md",[],[122,123,96,107,108,109,110,100,79,112,124,113,114,106,104,103,102,111,101,99],"trend radar","radar","pulse",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":38},"01M71ATGF095N3EJM9G8SD0BB5","tech-news-daily","每日科技新闻汇——从全球多个 RSS 源抓取最新科技新闻，翻译（英→中）、去重、排版成每日简报。当用户询问科技新闻、科技新鲜事、每日科技、技术动态、Daily Tech News 或类似表达时触发此技能。","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Ftech-news-daily\u002FSKILL.md",[],[132,133,134,135,136,137],"news","tech","tech news daily","daily","rss","翻译",{"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":149,"publishedAt":38},"01M71ATFAEAMQ17M70NQNY7SR8","summarize","Summarize URLs or files with the summarize CLI (web, PDFs, images, audio, YouTube).","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Fsummarize\u002FSKILL.md",[144],{"categoryNo":145,"categoryName":146,"taxonomyType":147,"taxonomyTypeDesc":148},"01JBSEEDCAT000000000000021","资料检索与研究","SCENARIO","使用场景",[140,85,150,151,152,88,107,153,154,155,98,156,111],"Audio","cli","youtube","images","https","files","pdfs",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":38},"01M71ATDNS3R0M4H936PACQAWZ","sonoscli","Control Sonos speakers (discover\u002Fstatus\u002Fplay\u002Fvolume\u002Fgroup).","https:\u002F\u002Fgithub.com\u002Fsapsapshen\u002Fai-memory-router\u002Fblob\u002Fmain\u002Fskills-store\u002Fopenclaw\u002Fsonoscli\u002FSKILL.md",[],[159,164,165,166,111,167,154,168,169,170,171,172],"status","play","go","latest","github","discover","control","cmd","volume"]