agentscore
Python SDK for the DJD Agent Score API — trust scoring for AI agent wallets on Base.
Install
pip install agentscore
With framework integrations
pip install agentscore[langchain] # LangChain tools
pip install agentscore[crewai] # CrewAI tools
pip install agentscore[all] # Everything
Quick Start
from agentscore import AgentScoreClient
client = AgentScoreClient()
result = client.basic_score("0xABC...")
print(result.score) # 72
print(result.tier) # "Trusted"
print(result.recommendation) # "proceed"
Async
from agentscore import AsyncAgentScoreClient
async with AsyncAgentScoreClient() as client:
result = await client.basic_score("0xABC...")
Trust Gate Decorator
Guard any function with a trust check:
from agentscore import trust_gate
@trust_gate(min_score=50)
def send_payment(wallet: str, amount: float):
# Only runs if wallet scores >= 50
...
LangChain
from agentscore.langchain import AgentScoreTool, TrustGatedTool
# Add trust checking as a tool
tools = [AgentScoreTool(), ...other_tools]
# Wrap an existing tool with trust gating
safe_transfer = TrustGatedTool(
tool=transfer_tool,
min_score=50,
wallet_param="recipient",
)
CrewAI
from agentscore.crewai import check_agent_trust
agent = Agent(
role="Transaction Validator",
tools=[check_agent_trust],
)
API Methods
| Method | Description | Tier |
|---|---|---|
basic_score(wallet) |
Basic reputation score | Free |
full_score(wallet) |
Full score with dimensions | Paid (x402) |
refresh_score(wallet) |
Force refresh from chain | Paid (x402) |
should_transact(wallet) |
Quick yes/no check | Free |
gate_transaction(wallet) |
Full gating decision | Free |
report_fraud(wallet, reason) |
Submit fraud report | Free |
check_blacklist(wallet) |
Check fraud reports | Paid (x402) |
get_badge(wallet) |
SVG trust badge | Free |
get_leaderboard(limit) |
Top scored agents | Free |
register_agent(wallet, ...) |
Register agent wallet | Free |
health_check() |
API health status | Free |
Error Handling
from agentscore import PaymentRequiredError, NetworkError
try:
result = client.full_score("0xABC...")
except PaymentRequiredError as e:
print(f"Payment needed: {e.accepts[0].max_amount_required} {e.accepts[0].asset}")
print(f"Pay to: {e.accepts[0].pay_to}")
except NetworkError as e:
print(f"API error: {e} (status: {e.status_code})")
License
MIT
Metadata
Release files for agentscore 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentscore-0.1.0.tar.gz | 12.7 kB | Without provenance | Details for agentscore-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentscore-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agentscore-0.1.0-py3-none-any.whl |
Total release size: 29.2 kB
Release files / agentscore-0.1.0.tar.gz
| Download URL | agentscore-0.1.0.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8193db919b00ab11c4eb5f9db7a7621c54694c307b261a766726d4db59fe659b
|
|
BLAKE2b-256 checksum How to use checksums |
30c21643e60c4ea1fa135fce44ddca7e41f4f65f2a79ce80f462894cd510109c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / agentscore-0.1.0-py3-none-any.whl
| Download URL | agentscore-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d34da9e7a5e98a3d16a5552ea7e4171801a0a7b376bc224574378f5736a2411
|
|
BLAKE2b-256 checksum How to use checksums |
44e2b0079929f93a39d1828173809eb6cdcf3e98a6384021dc7fe7e455d2bac4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for agentscore 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.