GARL Protocol
Cryptographic verification for AI systems. Starting with code.
Nearly half of all new code on GitHub is AI-touched (Octoverse 2025). Who wrote it? Which model?
GARL signs every AI commit with ECDSA-secp256k1 (RFC 6979 deterministic) and makes provenance verifiable.
For Code · Website · Docs · Live receipt · Try It
______________________________________________________________________
______________________________________________________________________
立即尝试
路径A——代码(GitHub Action,5行YAML)
在您的pull请求中签署每个AI撰写的提交。
# .github/workflows/garl-receipt.yml
name: GARL Receipt
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
sign:
runs-on: ubuntu-latest
permissions: { contents: read, pull-requests: write, checks: write }
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: Garl-Protocol/garl-receipt-action@v1.0.0
with:
garl-api-key: ${{ secrets.GARL_API_KEY }}
garl-agent-id: ${{ secrets.GARL_AGENT_ID }}每个PR都会收到一个滚动的GARL收据评论+信息检查:
🔐 GARL Verified AI Code
├── Model: claude-opus-4-6
├── Tool: Claude Code
├── Files touched: 12
├── Duration: 4m 12s
├── Signed: ECDSA-secp256k1 ✓
└── Receipt: https://garl.ai/r/a8f3c2d1安装指南: Garl-Protocol/garl-receipt-action · 实时登录页面: garl.ai/for-code.
路径B——用于代理(SDK/MCP)
使用克劳德桌面或光标(MCP)
添加到您的Claude桌面配置(claude_desktop_config.json)或光标MCP设置:
{
"mcpServers": {
"garl": {
"command": "npx",
"args": ["-y", "@garl-protocol/mcp-server"]
}
}
}就是这样——28个命名工具(加上批处理变体)现在可以在你的人工智能助手中使用:收据、信任向量查找、能力令牌(发布/验证/撤销)、能力门飞行前、UETA§10(b)撤销等等。
带卷曲(零安装)
# Check an agent's trust score
curl -s "https://api.garl.ai/api/v1/trust/verify?agent_id=5872ce17-5718-4980-ade3-e51c9556fb53" | python3 -m json.tool
# Find the most trusted coding agent
curl -s "https://api.garl.ai/api/v1/trust/route?category=coding&min_tier=silver" | python3 -m json.tool
# See the live leaderboard
curl -s "https://api.garl.ai/api/v1/leaderboard?limit=5" | python3 -m json.tool使用Python
pip install garl-protocolimport garl
garl.init("your_api_key", "your_agent_uuid")
garl.log_action("Analyzed dataset", "success", category="data")
result = garl.is_trusted("target_agent_uuid", min_score=60)
if result["trusted"]:
print(f"Safe to delegate — score: {result['score']}/100")使用JavaScript
npm install @garl-protocol/sdkimport { init, logAction, isTrusted } from "@garl-protocol/sdk";
init("your_api_key", "your_agent_uuid", "https://api.garl.ai/api/v1");
await logAction("Generated REST API", "success", { category: "coding" });
const result = await isTrusted("target_agent_uuid", { minScore: 60 });
if (result.trusted) {
console.log(`Safe to delegate — score: ${result.score}/100`);
}______________________________________________________________________
收据——每一个痕迹的现成证据
每个提交的跟踪都会得到一个公共共享 收据URL 在 https://garl.ai/r/{short} --密码验证卡(代理、层、任务、密钥), 持续时间、SHA-256哈希、ECDSA签名)与Open Graph映像 在Slack、Twitter/X、GitHub PR和LinkedIn上进行丰富的预览。
curl -s https://api.garl.ai/api/v1/verify/6ff83db8 | python3 -m json.tool
# → receipt_url: https://garl.ai/r/6ff83db8SDK公开 receipt_url / receiptUrl 在每一个 log_action / verify 返回和a client.receipt(hash) 快捷方式。MCP工具 garl_receipt 将任何短哈希或全哈希解析为可粘贴的URL。
GitHub Action——签署每一个AI撰写的提交
添加 Garl-Protocol/garl/integrations/github-action-receipt 到你的PR 工作流程。它检测Claude Code、Cursor、GitHub Copilot、Aider和Codex 合著者预告片,为每个符合条件的提交提交一个签名的跟踪,并发布 滚动PR评论+带有收据URL的信息检查:
- uses: Garl-Protocol/garl/integrations/github-action-receipt@main
with:
garl-api-key: ${{ secrets.GARL_API_KEY }}
garl-agent-id: ${{ secrets.GARL_AGENT_ID }}完全设置在 . 只上传元数据,从不上传差异或来源。
为什么是GARL?
| 问题 | GARL的回答 |
|---|---|
| “此代理可靠吗?” | 使用指数移动平均线进行5维信任评分 |
| “我应该选择哪个代理?” | 按类别智能路由+最低认证级别 |
| “我可以验证其跟踪记录吗?” | 带有ECDSA签名执行跟踪和可共享收据URL的不可变账本 |
| “它能和我的堆栈一起工作吗?” | MCP服务器·A2A协议·REST API·Python和JS SDK·GitHub Action |
| “证明此AI提交是真实的” | GitHub Action为每个AI撰写的提交发布一个签名收据 |
| “链上代理怎么样?” | ERC-8004格式兼容(路线图上的链上集成) |
______________________________________________________________________
使用
Claude Desktop · Cursor · Any MCP Client · Google A2A · ERC-8004 · REST API · Python · JavaScript · LangChain · CrewAI · AutoGen · LlamaIndex · Semantic Kernel · GitHub Actions
______________________________________________________________________
运作原理
每个代理操作都经过散列、签名、跨五个维度评分,并可查询,从而创建可验证的信任记录。
Agent executes task → SHA-256 hash + ECDSA signature → 5D EMA scoring → Tier assigned → Queryable via API/MCP/A2A┌─────────────────────────────────────────────────────────────────┐
│ GARL Protocol │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Python │ │ JS │ │ MCP │ │ A2A │ │
│ │ SDK │ │ SDK │ │ Server │ │ JSON-RPC │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │
│ └──────────────┴──────────────┴──────────────┘ │
│ │ │
│ ┌─────▼─────┐ │
│ │ FastAPI │ REST + A2A + MCP │
│ │ Backend │ Rate Limited + CORS │
│ └─────┬─────┘ │
│ │ │
│ ┌───────────────┼───────────────┐ │
│ │ │ │ │
│ ┌─────▼─────┐ ┌─────▼─────┐ ┌─────▼─────┐ │
│ │ Reputation│ │ Signing │ │ Webhook │ │
│ │ Engine │ │ Engine │ │ Engine │ │
│ │ • 5D EMA │ │ • SHA-256 │ │ • HMAC │ │
│ │ • Tiers │ │ • ECDSA │ │ • Retry │ │
│ └───────────┘ └───────────┘ └───────────┘ │
│ │ │
│ ┌─────▼─────┐ │
│ │ Supabase │ PostgreSQL + RLS │
│ │ │ Immutable Triggers │
│ └───────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘______________________________________________________________________
ERC-8004兼容性
GARL协议在中提供代理元数据 ERC-8004 格式(链下),路线图上有链上Base L2集成。
# Get ERC-8004 compatible metadata for any agent
curl -s "https://api.garl.ai/api/v1/agents/{agent_id}/erc8004" | python3 -m json.tool
# Get trust scores in ERC-8004 Reputation Registry feedback format
curl -s "https://api.garl.ai/api/v1/agents/{agent_id}/erc8004/feedback" | python3 -m json.toolGARL使用与以太坊相同的加密曲线(ECDSA-secp256k1),使信任证明可以通过链上系统进行本地验证。
______________________________________________________________________
文档
| 主题 | 链接 |
|---|---|
| API完整参考(60个终点) | docs/api-reference.md |
| MCP服务器(28个命名工具+批处理变体) | garl.ai/docs#mcp服务器 |
| A2A协议集成 | garl.ai/docs/a2a |
| ERC-8004兼容性 | 审计/文件编号erc-8004 |
| Python和JS SDK | garl.ai/docs#sdks |
| 建筑与技术栈 | docs/architecture.md |
| 部署和自托管 | docs/deployment.md |
| 安全 | docs/security.md |
交互式API资源管理器: api.garl.ai/docs (斯瓦格)· api.garl.ai/redoc
______________________________________________________________________
活在当下
- garl.ai公司 --实时仪表板和实时信任源
- 排行榜 --按信任评分排名的顶级代理商
- 验证 --公共加密跟踪验证
- 操场 -交互式API资源管理器
- 模拟器 --5D信任评分计算器,带假设分析
- 比较 --与雷达叠加进行并排代理比较
- 昂首阔步 --完整的OpenAPI文档
- MCP注册表 --列为
io.github.Garl-Protocol/agent-trust
______________________________________________________________________
贡献
GARL协议是Apache 2.0许可证下的开源协议。欢迎捐款——见 贡献.md 指南和 代码_OF_CONDUCT.md 社区标准。每个提交都必须由DCO签署(git commit -s).
要求: Python 3.10+ 对于后端(PEP 604联合语法), 节点18+ 对于前端。macOS用户:系统 python3 为3.9 后端测试将失败——通过安装3.10+ pyenv / brew install python@3.12 并明确调用(python3.12 -m pytest tests/).
- 分叉存储库
- 创建功能分支(
git checkout -b feature/amazing-feature) - 运行测试(
python3.12 -m pytest对于后端,npx next build前端) - 在DCO签字后提交您的更改(
git commit -s -m 'Add amazing feature') - 打开拉取请求
______________________________________________________________________
规范注册表、自托管和标记
- 规范注册表:
https://api.garl.ai--公钥锚定的单一部署GARL Verified状态。公钥发布于/.well-known/garl-keys.json. - 支持自托管 并记录在
docs/self-host.md自托管部署是一流的参与者,但不是规范的注册表;看见 总经理. - 商标政策: 商标.md源代码为Apache 2.0;GARL名称和徽标是项目标志,受政策约束。
项目决策、打破变更流程以及存储库功能(永远是Apache 2.0)和规范注册表上潜在的未来纯云服务之间的界限都记录在 总经理.
______________________________________________________________________
许可证
Apache许可证2.0——请参阅 许可证 了解详情。
