← 返回 Skills 市场
bettermen

Intent Engine

作者 bettermen · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ⚠ suspicious
37
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install intent-engine
功能描述
意图引擎 - AI驱动的用户意图识别与智能路由。支持代码/知识/任务/闲聊四大分类,提供关键词+正则多策略匹配、置信度计算、动态意图管理,配备Web可视化管理界面。适用于AI助手任务调度、智能路由、对话理解等场景。
使用说明 (SKILL.md)

Intent Engine - 意图引擎 v2.0

AI驱动的意图识别引擎 + Web管理面板 | 激活词: 识别意图 / 分类任务 / 智能路由

核心功能

  1. 多策略分类 — 关键词匹配 + 正则模式 + 文本长度调整 + 优先级加权
  2. 置信度计算 — 综合评分并归一化为0-1,含备选分类建议
  3. 动态管理 — REST API CRUD 意图配置,热更新无需重启
  4. 可视化面板 — Web UI 仪表盘、意图管理、分类测试三合一

架构

intent-engine/
├── intent_engine/
│   ├── engine.py      # 核心分类引擎
│   ├── storage.py     # JSON 持久化存储
│   ├── models.py      # 数据模型
│   └── api.py         # Flask REST API
├── static/
│   └── index.html     # Web 管理界面
├── data/
│   └── intents.json   # 意图配置(自动生成)
├── run.py             # 入口
└── requirements.txt

启动方式

cd intent-engine
pip install -r requirements.txt
python run.py
# 访问 http://localhost:5700 打开管理界面

API 接口

Method Path 说明
POST /api/classify 单文本分类 {"text":"..."}
POST /api/classify/batch 批量分类 {"texts":[...]}
POST /api/evaluate 测试集评估
GET /api/intents 获取所有意图
POST /api/intents 创建意图
GET/PUT/DELETE /api/intents/:id 单意图CRUD
GET /api/stats 统计数据
GET /api/categories 分类定义

意图分类体系

一级分类 (4类)

类型 标识 颜色 说明
代码类 CODE 蓝 #3b82f6 编写、修复、审查、测试、重构
知识类 KNOW 紫 #8b5cf6 定义、教程、对比、建议
任务类 TASK 黄 #f59e0b 文件操作、命令执行、搜索、编排
闲聊类 CHAT 绿 #10b981 问候、反馈、澄清、结束

分类算法

score = (
    pattern_matches * 4.0 +      # 正则命中 (高精度)
    keyword_matches * 2.0 * w +  # 关键词命中 (带权重)
    priority * 0.05              # 意图优先级加成
)
score *= 0.8 if len(text) \x3C 10 else 1.0    # 短文本惩罚
score *= 1.1 if len(text) > 50 else 1.0    # 长文本加成

置信度计算

  • 原始分数归一化: confidence = score / max(10, score + 2)
  • 范围: 0-1,保留4位小数
  • 备选分类: Top-K 意图中 confidence > 0.05 的

可视化界面功能

仪表盘

  • 总意图数/启用数/禁用数 统计卡片
  • 分类分布条形图
  • 分类图例

意图管理

  • 搜索/新建/编辑/删除 意图
  • 关键词权重调优 (0.1-5.0)
  • 正则模式批量编辑
  • 启用/禁用开关
  • JSON 导入/导出

分类测试

  • 单文本实时分类
  • 多标签分类模式
  • 置信度环形图
  • 命中关键词/模式展示
  • 技能路由推荐

快速测试条

  • 底部固定快速测试栏
  • 回车即触发分类
  • 实时显示分类结果

集成建议

将本技能与以下技能配合使用:

- skill-creator: 代码生成路由
- workflow-verifier: Bug修复路由
- mempalace-assistant: 知识查询路由
- karpathy-principles: 编码最佳实践
- general-chat: 通用对话处理

更新记录

v2.0.0 (2026-06-09)

  • 重构为可运行的Python引擎
  • 新增Web管理界面
  • 支持意图动态CRUD
  • 多策略加权分类算法
  • 置信度计算与备选方案
  • JSON持久化存储
  • REST API 完整接口
  • 导入/导出功能

v1.0.0 (2026-04-28)

  • 初始版本(伪代码原型)

作者: laosi & WB 许可: MIT-0

安全使用建议
Install only if you are comfortable running a local Flask management service. Bind it to localhost, disable debug mode, add access control before using it on any shared machine or network, and export or back up intent data before using import, edit, or delete features.
能力评估
Purpose & Capability
The files implement the stated purpose: keyword/regex intent classification, REST endpoints, JSON-backed intent storage, and a web management UI. No evidence of credential theft, unrelated data access, exfiltration, or destructive host actions was found.
Instruction Scope
The activation phrases are broad, but the artifact is mainly a runnable management/classification service. The more important scope issue is that intent CRUD changes can affect routing behavior and are exposed through unauthenticated API endpoints.
Install Mechanism
The manifest declares no automatic OpenClaw install steps, while the documentation instructs users to install Python requirements manually. The only dependency is Flask with a lower-bound version rather than a pinned or locked version.
Credentials
run.py and api.py start Flask with host 0.0.0.0 and debug=True. For a local management dashboard, that is overbroad because the unauthenticated CRUD API may be reachable from other hosts and can alter persisted intent and routing data.
Persistence & Privilege
The skill creates and writes data/intents.json and supports create, update, delete, and import of intent records. Persistence is disclosed, and delete has a UI confirmation, but the API has no authentication, authorization, or rollback controls.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install intent-engine
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /intent-engine 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
intent-engine 2.0.0 introduces a fully-featured, production-ready intent recognition engine with a new web dashboard. - Refactored as a runnable Python engine with REST API and JSON persistence - Added a web-based management interface for intent editing, testing, and statistics - Supports keyword, regex, and weighted multi-strategy classification with confidence scoring - Enables dynamic CRUD for intents with hot updates, no restart needed - Provides import/export, batch operations, and visual analytics on intent distribution
元数据
Slug intent-engine
版本 2.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Intent Engine 是什么?

意图引擎 - AI驱动的用户意图识别与智能路由。支持代码/知识/任务/闲聊四大分类,提供关键词+正则多策略匹配、置信度计算、动态意图管理,配备Web可视化管理界面。适用于AI助手任务调度、智能路由、对话理解等场景。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 37 次。

如何安装 Intent Engine?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install intent-engine」即可一键安装,无需额外配置。

Intent Engine 是免费的吗?

是的,Intent Engine 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Intent Engine 支持哪些平台?

Intent Engine 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Intent Engine?

由 bettermen(@bettermen)开发并维护,当前版本 v2.0.0。

💬 留言讨论