Python client for the AgentScore trust and reputation API
Project description
agentscore-py
Python client for the AgentScore trust and reputation API.
Install
pip install agentscore-py
Quick Start
from agentscore import AgentScore
client = AgentScore(api_key="as_live_...")
# Look up cached reputation (free)
rep = client.get_reputation("0x1234...")
print(rep["score"]["value"], rep["score"]["grade"])
# Filter to a specific chain
base_rep = client.get_reputation("0x1234...", chain="base")
# On-the-fly assessment with policy (paid)
result = client.assess("0x1234...", policy={"min_grade": "B", "min_score": 35})
print(result["decision"], result["decision_reasons"])
# Compliance assessment with verification policy
gated = client.assess("0x1234...", policy={
"require_kyc": True,
"require_sanctions_clear": True,
"min_age": 21,
})
if gated["decision"] == "deny":
print(gated["decision_reasons"]) # ["kyc_required"]
print(gated.get("verify_url")) # URL for operator verification
# Check verification level
rep = client.get_reputation("0x1234...")
print(rep.get("verification_level")) # "none" | "wallet_claimed" | "kyc_verified"
Async
async with AgentScore(api_key="as_live_...") as client:
rep = await client.aget_reputation("0x1234...")
result = await client.aassess("0x1234...", policy={"min_grade": "B"})
Context Manager
with AgentScore(api_key="as_live_...") as client:
rep = client.get_reputation("0x1234...")
Configuration
| Parameter | Default | Description |
|---|---|---|
api_key |
None |
API key from agentscore.sh |
base_url |
https://api.agentscore.sh |
API base URL |
timeout |
10.0 |
Request timeout (seconds) |
Error Handling
from agentscore import AgentScore, AgentScoreError
try:
rep = client.get_reputation("0xinvalid")
except AgentScoreError as e:
print(e.code, e.status_code, str(e))
Documentation
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentscore_py-1.4.0.tar.gz.
File metadata
- Download URL: agentscore_py-1.4.0.tar.gz
- Upload date:
- Size: 48.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4b97f3bfb1c2b08ee501ee051e0f7c45c51cbb939faa41c997fa73d84ea5344
|
|
| MD5 |
d642d59cae9261164a7fd0be8973c156
|
|
| BLAKE2b-256 |
9a75082b9f6c479ecb5fe39aa38dd122d50600e867a76e4754db9783ac69b8ac
|
Provenance
The following attestation bundles were made for agentscore_py-1.4.0.tar.gz:
Publisher:
publish.yml on agentscore/python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentscore_py-1.4.0.tar.gz -
Subject digest:
c4b97f3bfb1c2b08ee501ee051e0f7c45c51cbb939faa41c997fa73d84ea5344 - Sigstore transparency entry: 1247532879
- Sigstore integration time:
-
Permalink:
agentscore/python-sdk@4354cc9de9e35aae0f0e8fe0e5fe6f2adcf6b141 -
Branch / Tag:
refs/tags/v1.4.0 - Owner: https://github.com/agentscore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4354cc9de9e35aae0f0e8fe0e5fe6f2adcf6b141 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentscore_py-1.4.0-py3-none-any.whl.
File metadata
- Download URL: agentscore_py-1.4.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08e22b05b6455fc5d00bc479b24bb4927e2ebfecd4e3001b353f39186ea6a478
|
|
| MD5 |
4e545320c6f32c0262b352f470543eb1
|
|
| BLAKE2b-256 |
ccdaf461633e8de60c3435f744adb1264a268f0bc7306e7388ebc5c4bd8c4d7b
|
Provenance
The following attestation bundles were made for agentscore_py-1.4.0-py3-none-any.whl:
Publisher:
publish.yml on agentscore/python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentscore_py-1.4.0-py3-none-any.whl -
Subject digest:
08e22b05b6455fc5d00bc479b24bb4927e2ebfecd4e3001b353f39186ea6a478 - Sigstore transparency entry: 1247532943
- Sigstore integration time:
-
Permalink:
agentscore/python-sdk@4354cc9de9e35aae0f0e8fe0e5fe6f2adcf6b141 -
Branch / Tag:
refs/tags/v1.4.0 - Owner: https://github.com/agentscore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4354cc9de9e35aae0f0e8fe0e5fe6f2adcf6b141 -
Trigger Event:
push
-
Statement type: