Skip to main content

Python client for the AgentScore trust and reputation API

Project description

agentscore-py

PyPI version License: MIT

Python client for the AgentScore trust and reputation API. Score, verify, and assess AI agent wallets in the x402 payment ecosystem and ERC-8004 agent registry.

Install

pip install agentscore-py

Quick Start

from agentscore import AgentScore

client = AgentScore(api_key="ask_...")

# Free reputation lookup
rep = client.get_reputation("0x1234...")
print(rep["grade"], rep["score"])

# Trust decision with policy
decision = client.get_decision("0x1234...", min_grade="C", min_transactions=5)
print(decision["decision"]["allow"])

Async

async with AgentScore(api_key="ask_...") as client:
    rep = await client.aget_reputation("0x1234...")
    print(rep["grade"])

Context Manager

with AgentScore(api_key="ask_...") 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

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentscore_py-1.0.3.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentscore_py-1.0.3-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file agentscore_py-1.0.3.tar.gz.

File metadata

  • Download URL: agentscore_py-1.0.3.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentscore_py-1.0.3.tar.gz
Algorithm Hash digest
SHA256 d3a7b2b9848597ccb884db77210fed7870cff2b872da0762aac95a045ef521d6
MD5 001b5f9f1297930518ff89104b2c10ba
BLAKE2b-256 aac20c51287f1b881477d347ed495df591607eac4d1cd63eec9cab6286096e66

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentscore_py-1.0.3.tar.gz:

Publisher: publish.yml on agentscore/python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentscore_py-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: agentscore_py-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentscore_py-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 35be1f21e6b541fc282e2017c1ca0313fed1d75c23c4cfc0692d7a64bc51c31f
MD5 8e86d4c0d47a0e763ccebfbdfcc71478
BLAKE2b-256 d4b62f2b6519c33bb04809d7c0880e943aa2127e5abade946118480a15b2ce53

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentscore_py-1.0.3-py3-none-any.whl:

Publisher: publish.yml on agentscore/python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page