EquipDoc-Agent is an auditable, degradable AI agent for electromechanical equipment maintenance that combines deterministic safety policies, human-in-the-loop approval via LangGraph, and optional RAG to generate evidence-based diagnostic reports for bearing vibration signals.

Stars

12

7-day growth

No data

Forks

0

Open issues

0

License

NOASSERTION

Last updated

2026-07-29

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It demonstrates a principled engineering approach to agent safety by enforcing explicit human approval before tool execution, providing clear degradation modes (Demo/Full), and delivering reproducible evaluation baselines with measurable regression thresholds.

Who it is for

  • AI/ML engineers building safe agent workflows
  • Maintenance engineers exploring AI-assisted diagnostics
  • Product managers evaluating human-AI collaboration in industrial settings
  • Researchers in agent safety and human-in-the-loop systems

Use cases

  • Bearing vibration signal analysis and maintenance report generation
  • Demonstrating auditable, human-mandated agent workflows
  • Testing safety boundaries and degradation behavior in agent systems
  • Reproducible benchmark evaluation of agent and RAG pipelines

Strengths

  • Deterministic safety checks (sandbox, file validation, path whitelisting) before tool execution
  • LangGraph interrupt/resume enables mandatory human approval for high-impact calls
  • Explicit Demo/Full mode degradation with clear boundaries and no silent failures
  • Robust CI including unit tests, smoke tests, health checks, and evaluation regression thresholds

Considerations

  • Demo mode replays fixed fault cases and cannot be used for real diagnostics
  • Full mode requires external Qwen service, CNN weights, and optional vector DB, limiting easy reproduction
  • Project does not control real equipment nor replace engineers for high-risk maintenance decisions

README quick start

EquipDoc-Agent

面向机电设备运维场景的可审核、可降级 Agent。项目将确定性安全策略、LangGraph 人工审核、轴承振动信号诊断工具、可选 RAG 和证据化报告组织为一个可复现的公开工程作品。

当前公开版本默认运行在无模型 Demo 模式:可以完整演示 Agent 工作流,但故障类型是明确标注的固定案例回放,不能作为真实设备诊断结果。Full 模式需要单独配置 Qwen 服务、CNN 权重和可选向量库。

30 秒了解项目

项目维度当前实现
目标场景轴承振动信号辅助分析与运维报告生成
Agent 编排LangGraph 状态图、条件路由、可恢复中断
人机协同诊断工具执行前必须 Approve/Reject
工具能力.npy 信号校验、CNN 诊断接口、知识检索、报告生成
安全边界上传沙箱、大小与数值检查、路径白名单、显式降级
运行方式本地 Gradio、Docker、AutoDL Full 模式
当前证据单元测试、Smoke Test、历史实验文件和限制说明

为什么需要这个 Agent

通用大模型无法直接分析振动时序信号,也容易在设备信息不足时生成缺少依据的维修建议。本项目把自然语言交互与专用诊断工具分离,并在高影响工具调用前加入人工审核:

flowchart LR
    A[上传振动信号] --> B[安全校验]
    B --> C[策略判断任务边界]
    C --> D{人工审核}
    D -->|Approve| E[轴承诊断工具]
    D -->|Reject| F[终止工具调用]
    E --> G[检索故障机理与维护依据]
    G --> H[生成带证据与边界的报告]

项目不控制真实设备,不替代工程师作出高风险维修决策,也不根据单段信号预测精确剩余寿命。

核心能力

  • 可审核工作流:使用 LangGraph interrupt/resume,在工具执行前展示调用参数并等待审批;
  • 确定性安全策略:信号和诊断意图同时满足时才进入诊断分支,关键判断不依赖 LLM 自由发挥;
  • 受限信号工具:只接受沙箱内、受限大小、有限数值的 .npy 一维信号;
  • 显式降级:缺少 Qwen、CNN 权重或 Chroma 时不静默伪装,Demo 模式和词法检索会明确标注;
  • 证据化输出:报告区分输入事实、工具结果、检索依据、建议和适用边界;
  • 可复现工程骨架:包含 pyproject.toml、环境变量、Docker、健康检查、Smoke Test 和 CI。

演示结果

诊断工具调用前,系统会暂停工作流并等待人工审核。审核界面只展示工具名称和经过脱敏的文件名,不暴露服务器内部路径。

审批通过后,系统输出带 Demo 标识、检索证据、处理建议和适用边界的报告:

快速运行 Demo

1. 环境要求

  • Python 3.10、3.11 或 3.12;
  • Demo 模式不需要 GPU、Qwen 模型、CNN 权重或向量库。

2. 创建环境并安装

Windows PowerShell:

python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -e ".[demo]"
Copy-Item .env.example .env

Linux / AutoDL:

python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -e ".[demo]"
cp .env.example .env

3. 健康检查与测试

python -m equipdoc_agent.health --strict
python scripts/demo_smoke.py
python -m unittest discover -s tests -v

Demo 模式下,bearing_modelbearing_normrag_vector_db 可以显示为不存在,因为它们不是必需项。

4. 启动页面

python app_gradio.py

打开终端显示的本地地址,默认是:

http://127.0.0.1:7860

7860 已被占用,应用会自动尝试 78617862 等端口。

5. 体验审核流程

  1. 保持“使用仓库内置演示信号”为勾选状态;
  2. 使用默认问题“请诊断这段轴承振动信号,并给出判断依据和处理建议”;
  3. 点击“提交”,查看待审核的工具名称和参数;
  4. 点击 Approve 继续生成报告,或点击 Reject 验证拒绝分支;
  5. Demo 报告会明确说明结果是固定案例,不是

Description

Auditable AI agent for electromechanical maintenance with LangGraph, RAG, fault diagnosis and human-in-the-loop review.

Related repositories

Similar projects matched by category, topics, and programming language.

makecindy
Featured
makecindy GitHub avatar

cindy

Cindy is an open-source AI agent that runs locally on your machine, integrates multiple AI harnesses and models, and provides memory, skills, and automation to perform real work in your projects and apps.

AI & Machine LearningLarge Language Models
958
uzairansaruzi
Featured
uzairansaruzi GitHub avatar

hermex

Hermex is a native SwiftUI iPhone app that lets you control a self-hosted Hermes AI agent directly from your phone, with no subscriptions, tracking, or third-party relay.

AI & Machine LearningLarge Language Models
941
hahhforest
Featured
hahhforest GitHub avatar

pi-textbook

A hands-on course that walks through building a Pi-style coding agent from scratch across 15 checkpoints, starting from an offline agent trajectory.

AI & Machine LearningLarge Language Models
625