microsoft/skills

azure-ai-projects-dotnet

用 Azure AI Projects .NET 统一管理 Foundry 项目与 Agent 资源

  • SKILL.md 已保存
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

azure-ai-projects-dotnet 是什么?

这个 Skill 介绍 Azure.AI.Projects 高层客户端,用于管理 Foundry 项目里的 Agent、连接、数据集、部署、评估和索引,并可取得持久 Agent 客户端。它适用于已存在的项目工作流,不等同于单一模型聊天 SDK。

中文说明由本站依据来源整理;英文原文保留在页面下方。

按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 azure-ai-projects-dotnet,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 azure-ai-projects-dotnet

请在 Codex 的当前工作环境中安装并检查 azure-ai-projects-dotnet 这个 Skill。

项目身份:microsoft/skills / azure-ai-projects-dotnet
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-dotnet/skills/azure-ai-projects-dotnet/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-dotnet/skills/azure-ai-projects-dotnet/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 安装 Azure.AI.Projects、Azure.Identity;PROJECT_ENDPOINT 指向具体 AI 项目,模型部署按需要配置。
  • 当前身份对项目与目标资源具有必要读写权限;preview/OpenAI 扩展需另装对应依赖并确认可用性。
  • 先选清楚调用的是持久 Agent、版本化 Agent,还是项目的 OpenAI ChatClient;三条接口能力和资源生命周期不同。

实际使用顺序

  1. 先用 AIProjectClient 只读查看需要的 connections、deployments 和 indexes,不要请求 includeCredentials,除非确实需要凭据值。
  2. 创建持久 Agent 时按创建 Agent、Thread、Message、Run 顺序调用,轮询并处理需要动作/失败等状态。
  3. 版本化 Agent 的预览示例使用项目 OpenAI 扩展;部署前检查包版本和服务可用状态。
  4. 数据集、索引、评估和工具连接各自独立管理,记录 ID/版本;删除仅限本任务新建且已确认的资源。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

请使用 azure-ai-projects-dotnet 为我现有 Foundry 项目生成只读盘点清单及C#代码草案:列出 deployment 和 connection 名称,不获取凭据、不创建 Agent、数据集或索引。
预期结果

得到只读检查代码草案;未访问项目,也未创建或删除资源。

使用前先看这些限制

使用条件与边界

  • 调用 Connections.GetConnection(includeCredentials:true) 可能读取敏感连接凭据,不应作为默认盘点行为。
  • 样例中的轮询循环只覆盖 Queued/InProgress,不足以处理 RequiresAction 或异常状态;生产逻辑须补全。
  • 源文同时混合 GA、preview、低层 Agents 与 OpenAI 扩展,不能据同页示例假设版本接口可互换。
针对这个 Skill 的疑问

常见问题

AI Projects 和 Persistent Agents SDK 有什么不同?

AI Projects 提供项目级资源入口,也可取得低层持久 Agent 客户端;若需要细粒度 Agent/Thread/Run 管理,仍应理解底层状态与工具回调。

可以直接把 includeCredentials 设为 true 吗?

不应默认这样做。只有确实要使用凭据时才读取,并确保代码和日志不会暴露密钥。

需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

.github/plugins/azure-sdk-dotnet/skills/azure-ai-projects-dotnet/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

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".

查看源文件章节 / Source sections
  • 原文:Azure.AI.Projects (.NET)
  • 安装 / Installation
  • 原文:Environment Variables
  • 原文:Authentication
  • 原文:Client Hierarchy
  • 原文:Core Workflows
  • 原文:1. Get Persistent Agents Client
  • 原文:2. Versioned Agents with Tools (Preview)
  • 原文:3. Connections
  • 原文:4. Deployments
  • 原文:5. Datasets
  • 原文:6. Indexes
  • 原文:7. Evaluations
  • 原文:8. Get Azure OpenAI Chat Client
  • 原文:Available Agent Tools
  • 原文:Key Types Reference
  • 原文:Best Practices
  • 原文:Error Handling
  • 原文:Related SDKs
  • 原文:Reference Links
原文:Azure.AI.Projects (.NET)

High-level SDK for Azure AI Foundry project operations including agents, connections, datasets, deployments, evaluations, and indexes.

安装 / Installation

```bash dotnet add package Azure.AI.Projects dotnet add package Azure.Identity # Optional: For versioned agents with OpenAI extensions dotnet add package Azure.AI.Projects.OpenAI --prerelease # Optional: For low-level agent operations dotnet add package Azure.AI.Agents.Persistent --prerelease ``` **Current Versions**: GA v1.1.0, Preview v1.2.0-beta.5

原文:Environment Variables

```bash PROJECT_ENDPOINT=https://<resource>.services.ai.azure.com/api/projects/<project> # Required: Azure AI project endpoint MODEL_DEPLOYMENT_NAME=gpt-4o-mini # Required: model deployment name CONNECTION_NAME=<your-connection-name> # Optional: project connection name AI_SEARCH_CONNECTION_NAME=<ai-search-connection> # Optional: Azure AI Search connection name AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production ```

原文:Authentication

```csharp using Azure.Identity; using Azure.AI.Projects; var endpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); // Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential> var credential = new DefaultAzureCredential( DefaultAzureCredential.DefaultEnvironmentVariableName ); // Or use a specific credential directly in production: // See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme?view=azure-dotnet#credential-classes // var credential = new ManagedIdentityCredential(); AIProjectClient projectClient = new AIProjectClient( new Uri(endpoint), credential); ```

原文:Client Hierarchy

``` AIProjectClient ├── Agents → AIProjectAgentsOperations (versioned agents) ├── Connections → ConnectionsClient ├── Datasets → DatasetsClient ├── Deployments → DeploymentsClient ├── Evaluations → EvaluationsClient ├── Evaluators → EvaluatorsClient ├── Indexes → IndexesClient ├── Telemetry → AIProjectTelemetry ├── OpenAI → ProjectOpenAIClient (preview) └── GetPersistentAgentsClient() → PersistentAgentsClient ```

原文:1. Get Persistent Agents Client

```csharp // Get low-level agents client from project client PersistentAgentsClient agentsClient = projectClient.GetPersistentAgentsClient(); // Create agent PersistentAgent agent = await agentsClient.Administration.CreateAgentAsync( model: "gpt-4o-mini", name: "Math Tutor", instructions: "You are a personal math tutor."); // Create thread and run PersistentAgentThread thread = await agentsClient.Threads.CreateThreadAsync(); await agentsClient.Messages.CreateMessageAsync(thread.Id, MessageRole.User, "Solve 3x + 11 = 14"); ThreadRun run = await agentsClient.Runs.CreateRunAsync(thread.Id, agent.Id); // Poll for completion do { await Task.Delay(500); run = await agentsClient.Runs.GetRunAsync(thread.Id, run.Id); } while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress); // Get messages await foreach (var msg in agentsClient.Messages.GetMessagesAsync(thread.Id)) { foreach (var content in msg.ContentItems) { if (content is MessageTextContent textContent) Console.WriteLine(textContent.Text); } } // Cleanup await agentsClient.Threads.DeleteThreadAsync(thread.Id); await agentsClient.Administration.DeleteAgentAsync(agent.Id); ```

文件 SHA256:c928d09ea1c62c55b4582e53582e3f8a97fa7df84a6102be8e33aba9b1926058

仓库许可证记录:MIT;skill-declaration-captured-not-interpreted,查看来源。

SKILL.md原文description · 2026-11-16T12:36:35.145Z

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/skills
Skill源路径.github/plugins/azure-sdk-dotnet/skills/azure-ai-projects-dotnet/SKILL.md

安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源