当前位置: 首页 > Skill >

private computation

private computation

private computation

用于AI代理敏感任务的零知识执行 - 隐私计算框架

1.0.0 2026.11.17 385
获取Skill文件查看使用说明
作 者:江知 许可证: 更新时间:2026.11.17
本文目录展开

OpenClaw Private Computation

Zero-Knowledge Execution for Sensitive Agent Tasks AI Agent 敏感任务的零知识执行框架

A privacy-first computation framework for AI Agents that need to process sensitive data securely. Built with TypeScript for the Node.js ecosystem.

为需要安全处理敏感数据的 AI Agent 打造的隐私优先计算框架。使用 TypeScript 为 Node.js 生态系统构建。

✨ Features / 功能特性

  • 🔐 Encrypted Credential Storage / 加密凭证存储

    • AES-256-GCM encryption for API keys and secrets
    • API 密钥和敏感信息的 AES-256-GCM 加密
  • 🛡️ Secure Task Execution / 安全任务执行

    • Isolated execution environment for sensitive operations
    • 敏感操作的隔离执行环境
  • 📝 Immutable Audit Trail / 不可篡改审计日志

    • Blockchain-style audit logs for compliance
    • 区块链式审计日志,满足合规要求
  • 🎯 Multiple Security Levels / 多层安全级别

    • Basic, Standard (TEE), and Strict (Zero-Knowledge)
    • 基础、标准(TEE)、严格(零知识证明)
  • ✅ GDPR & HIPAA Compliant / GDPR 和 HIPAA 合规

    • Designed for regulatory compliance
    • 专为满足监管合规要求而设计

📦 Installation / 安装

Via npm

npm install openclaw-private-computation

Via ClawHub

clawhub install private-computation

🚀 Quick Start / 快速开始

import { PrivateAgent } from 'openclaw-private-computation';

// Initialize agent / 初始化 Agent
const agent = new PrivateAgent({
  securityLevel: 'basic',  // basic | standard | strict
  audit: true              // 启用审计日志
});

// Store credentials securely / 安全存储凭证
await agent.setSecret('OPENAI_API_KEY', 'sk-...');

// Execute sensitive tasks / 执行敏感任务
const result = await agent.executeTask(async () => {
  const apiKey = await agent.getSecret('OPENAI_API_KEY');
  return await callAPI(apiKey);
}, {
  audit: true,
  metadata: { taskType: 'api_call' }
});

console.log(result);
// { status: 'success', data: {...}, auditId: '...', executionTime: 123 }

🎯 Use Cases / 使用场景

1. Medical AI (HIPAA) / 医疗 AI(HIPAA 合规)

const diagnosis = await agent.executeTask(async () => {
  const key = await agent.getSecret('MEDICAL_API_KEY');
  return await analyzeMedicalData(patientData, key);
}, {
  audit: true,
  metadata: { complianceLevel: 'HIPAA' }
});

2. Financial Services (PCI-DSS) / 金融服务(PCI-DSS 合规)

const transaction = await agent.executeTask(async () => {
  const bankKey = await agent.getSecret('BANK_API_KEY');
  return await processPayment(amount, bankKey);
}, {
  audit: true,
  timeout: 30000
});

3. AI Agent with Private Context / 带私有上下文的 AI Agent

const response = await agent.executeTask(async () => {
  const llmKey = await agent.getSecret('LLM_API_KEY');
  // Private context never exposed / 私有上下文永不暴露
  return await generateAI(userQuery, privateContext, llmKey);
}, {
  audit: true
});

🔧 API Reference / API 文档

Configuration / 配置

const agent = new PrivateAgent({
  securityLevel: 'basic' | 'standard' | 'strict',
  encryption: 'aes-256-gcm' | 'chacha20-poly1305',
  audit: boolean,
  storagePath: string,  // Default: ~/.openclaw
  masterKey: string     // Auto-generated if not provided / 未提供时自动生成
});

Security Levels / 安全级别

Level / 级别 Features / 功能 Overhead / 开销 Use Case / 适用场景
Basic / 基础 Encrypted storage / 加密存储 ~0% Development / 开发测试
Standard / 标准 + TEE isolation / + TEE 隔离 ~10% Production / 生产环境
Strict / 严格 + Zero-knowledge proofs / + 零知识证明 ~300% High-security / 高度敏感

Credential Management / 凭证管理

// Store a secret / 存储密钥
await agent.setSecret('KEY_NAME', 'secret-value');

// Retrieve a secret / 获取密钥
const value = await agent.getSecret('KEY_NAME');

// List all secrets / 列出所有密钥(仅键名)
const keys = agent.listSecrets();

// Delete a secret / 删除密钥
await agent.deleteSecret('KEY_NAME');

Task Execution / 任务执行

const result = await agent.executeTask(async () => {
  // Your task logic / 你的任务逻辑
  return someData;
}, {
  audit: true,           // Enable audit logging / 启用审计日志
  proof: true,           // Generate ZK proof / 生成零知识证明 (strict mode)
  timeout: 30000,        // Timeout in ms / 超时时间(毫秒)
  metadata: {...}        // Custom metadata / 自定义元数据
});

Audit & Compliance / 审计与合规

// Get audit logs / 获取审计日志
const logs = agent.getAuditLogs(10);

// Verify integrity / 验证完整性
const integrity = agent.verifyAuditIntegrity();
// { valid: true }

// Get statistics / 获取统计信息
const stats = agent.getAuditStatistics();
// { totalLogs: 42, byAction: {...}, byResult: {...} }

🏗️ Architecture / 架构

OpenClaw Private Computation
│
├── Core Layer / 核心层
│   ├── Encryption Manager / 加密管理器 (AES-256-GCM)
│   ├── Credential Vault / 凭证保险库
│   ├── Audit Logger / 审计日志器 (Blockchain-style)
│   └── Task Executor / 任务执行器
│
├── Crypto Layer (Future) / 加密层(未来)
│   ├── zk-SNARKs (Zero-Knowledge Proofs) / 零知识证明
│   ├── TEE (Trusted Execution Environment) / 可信执行环境
│   └── Homomorphic Encryption / 同态加密
│
└── Integration Layer (Future) / 集成层(未来)
    ├── LangChain Adapter
    ├── Vercel AI SDK Adapter
    └── Claude API Adapter

🛣️ Roadmap / 路线图

Phase 1: MVP ✅ (Current / 当前)

  • Encrypted credential storage / 加密凭证存储
  • Basic audit logging / 基础审计日志
  • Simple SDK API / 简洁的 SDK API
  • Examples and documentation / 示例和文档

Phase 2: Zero-Knowledge (Next / 下一步)

  • zk-SNARKs integration / zk-SNARKs 集成
  • Proof generation and verification / 证明生成和验证
  • Circuit library / 电路库

Phase 3: TEE Integration / TEE 集成

  • Intel SGX support / Intel SGX 支持
  • ARM TrustZone support / ARM TrustZone 支持
  • Hybrid mode (TEE + zk) / 混合模式(TEE + 零知识)

Phase 4: Enterprise Features / 企业功能

  • AI framework integrations / AI 框架集成
  • Compliance reporting / 合规报告
  • Multi-party computation / 多方计算

🔬 Technology / 技术栈

  • Language / 语言: TypeScript
  • Runtime / 运行时: Node.js 18+
  • Encryption / 加密: Node.js Crypto (AES-256-GCM, ChaCha20-Poly1305)
  • Zero-Knowledge / 零知识: snarkjs (coming soon / 即将推出)
  • TEE: Intel SGX (planned / 规划中)
  • Audit / 审计: Blockchain-inspired immutable logs / 区块链式不可篡改日志

📚 Documentation / 文档

  • GitHub Repository / 代码仓库
  • Quick Start Guide / 快速开始指南
  • Full Documentation / 完整文档
  • Examples / 示例

🌟 Why Choose OpenClaw? / 为什么选择 OpenClaw?

"The first production-ready privacy computing framework for TypeScript" "首个生产级 TypeScript 隐私计算框架"

No other TypeScript/JavaScript library provides: 其他 TypeScript/JavaScript 库都不提供:

  • ✅ Zero-knowledge execution for AI agents / AI Agent 的零知识执行
  • ✅ HIPAA/GDPR-ready audit trails / HIPAA/GDPR 就绪的审计追踪
  • ✅ Simple API for complex cryptography / 复杂加密的简洁 API
  • ✅ Open source and extensible / 开源且可扩展

🤝 Contributing / 贡献

We welcome contributions! Please see our GitHub repository for details.

欢迎贡献!详情请查看我们的 GitHub 仓库。

📄 License / 许可证

MIT-0 License - Free and open source, no attribution required. MIT-0 许可证 - 免费开源,无需署名。

Built for the AI Agent era. Secure by default. Private by design. 为 AI Agent 时代而生。默认安全。隐私优先。 🚀

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,040
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,033
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,021
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,021
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,019
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,016
Skill 文件
  • SKILL.md
    • OpenClaw Private Computation
    • ✨ Features / 功能特性
    • 📦 Installation / 安装
      • Via npm
      • Via ClawHub
    • 🚀 Quick Start / 快速开始
    • 🎯 Use Cases / 使用场景
      • 1. Medical AI (HIPAA) / 医疗 AI(HIPAA 合规)
      • 2. Financial Services (PCI-DSS) / 金融服务(PCI-DSS 合规)
      • 3. AI Agent with Private Context / 带私有上下文的 AI Agent
    • 🔧 API Reference / API 文档
      • Configuration / 配置
      • Security Levels / 安全级别
      • Credential Management / 凭证管理
      • Task Execution / 任务执行
      • Audit & Compliance / 审计与合规
    • 🏗️ Architecture / 架构
    • 🛣️ Roadmap / 路线图
      • Phase 1: MVP ✅ (Current / 当前)
      • Phase 2: Zero-Knowledge (Next / 下一步)
      • Phase 3: TEE Integration / TEE 集成
      • Phase 4: Enterprise Features / 企业功能
    • 🔬 Technology / 技术栈
    • 📚 Documentation / 文档
    • 🌟 Why Choose OpenClaw? / 为什么选择 OpenClaw?
    • 🤝 Contributing / 贡献
    • 📄 License / 许可证
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期