Skip to content

Repository files navigation

Trusgent

AgentLedger

English · 简体中文

An append-only reputation ledger for AI agents.


License Spec Python


English

AgentLedger records reputation events and computes transparent trust scores for AI agents. It answers: how has this agent performed over time?

AgentLedger is open, append-only infrastructure. Any platform may submit signed events; any verifier may recompute scores from the published formula.

Use it with AgentID and AgentCert for a complete trust stack.

Features

  • Append-only — events are never mutated in place
  • Transparent scoring — published formula, auditable output
  • Persistent — SQLite storage in v0.1
  • Privacy-aware — stores comment hashes instead of raw text by default

Quick Start

pip install -r requirements.txt

python cli.py add-event \
  --agent-id did:agent:demo123456 \
  --type task_completed \
  --rating 5 \
  --comment "Booked restaurant successfully"

python cli.py get-score --agent-id did:agent:demo123456
python cli.py list-events --agent-id did:agent:demo123456 --limit 10

Event Types

Type Meaning
task_completed Successful execution
task_failed Failed execution
user_rating User-provided rating
complaint Negative report
complaint_resolved Complaint closed
verification_passed Passed verification

Ecosystem

Project Role
AgentID Decentralized agent identity
AgentCert Verifiable trust credentials

License

Apache-2.0 — see LICENSE.


简体中文

AgentLedger 记录 Agent 信誉事件并计算透明的信任评分,回答:这个 Agent 长期表现如何?

AgentLedger 是开放的只追加基础设施。任何平台都可提交签名事件;任何验证方都可依据公开公式重算评分。

与 AgentID、AgentCert 组合,可形成完整信任栈。

特性

  • 只追加 — 事件写入后不在原处修改
  • 评分透明 — 公开公式,结果可审计
  • 持久化 — v0.1 使用 SQLite 存储
  • 隐私友好 — 默认仅存评论哈希,不存原文

快速开始

pip install -r requirements.txt

python cli.py add-event \
  --agent-id did:agent:demo123456 \
  --type task_completed \
  --rating 5 \
  --comment "餐厅预订成功"

python cli.py get-score --agent-id did:agent:demo123456
python cli.py list-events --agent-id did:agent:demo123456 --limit 10

事件类型

类型 含义
task_completed 任务成功
task_failed 任务失败
user_rating 用户评分
complaint 投诉
complaint_resolved 投诉已解决
verification_passed 通过核验

生态

项目 角色
AgentID 去中心化 Agent 身份
AgentCert 可验证信任凭证

许可证

Apache-2.0 — 见 LICENSE。

About

📒 Append-only reputation ledger for AI agents — record events, compute transparent trust scores, and audit agent behavior over time.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages