Skip to main content

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(AGPL-3.0)。本 PyPI 包仅分发开源社区版;企业版功能(License 校验体系)不随公开版分发。

Metadata

Release files for ai4industry 0.1.33

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai4industry 0.1.33
File Size Uploaded Provenance
ai4industry-0.1.33.tar.gz 7.9 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ai4industry 0.1.33
File Interpreter ABI Platform
ai4industry-0.1.33-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 MB

Release files / ai4industry-0.1.33.tar.gz

Download URL ai4industry-0.1.33.tar.gz
Size 7.9 MB
Tags Source
SHA-256 checksum
How to use checksums
0a8e9176b76245de6b166e0546f87e16e29f3e2082fb93ca15d00e66ced49d4c
BLAKE2b-256 checksum
How to use checksums
59b2cf44efab4f14f0416d6bc420d82458f348cde71d19a93764ed1283a449b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / ai4industry-0.1.33-py3-none-any.whl

Download URL ai4industry-0.1.33-py3-none-any.whl
Size 3.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c782b5805fc6e1a6e24fda3498ad4e457b0e891054e0d88e3efcdaf722cb78b0
BLAKE2b-256 checksum
How to use checksums
56cc924b67b33fdcfa2fd307a571929288e79814dcb22d87ece72451114da2d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for ai4industry 0.1.33

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.33 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page