Catalog PyPI
Back to packageRELEASE DETAILS

0.1.51

PyPI

ai4industry

A14 - 基于 Agent 的流程工业建模数据智能优选与闭环寻优系统(本地进程 + Web UI)

agentindustrialmodelingoptimizationprocess-industry
Published7 Oct 2026
Direct dependencies39
Transitive dependenciesNot calculated

README

Version 0.1.51 documentation

A14 · ai4industry

A14 是基于 Agent 的流程工业建模数据智能优选与闭环寻优系统:面向流程工业数据分析师、建模/算法工程师与高校科研人员,提供数据上传 → 系统辨识建模 → 闭环寻优 → 智能报告的一体化本地 Web 工作台。

ai4industry 是 A14 的 PyPI 发布形态(本地进程 + Web UI,Harness 模式):pip install 后运行一条命令,浏览器即开即用,无需安装 Node.js / Electron / 任何打包工具。


快速开始

1. 安装

# 基础安装(轻量,不含重型建模依赖)
pip install ai4industry

# 需要状态空间(ss)族建模时追加重型依赖(约 100MB+)
pip install 'ai4industry[full]'

可选依赖组(按需追加,互不冲突):

extras用途安装命令
full状态空间(ss)族建模(约 100MB+)pip install 'ai4industry[full]'
industrial工业连接器(OPC UA / Modbus TCP 只读采集)pip install 'ai4industry[industrial]'
database数据库直连(MySQL / PostgreSQL / TimescaleDB 只读查询;SQLite 走标准库零依赖)pip install 'ai4industry[database]'
tsdb时序数据库(TDengine WebSocket / InfluxDB 2.x)pip install 'ai4industry[tsdb]'
test开发/测试(pytest / httpx)pip install 'ai4industry[test]'

装好驱动后重启服务,「技能·连接器」页对应数据库类型的驱动状态会自动翻为「已就绪」。

要求 Python >= 3.10(Windows / macOS / Linux 均可)。

2. 启动

ai4industry

启动后自动完成:

  1. 探测 127.0.0.1 空闲端口(默认 8000,被占用自动 +1,探测 ≤100 次);
  2. 在用户数据目录初始化数据库与数据目录族;
  3. 启动本地服务并自动打开浏览器访问 http://127.0.0.1:8000/;
  4. 按 Ctrl+C 优雅退出,数据全部保留。

常用参数:

ai4industry --no-browser        # 不自动打开浏览器(无头/远程场景)
ai4industry --port 9000         # 指定起始端口
ai4industry --data-dir D:/a14-data   # 指定用户数据目录

3. 数据目录

平台默认用户数据目录
Windows%LOCALAPPDATA%\ai4industry
macOS~/Library/Application Support/ai4industry
Linux~/.local/share/ai4industry

运行时数据(a14_agent.db、uploads/、outputs/、logs/)全部落在用户数据目录:升级包、重装、覆盖安装均不触碰用户数据;包安装目录(site-packages)只读,绝无运行时写入。

自定义数据目录(优先级:--data-dir 参数 > A14_DATA_DIR 环境变量 > 平台默认目录):

A14_DATA_DIR=D:/a14-data ai4industry

4. 社区版(License 策略)

PyPI 公开版默认以 社区版(COMMUNITY) 运行:完整功能、零拦截、无需激活。License 校验仅用于企业定制版(详见项目仓库)。

5. 常见问题(FAQ)

  • 与其他暴露 app 顶层包的包冲突? ai4industry 安装后在 Python 中导入顶层包名为 app(与项目既有代码/测试一致)。若同环境存在其它同样暴露 app 顶层包的包,两者会互相覆盖。建议在独立 venv 中安装使用,这与所有 Python 包的最佳实践一致。
  • 能否用 python -m uvicorn app.main:app 启动? 不推荐。请始终使用 ai4industry 命令或等价的 python -m app 启动——它们会注入正确的数据目录环境变量并自动开浏览器;裸 uvicorn 不注入安装态环境,数据会落在当前目录而非用户数据目录。
  • 端口被占用? 默认从 8000 起自动 +1 探测(≤100 次),并打印实际访问地址。
  • 输入 ai4industry 提示“不是内部或外部命令 / 无法识别”? 命令脚本位于 Python 的 Scripts 目录(如 C:\Python314\Scripts\ai4industry.exe);该目录 不在 PATH 时终端找不到命令。三种解决方式(任选其一): ① 改用等价命令 python -m app(推荐:无需改 PATH,任何环境都可用,参数完全一致); ② 用绝对路径执行(python -c "import sys; print(sys.prefix)" 可查 Python 安装位置,命令在其下 Scripts\ 子目录); ③ 将 Python 的 Scripts 目录加入 PATH 后重开终端。
  • 浏览器没自动打开? 命令行会打印访问地址,手动在浏览器打开即可;也可用 --no-browser 跳过自动打开。
  • 日志在哪里? 用户数据目录 logs/backend.log(控制台亦输出)。
  • DeepSeek / Ollama 配置? 首次启动后进入 Web UI「设置」页配置 LLM 后端(云端 DeepSeek 或本地 Ollama),配置保存在本地数据库。

