AI Skill Hub 推荐使用:AI工作流:Hyperledger Fabric 是一款优质的Agent工作流。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的Agent工作流解决方案,这是一个值得深入了解的选择。
基于Hyperledger Fabric的AI工作流,实现机构级真实世界资产token化,支持MiCA合规性
AI工作流:Hyperledger Fabric 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
基于Hyperledger Fabric的AI工作流,实现机构级真实世界资产token化,支持MiCA合规性
AI工作流:Hyperledger Fabric 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install regx
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install regx
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/zak-li/regx
cd regx
pip install -e .
# 验证安装
python -c "import regx; print('安装成功')"
# 命令行使用
regx --help
# 基本用法
regx input_file -o output_file
# Python 代码中调用
import regx
# 示例
result = regx.process("input")
print(result)
# regx 配置文件示例(config.yml) app: name: "regx" debug: false log_level: "INFO" # 运行时指定配置文件 regx --config config.yml # 或通过环境变量配置 export REGX_API_KEY="your-key" export REGX_OUTPUT_DIR="./output"
<br>
<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset=".github/assets/vector/logo-monochrome.svg"> <source media="(prefers-color-scheme: light)" srcset=".github/assets/vector/logo-light-monochrome.svg"> <img src=".github/assets/vector/logo-monochrome.svg" alt="RegX" width="300"> </picture> </p>
<br>
<p align="center"> <a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.12+-blue.svg" alt="Python"></a> <a href="https://hyperledger-fabric.readthedocs.io/"><img src="https://img.shields.io/badge/Hyperledger_Fabric-2.5-2F3134.svg" alt="Fabric"></a> <a href="https://go.dev/"><img src="https://img.shields.io/badge/Go-1.21+-00ADD8.svg" alt="Go"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/License-BUSL%201.1-blue.svg" alt="License"></a> </p>
<br>
The Fabric network runs two organizations, BANK01 and REG01, each with a dedicated peer and CouchDB state database. The Go chaincode runs as CCaaS and enforces a dual-endorsement policy on all state-changing transactions. Assets move through an ACTIVE, FROZEN, REDEEMED lifecycle recorded immutably on-chain, and Fabric events are streamed live via gRPC with automatic reconnection.
The platform embeds compliance directly into transaction execution and asset lifecycle management. Sanctions screening is backed by Ed25519-authenticated manifests, while the MiCA enforcement layer validates exposure boundaries, restricted asset classes, and supervisory reporting requirements. zk-KYC workflows enable cryptographic identity attestation through Merkle proofs without exposing underlying credentials. Encrypted fraud analytics powered by Fully Homomorphic Encryption evaluate AML risk in confidential datasets, with persistent monitoring of KYC validity and systemic concentration exposure.
<p align="center"> <img src=".github/assets/compliance-flow-v2.svg" alt="Compliance Flow" width="800"> </p>
RegX exposes a FastAPI REST API and a gRPC server in parallel. Authentication is OIDC-based via Keycloak with PKCE (authorization_code flow). Private keys for Fabric identities are stored in HashiCorp Vault (KV v2), and every response carries six security headers with rate limiting and host filtering.
Every transaction produces an on-chain audit entry. An off-chain integrity checker verifies hashes independently, PDF audit reports are generated asynchronously via Celery, and the RAG agent answers regulatory questions by querying a ChromaDB vector store with Groq LLM.
API
| Package | Version |
|---|---|
| Python | 3.12+ |
| FastAPI | 0.135+ |
| Celery | 5.6+ |
| SQLAlchemy | 2.0+ |
| grpcio | 1.78+ |
| pydantic-settings | 2.4+ |
| prometheus-client | 0.24+ |
Technology Stack
| Component | Role |
|---|---|
| Hyperledger Fabric 2.5 | Permissioned blockchain |
| PostgreSQL 14+ | Application database |
| Redis 7+ | Cache and Celery broker |
| HashiCorp Vault | Fabric identity key storage (KV v2) |
| Keycloak 24 | OIDC SSO / PKCE authentication |
| Neo4j 5+ | Graph database for relationship analysis |
| Docker + Compose | Peers, orderer, CouchDB, Keycloak containers |
uvicorn core.main:app --host 0.0.0.0 --port 8000 --workers 1 celery -A core.core.celery_app worker --loglevel=info -Q celery,compliance,reports,fabric_events
The API is live at `http://localhost:8000`.
**Step 6: Authenticate**
Authentication uses Keycloak OIDC with PKCE. Open in a browser:
http://localhost:8000/api/v1/auth/login
This redirects to Keycloak's login page. After authentication, the callback sets httpOnly session cookies and returns an access token.
bash
Step 1: Clone and configure
git clone https://github.com/zak-li/regx.git
cd regx
cp .env.example .env
Open .env and fill in at minimum DATABASE_URL, REDIS_URL, the Fabric variables, and all KEYCLOAK_* variables.
Step 2: Install dependencies
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
Step 3: Start the Fabric network
cd network
./scripts/network-up.sh
./scripts/create-channel.sh
./scripts/deploy-chaincode.sh
./scripts/enroll-users.sh
Step 4: Deploy Keycloak
cd deployment/keycloak
cp .env.keycloak.example .env.keycloak # fill in admin/DB credentials
bash deploy.sh
The setup-realm.py script prints a KEYCLOAK_CLIENT_SECRET — copy it into your .env.
Step 5: Start the API and worker
```bash docker compose up -d # API + Celery worker
Required
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL async URL (postgresql+asyncpg://...) |
REDIS_URL | Redis URL (redis://:password@host:6379/0) |
KEYCLOAK_URL | Keycloak base URL (https://host:8443) |
KEYCLOAK_CLIENT_SECRET | OIDC client secret (from setup-realm.py) |
FABRIC_WALLET_PATH | Path to fabric_wallet.json |
FABRIC_CONNECTION_PROFILE | Path to connection_profile.yaml |
FABRIC_CHANNEL | Fabric channel name |
FABRIC_CHAINCODE | Chaincode name |
VAULT_ADDR | HashiCorp Vault address (http://host:8200) |
VAULT_TOKEN | Vault authentication token |
Optional
| Variable | Default | Description |
|---|---|---|
KEYCLOAK_REALM | rwa-platform | Keycloak realm name |
KEYCLOAK_CLIENT_ID | rwa-api | OIDC client identifier |
KEYCLOAK_VERIFY_TLS | false | Verify Keycloak TLS certificate |
KEYCLOAK_CA_CERT_PATH | Path to pinned CA for Keycloak TLS | |
GROQ_API_KEY | "" | Groq API key for the regulatory agent |
GROQ_MODEL | llama-3.3-70b-versatile | Groq model ID |
NEO4J_URI | Neo4j bolt URI | |
FABRIC_TLS_ENABLED | true | TLS for Fabric gRPC |
FABRIC_GRPC_TIMEOUT | 30 | gRPC timeout in seconds |
FABRIC_RETRY_MAX_ATTEMPTS | 5 | Retry attempts on Fabric errors |
LOG_LEVEL | INFO | Logging level |
ALLOWED_ORIGINS | Comma-separated CORS origins |
curl -H "Authorization: Bearer <token>" http://localhost:8000/api/v1/assets ```
Authentication (OIDC/PKCE)
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/auth/login | Redirect to Keycloak login (PKCE) |
| GET | /api/v1/auth/callback | OIDC callback (exchanges code for tokens) |
| POST | /api/v1/auth/refresh | Refresh access token via cookie |
| POST | /api/v1/auth/logout | Revoke session (clear cookies + Keycloak) |
| GET | /api/v1/auth/me | Current user profile |
| GET | /api/v1/auth/me/export | GDPR Art. 15 personal data export |
| DELETE | /api/v1/auth/me | GDPR Art. 17 right to erasure |
Assets
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/assets/tokenize | Tokenize a new real-world asset |
| GET | /api/v1/assets | List assets with filtering |
| GET | /api/v1/assets/{id} | Get asset by ID |
| POST | /api/v1/assets/transfer | Transfer ownership |
| POST | /api/v1/assets/freeze | Freeze asset (compliance hold) |
| POST | /api/v1/assets/unfreeze | Unfreeze asset |
| GET | /api/v1/assets/{id}/history | On-chain provenance history |
| POST | /api/v1/assets/{id}/valuate | Submit asset valuation |
Compliance and KYC
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/compliance/{user_id} | Compliance status for a user |
| GET | /api/v1/compliance/alerts/active | Active compliance alerts |
| POST | /api/v1/compliance/screening/run | Run AML sanctions screening |
| POST | /api/v1/compliance/kyc/submit | Submit KYC documents |
| POST | /api/v1/zkp/setup-key | Issue ZK-KYC credential |
| POST | /api/v1/zkp/verify | Verify a ZK-KYC proof |
Audit, ledger and agent
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/audit/ | List audit log entries |
| GET | /api/v1/audit/asset/{id} | On-chain provenance trail for an asset |
| POST | /api/v1/audit/report/generate/{id} | Generate PDF audit report (async) |
| GET | /api/v1/audit/report/status/{task_id} | Check report generation status |
| POST | /api/v1/audit/fraud/scan | Trigger Neo4j fraud graph scan |
| GET | /api/v1/transactions | Ledger transaction history |
| GET | /api/v1/transactions/stats/summary | Transaction statistics summary |
| GET | /api/v1/events/stream | Live Fabric event stream (SSE) |
| POST | /api/v1/agent/chat | RAG query over regulatory knowledge base |
| GET | /metrics | Prometheus metrics |
该项目提供了一个基于Hyperledger Fabric的AI工作流,实现了机构级真实世界资产token化和MiCA合规性,值得关注
该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。
总体来看,AI工作流:Hyperledger Fabric 是一款质量良好的Agent工作流,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | regx |
| 原始描述 | 开源AI工作流:Institutional real-world asset tokenization on Hyperledger Fabric, with MiCA com。⭐8 · Python |
| Topics | workflowamlblockchaincompliancedefifintechpython |
| GitHub | https://github.com/zak-li/regx |
| License | NOASSERTION |
| 语言 | Python |
收录时间:2026-05-24 · 更新时间:2026-05-30 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端