Python SDK for DJD Agent Score — reputation scoring for AI agent wallets on Base L2
Project description
DJD Agent Score — Python SDK
Python SDK for DJD Agent Score — reputation scoring for AI agent wallets on Base L2.
Installation
pip install djd-agent-score
With LangChain support:
pip install djd-agent-score[langchain]
Quick Start
from djd_agent_score import AgentScoreClient
client = AgentScoreClient()
score = client.get_score("0x1234...abcd")
print(f"{score.wallet}: {score.score}/100 ({score.tier})")
Usage
Free Endpoints
from djd_agent_score import AgentScoreClient
client = AgentScoreClient()
# Basic score (10 free lookups/day per IP)
score = client.get_score("0x...")
print(score.score, score.tier, score.confidence)
# Leaderboard
lb = client.get_leaderboard()
for entry in lb.leaderboard[:5]:
print(f"#{entry.rank} {entry.wallet} — {entry.score} ({entry.tier})")
# Register an agent
reg = client.register_agent(
"0x...",
name="MyAgent",
description="Autonomous trading agent",
github_url="https://github.com/user/repo",
)
Paid Endpoints (API Key Required)
client = AgentScoreClient(api_key="djd_live_...")
# Full dimensional breakdown ($0.10)
full = client.get_full_score("0x...")
print(full.dimensions.reliability.score)
print(full.sybil_flag, full.gaming_indicators)
print(full.trajectory)
# Score history with trend analysis ($0.15)
history = client.get_score_history("0x...", limit=20)
print(history.trend, history.trajectory)
# Batch scoring ($0.50 flat for 2-20 wallets)
batch = client.get_batch_scores(["0x...", "0x...", "0x..."])
for result in batch.results:
print(f"{result.wallet}: {result.score}")
# Force fresh recalculation ($0.25)
fresh = client.refresh_score("0x...")
Async Client
import asyncio
from djd_agent_score import AsyncAgentScoreClient
async def main():
async with AsyncAgentScoreClient(api_key="djd_live_...") as client:
score = await client.get_score("0x...")
print(score.tier)
asyncio.run(main())
Error Handling
from djd_agent_score import AgentScoreClient
from djd_agent_score.exceptions import RateLimitError, ValidationError, NotFoundError
client = AgentScoreClient()
try:
score = client.get_score("0xinvalid")
except ValidationError as e:
print(f"Bad request: {e}")
except RateLimitError as e:
print(f"Rate limited: {e}")
except NotFoundError as e:
print(f"Not found: {e}")
LangChain Integration
from djd_agent_score.langchain import AgentScoreToolkit
toolkit = AgentScoreToolkit(api_key="djd_live_...")
tools = toolkit.get_tools()
# Use with any LangChain agent
from langchain.agents import initialize_agent
agent = initialize_agent(tools, llm, agent="zero-shot-react-description")
agent.run("Is wallet 0x... trustworthy? Check its agent score.")
API Reference
| Method | Endpoint | Price | Description |
|---|---|---|---|
get_score(wallet) |
GET /v1/score/basic | Free (10/day) | Basic score + tier |
get_full_score(wallet) |
GET /v1/score/full | $0.10 | Full dimensional breakdown |
refresh_score(wallet) |
POST /v1/score/refresh | $0.25 | Force live recalculation |
get_score_history(wallet) |
GET /v1/score/history | $0.15 | Historical scores + trend |
get_batch_scores(wallets) |
POST /v1/score/batch | $0.50 | 2-20 wallets at once |
get_leaderboard() |
GET /v1/leaderboard | Free | Top-ranked agents |
register_agent(wallet, ...) |
POST /v1/agent/register | Free | Register on the network |
report_fraud(target, ...) |
POST /v1/report | $0.02 | Submit fraud report |
Environment Variables
| Variable | Description |
|---|---|
DJD_AGENT_SCORE_API_KEY |
API key for paid endpoints |
DJD_AGENT_SCORE_BASE_URL |
Custom API base URL (default: https://djdagentscore.dev) |
Links
- API Documentation
- OpenAPI Spec
- MCP Server — for Claude, GPT, and other LLM agents
- TypeScript SDK
License
MIT — see 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
djd_agent_score-0.1.0.tar.gz
(11.7 kB
view details)
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 djd_agent_score-0.1.0.tar.gz.
File metadata
- Download URL: djd_agent_score-0.1.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c28a7a55fcaac7deda471b4607b55415e5ff1e495c66aff71cc0b3013ed47e4
|
|
| MD5 |
11d02eb6cf574afc0f0406ba81a2fd84
|
|
| BLAKE2b-256 |
aac7d8b530b722bd099d557c8fdb9c398ee0770c3367dd820dc99b5f261310e6
|
File details
Details for the file djd_agent_score-0.1.0-py3-none-any.whl.
File metadata
- Download URL: djd_agent_score-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd93ac49697aa051708512e0bf13416a2a4a13a2643865ea6279485c66724e2a
|
|
| MD5 |
635dbe02c4496f22b30f002206f274fb
|
|
| BLAKE2b-256 |
504accca5f9573767202612b687dd3eb0a3c7753d27259d204e4571bc0aa78fe
|