开发态说明

仓库开发态(uvicorn app.main:app / 运行测试)不注入任何安装态环境变量,行为与改造前完全一致(零回归红线);仅 ai4industry 命令(console script)进入安装态路径策略。

许可证

参见项目仓库 LICENSE(Apache-2.0)。本 PyPI 包仅分发开源社区版;企业版功能(License 校验体系)不随公开版分发。

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 39

Native requirements
39 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
alembic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
alembic<2.0.0,>=1.19.0runtime
cryptography
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
cryptography>=42.0.0runtime
fastapi
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
fastapi>=0.110.0runtime
filelock
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
filelock>=3.13.0runtime
keyring
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
keyring<26.0.0,>=25.0.0runtime
langgraph-checkpoint-sqlite
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
langgraph-checkpoint-sqlite<4,>=3.1.1runtime
langgraph
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
langgraph<1.3,>=1.0.0runtime
matplotlib
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
matplotlib>=3.8.0runtime
numpy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
numpy>=1.26.0runtime
openai
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
openai>=1.30.0runtime
openpyxl
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
openpyxl>=3.1.0runtime
pandas
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pandas>=2.2.0runtime
platformdirs
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
platformdirs>=4.0.0runtime
pydantic-settings
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pydantic-settings>=2.0.0runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pydantic>=2.0.0runtime
pypdf
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pypdf>=4.0.0runtime
python-docx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
python-docx>=0.8.11runtime
python-multipart
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
python-multipart>=0.0.9runtime
python-pptx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
python-pptx>=0.6.21runtime
redis
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
redis>=5.0.0runtime
reportlab
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
reportlab>=4.0.0runtime
scikit-learn
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
scikit-learn>=1.4.0runtime
scipy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
scipy>=1.12.0runtime
sqlalchemy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
sqlalchemy>=2.0.0runtime
statsmodels
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
statsmodels>=0.14.0runtime
uvicorn
Environment
{
  "extras": "standard",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
uvicorn[standard]>=0.29.0runtime
watchdog
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
watchdog<7.0.0,>=6.0.0runtime
psycopg2-binary
Environment
{
  "extras": "",
  "marker": "extra == \"database\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
psycopg2-binary>=2.9; extra == "database"runtime
pymysql
Environment
{
  "extras": "",
  "marker": "extra == \"database\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pymysql>=1.1; extra == "database"runtime
casadi
Environment
{
  "extras": "",
  "marker": "extra == \"full\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
casadi>=3.6.0; extra == "full"runtime
control
Environment
{
  "extras": "",
  "marker": "extra == \"full\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
control==0.10.2; extra == "full"runtime
sippy-unipi
Environment
{
  "extras": "",
  "marker": "extra == \"full\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
sippy-unipi==1.0.1; extra == "full"runtime
asyncua
Environment
{
  "extras": "",
  "marker": "extra == \"industrial\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
asyncua>=1.9.0; extra == "industrial"runtime
pymodbus
Environment
{
  "extras": "",
  "marker": "extra == \"industrial\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pymodbus>=3.6.0; extra == "industrial"runtime
optuna
Environment
{
  "extras": "",
  "marker": "extra == \"optuna\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
optuna>=4.9.0; extra == "optuna"runtime
httpx
Environment
{
  "extras": "",
  "marker": "extra == \"test\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
httpx>=0.27.0; extra == "test"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"test\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest>=8.0.0; extra == "test"runtime
influxdb-client
Environment
{
  "extras": "",
  "marker": "extra == \"tsdb\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
influxdb-client>=1.40; extra == "tsdb"runtime
taos-ws-py
Environment
{
  "extras": "",
  "marker": "extra == \"tsdb\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
taos-ws-py>=3.7.0; extra == "tsdb"runtime

Distribution files

2 collected
ai4industry-0.1.51-py3-none-any.whl

bdist_wheel · 2,757.08 KB · Python py3

Source file
ai4industry-0.1.51.tar.gz

sdist · 13,740.35 KB · Python source

Source file

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:48 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:1277c186820c3abfeb23bb52b7c12e86dca9980d031a100f3170674457e684e2

Other collected versions

View all collected versions →