Lzq.Extensions.AI 0.2.0

dotnet add package Lzq.Extensions.AI --version 0.2.0
                    
NuGet\Install-Package Lzq.Extensions.AI -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Lzq.Extensions.AI" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lzq.Extensions.AI" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Lzq.Extensions.AI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Lzq.Extensions.AI --version 0.2.0
                    
#r "nuget: Lzq.Extensions.AI, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Lzq.Extensions.AI@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Lzq.Extensions.AI&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Lzq.Extensions.AI&version=0.2.0
                    
Install as a Cake Tool

🔧 Lzq.Extensions.AI 扩展库 — AgentSkill 技能引擎

基于 Microsoft.Agents.AI 构建的技能引擎,支持两类技能接入:

1️⃣ 内部 C# AgentSkill(强类型 · DI注入 · 实时调用)

// 继承 LzqAgentSkillBase<TSelf>,自动注册到 AgentSkillProvider
[GeneralSkill]  // ← 标记为通用技能(每次对话自动加载)
public class QueryWorkOrderSkill : LzqAgentSkillBase<QueryWorkOrderSkill>
{
    protected override string SkillName => "work-order-query";
    protected override string SkillDescription => "工单详情、进度、列表、统计";

    // 通过 DI 注入 MES 业务服务
    public QueryWorkOrderSkill(
        IWorkOrderService workOrderService,
        IWorkOrderStatisticsService statisticsService) { ... }

    // AgentSkillScript 标记的每个方法 = AI 可调用的工具
    [AgentSkillScript("GetProgress")]
    [Description("通过工单号查询工单详情与生产进度")]
    public async Task<string> GetProgressAsync(string workOrderCode) { ... }
}

核心能力:

组件 说明
LzqAgentSkillBase<TSelf> 技能基类,定义 SkillName/Description/Instructions
AgentSkillProvider 运行时扫描所有 LzqAgentSkillBase 子类,支持 DLL 热加载
GeneralSkillAttribute 标记为通用技能,每次会话自动注入
ISkillManager 技能管理接口:枚举 / 执行 / 上传 DLL / 上传外部 ZIP
AIAgentService Agent 运行时,创建 Agent + 绑定技能 + 流式对话

2️⃣ 外部 Skill(Markdown 知识库 · 零代码接入 · 热加载)

外部 Skill 是一个包含 SKILL.md 的目录,通过 ZIP 上传或直接放入 ExternalSkills/ 目录即可生效:

ExternalSkills/
├── lzq-dev-handbook/          ← 后端开发规范
│   ├── SKILL.md               ← name + description
│   ├── specs/                 ← 架构/核心库/模块/质量规范
│   └── extensions/            ← 12 个扩展库详细文档
├── mes-operation-handbook/    ← MES 业务操作手册
│   ├── SKILL.md
│   └── operations/            ← 工单/设备/质检/物料/报工
└── vben-frontend-dev/         ← 前端开发规范
    ├── SKILL.md
    ├── patterns/              ← 4 种页面模式模板
    └── components/            ← 7 个组件用法文档

特点:

  • 零代码:只需 Markdown 文件,AI 自动阅读理解
  • 热加载:FileSystemWatcher 监听,300ms 防抖,无需重启
  • 安全:外部技能脚本执行已禁用(NoOpScriptRunner
  • 边界可控:AI 只能读取 Skill 文档内容,无法访问未授权资源

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 28 5/19/2026
0.0.9 71 5/17/2026
0.0.8 77 5/17/2026
0.0.5 72 5/17/2026