Skip to content

Latest commit

 

History

History
107 lines (78 loc) · 2.94 KB

File metadata and controls

107 lines (78 loc) · 2.94 KB

Agent Trust Stack — Quickstart

English · 简体中文

End-to-end flow using one agent identity across AgentID → AgentCert → AgentLedger.


English

1. AgentID — create identity

git clone https://github.com/Trusgent/AgentID.git && cd AgentID
pip install -r requirements.txt
python cli.py generate --name "Demo Agent" --output-dir ./demo

Output example:

did:agent:7f9c2ba4e6d8

Save demo/did-document.json and keep demo/private-key.pem secret.

2. AgentCert — issue credential

git clone https://github.com/Trusgent/AgentCert.git && cd AgentCert
pip install -r requirements.txt
python cli.py issue \
  --agent-id did:agent:7f9c2ba4e6d8 \
  --level basic \
  --domain example.com \
  --display-name "Demo Agent" \
  --output agent.cert.json
python cli.py export-public-key --output issuer-public.pem

Verify with only the public key (no issuer private key):

python cli.py verify --file agent.cert.json --issuer-public-key issuer-public.pem

3. AgentLedger — record reputation

git clone https://github.com/Trusgent/AgentLedger.git && cd AgentLedger
pip install -r requirements.txt
python cli.py add-event \
  --agent-id did:agent:7f9c2ba4e6d8 \
  --type task_completed \
  --rating 5 \
  --comment "Successful booking"
python cli.py get-score --agent-id did:agent:7f9c2ba4e6d8
python cli.py list-events --agent-id did:agent:7f9c2ba4e6d8

Each event includes an Ed25519 proof when ledger-signer.pem is present.

Live reference (Trusgent)

Trusgent dogfoods this stack on trusgent.com:

Endpoint Purpose
GET /api/v1/verify?trusgentId=... Full verify payload + AgentCert + AgentLedger
GET /api/v1/trusgents/{id}/ledger Signed ledger export
GET /api/v1/trust-stack/issuer Issuer public key for proof verification
/en/verify/{trusgentId} Human-readable verification page

简体中文

1. AgentID — 创建身份

git clone https://github.com/Trusgent/AgentID.git && cd AgentID
pip install -r requirements.txt
python cli.py generate --name "演示 Agent" --output-dir ./demo

2. AgentCert — 签发凭证

git clone https://github.com/Trusgent/AgentCert.git && cd AgentCert
pip install -r requirements.txt
python cli.py issue --agent-id did:agent:... --level basic --domain example.com
python cli.py export-public-key --output issuer-public.pem
python cli.py verify --file agent.cert.json --issuer-public-key issuer-public.pem

3. AgentLedger — 记录信誉

git clone https://github.com/Trusgent/AgentLedger.git && cd AgentLedger
pip install -r requirements.txt
python cli.py add-event --agent-id did:agent:... --type task_completed --rating 5
python cli.py get-score --agent-id did:agent:...

Trusgent 线上参考

Trusgent 已在 trusgent.com 落地该信任栈 — 见上方 Live reference 表格。