Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)14k · #11139

agent-framework-builder-dotnet

Skill này làm gì

Skill hướng dẫn xây dựng ứng dụng .NET (C#) với Microsoft Agent Framework, gồm agent, workflow, công cụ và lưu trữ. Skill dành cho lập trình viên muốn có một trợ lý AI trong ứng dụng C#.

Khi nào nên dùng

  • ✓Khi bạn muốn xây dựng một agent AI trong ứng dụng .NET.
  • ✓Khi bạn cần một workflow nhiều bước điều phối nhiều agent hoặc công cụ.
  • ✓Khi bạn muốn kiểm tra một ứng dụng agent .NET có sẵn so với các phiên bản framework hiện tại.

Liên kết skill

https://github.com/microsoft/agent-framework/blob/main/skills/agent-framework-builder-dotnet/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/microsoft/agent-framework/blob/main/skills/agent-framework-builder-dotnet/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể giúp tôi thêm một agent AI có công cụ tìm kiếm vào ứng dụng C# của tôi bằng Microsoft Agent Framework không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent kiểm tra dự án của bạn, chọn mẫu đơn giản nhất phù hợp từ agent, workflow hoặc các lựa chọn khác, rồi chỉ đọc hướng dẫn nó cần. Sau đó nó thực hiện thay đổi nhỏ nhất và chạy một kiểm tra tập trung.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Agent Framework builder for .NET

Use this skill as the entry point for .NET Agent Framework application work. Choose the smallest framework pattern that preserves the required behavior, load only the relevant references, and validate against current APIs instead of relying on remembered preview-era syntax.

Workflow

  1. Inspect the existing solution: target frameworks, SDK version, package management (central package management or per-project), and installed Microsoft.Agents.AI.* packages and versions.
  2. Choose the simplest matching path from the table below.
  3. Resolve design questions only when they materially change the implementation.
  4. Read only the linked reference for the selected path.
  5. Implement the smallest coherent change and run the narrowest validation that exercises it.

Core abstractions

  • A chat client is a Microsoft.Extensions.AI.IChatClient. It sends messages and options to a model provider and returns chat responses or streaming updates. Agent Framework builds on Microsoft.Extensions.AI types such as ChatMessage, AIFunction, and ChatOptions instead of redefining them.
  • An agent derives from AIAgent and exposes RunAsync(...) and RunStreamingAsync(...). ChatClientAgent is the standard implementation: it wraps an IChatClient with instructions, tools, context providers, a chat history provider, and session handling. Provider packages usually create one through an AsAIAgent(...) extension method.
  • A harness agent is a HarnessAgent from Microsoft.Agents.AI.Harness. It wraps a ChatClientAgent with an opinionated set of context providers and agent decorators; it is still an AIAgent.
  • A workflow (Microsoft.Agents.AI.Workflows) coordinates explicit execution paths between executors and agents. AgentWorkflowBuilder provides standard sequential, concurrent, handoff, group-chat, and Magentic patterns over AIAgent participants. A workflow can be exposed as an AIAgent when callers need the agent contract.

User interface options

  • DevUI (Microsoft.Agents.AI.DevUI) is a local development, testing, and debugging tool for interacting with agents and workflows. Never run or deploy DevUI as a production application host.
  • AG-UI is the application-facing protocol integration for connecting an agent or workflow to an AG-UI-compatible frontend. Use Microsoft.Agents.AI.Hosting.AGUI.AspNetCore (server) when the product needs streaming UI events, tool interactions, shared state, interrupts, or resume behavior.

Choose the build path

Path Choose it when Details
Plain agent One model-driven actor owns the task and tools, sessions, context, and middleware are sufficient. Plain agents
Harness agent The product needs an operating loop with todos, modes, memory, approvals, skills, optional file access, background agents, shell, compaction, or repeated execution. Harness agents
Workflow or orchestration Explicit stages, routing, parallelism, multiple participants, checkpointing, human input, or intermediate outputs are central to correctness. Workflows
Declarative definition YAML should be the source of truth for a supported agent or workflow. Declarative definitions
Evaluation Expected outputs, tool calls, failed runs, or quality regressions are the main concern. Evaluation
Observability The task is diagnosing or monitoring runtime behavior with traces, logs, and metrics. Observability
Extensibility The application needs a custom chat client, agent, context provider, chat history provider, or middleware. Extensibility
Integration The task is choosing or wiring a provider, protocol, memory store, tool service, UI, or platform extension. Integrations
Hosting and deployment Working Agent Framework code needs a process host, protocol endpoint, identity contract, or deployment shape. Hosting and deployment

Defaults

  • Target a currently supported .NET release. The packages multi-target current and recent LTS .NET versions, and some also support .NET Standard 2.0 and .NET Framework 4.7.2. Prefer the latest supported SDK unless th
Câu hỏi thường gặp

Tôi có cần biết nên dùng mẫu nào không?

Không. Skill giúp chọn mẫu đơn giản nhất vẫn giữ được hành vi bạn cần.

Nó có dùng API hiện tại không?

Có. Skill yêu cầu agent kiểm tra API hiện tại thay vì dựa vào các ví dụ preview cũ.

Nó có bao phủ lưu trữ không?

Có. Nó bao phủ lưu trữ, cùng với công cụ, phiên, middleware và đánh giá.

Chi tiết

Mô tả gốc của tác giả

Use this skill when building, modifying, reviewing, evaluating, integrating, or hosting .NET (C#) applications with Microsoft Agent Framework. Use it for Agent Framework agents, harness agents, workflows, orchestrations, declarative definitions, tools, sessions, middleware, evaluation, observability, integrations, or hosting, even when the user has not yet chosen the correct framework pattern.

repo: microsoft/agent-framework

Độ phổ biến

Sao GitHub
14k
Vị trí xếp hạng
#11139
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự