ClawSkills logoClawSkills

Agent Trust Protocol

通过贝叶斯更新、特定领域的信任、撤销、遗忘来管理和更新代理信任评分,并通过仪表板可视化信任。

介绍

# Agent Trust Protocol (ATP)

在 AI 代理之间建立、验证和维护信任。包含特定领域的信任、撤销、遗忘曲线和可视化仪表板的贝叶斯信任评分。

## 安装

```bash git clone https://github.com/FELMONON/trust-protocol.git # No dependencies beyond Python 3.8+ stdlib # Pair with skillsign for identity: https://github.com/FELMONON/skillsign ```

## 快速开始

```bash # Add an agent to your trust graph python3 atp.py trust add alpha --fingerprint "abc123" --score 0.7

# Record interactions — trust evolves via Bayesian updates python3 atp.py interact alpha positive --note "Delivered clean code" python3 atp.py interact alpha positive --domain code --note "Tests passing"

# Check trust python3 atp.py trust score alpha python3 atp.py trust domains alpha

# View the full graph python3 atp.py status python3 atp.py graph export --format json

# Run the full-stack demo (identity → trust → dashboard) python3 demo.py --serve ```

## 命令

### 信任管理 ```bash atp.py trust add <agent> --fingerprint <fp> [--domain <d>] [--score <0-1>] atp.py trust list atp.py trust score <agent> atp.py trust remove <agent> atp.py trust revoke <agent> [--reason <reason>] atp.py trust restore <agent> [--score <0-1>] atp.py trust domains <agent> ```

### 交互 ```bash atp.py interact <agent> <positive|negative> [--domain <d>] [--note <note>] ```

### 挑战-响应 ```bash atp.py challenge create <agent> atp.py challenge respond <challenge_file> atp.py challenge verify <response_file> ```

### 图谱 ```bash atp.py graph show atp.py graph path <from> <to> atp.py graph export [--format json|dot] atp.py status ```

### 仪表板 ```bash python3 serve_dashboard.py # localhost:8420 python3 demo.py --serve # full demo + dashboard ```

### Moltbook 集成 ```bash python3 moltbook_trust.py verify <agent> # check agent trust via Moltbook profile ```

## 信任机制

- **贝叶斯更新**:每次交互都会以逐渐减小的增量调整信任评分(防止剧烈波动) - **负面偏见**:负面交互的影响比正面交互的提升更显著 - **特定领域**:可以信任某个代理编写代码,但不信任其提供安全建议 - **遗忘曲线**:信任评分在无交互的情况下会衰减 (R = e^(-t/S)) - **撤销**:信任评分立即降至最低,可在降低后的分数恢复 - **传递信任**:如果你信任 A 且 A 信任 B,那么你也会部分信任 B(带有衰减)

## 与 skillsign 集成

ATP 基于用于身份管理的 [skillsign](https://github.com/FELMONON/skillsign) 构建: 1. 代理使用 skillsign 生成 ed25519 密钥对 2. 代理对技能进行签名,其他方验证签名 3. 已验证的代理被添加到 ATP 信任图谱中 4. 交互随时间更新信任评分

## 触发词

"check trust", "trust score", "trust graph", "verify agent", "agent trust", "trust status", "who do I trust", "trust report"

更多产品