Python SDK for SentinelNet — autonomous reputation scoring for ERC-8004 agents on Base
Project description
SentinelNet Python SDK
Trust scoring for ERC-8004 agents on Base.
Install
pip install sentinelnet
Or from source:
pip install git+https://github.com/Ridwannurudeen/sentinelnet.git#subdirectory=sdk/python
Quick Start
from sentinelnet import SentinelNet
sn = SentinelNet()
# Get trust score
score = sn.get_trust(31253)
print(f"Score: {score['trust_score']}, Verdict: {score['verdict']}")
# Gate an interaction
if sn.trust_gate(agent_id=42, min_score=55):
print("Agent is safe to interact with")
# Batch query
results = sn.batch_trust([1, 2, 3, 100, 200])
# Threat intelligence
threats = sn.get_threats(limit=10)
Async Usage
from sentinelnet import AsyncSentinelNet
async with AsyncSentinelNet() as sn:
score = await sn.get_trust(31253)
trusted = await sn.is_trusted(42)
API Reference
| Method | Description |
|---|---|
get_trust(agent_id) |
Get full trust score with explanation |
is_trusted(agent_id) |
Quick boolean trust check |
trust_gate(agent_id, min_score) |
Gate interactions by minimum score |
batch_trust(agent_ids) |
Query up to 100 agents at once |
get_history(agent_id) |
Score history over time |
get_graph(agent_id) |
Counterparty neighborhood |
get_threats(limit) |
Real-time threat intelligence feed |
get_stats() |
Ecosystem-wide statistics |
badge_url(agent_id) |
Embeddable SVG badge URL |
Self-Hosted
sn = SentinelNet(base_url="http://localhost:8004")
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
sentinelnet-0.1.0.tar.gz
(3.6 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 sentinelnet-0.1.0.tar.gz.
File metadata
- Download URL: sentinelnet-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a263a5b6d62e3301281089acde0b814c88baea03d91d58e07626f46e1f162b9
|
|
| MD5 |
4e1e8e5e3f12942de74509265b065022
|
|
| BLAKE2b-256 |
95477878e904cef6e75de8e2531bd641ee8251be92fe91f5f22dded8c8ebd394
|
File details
Details for the file sentinelnet-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sentinelnet-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15172809a0ec057632d20b06af4b0b03e486b5a290a2c025eced3029d3046d2b
|
|
| MD5 |
55e4b9dd34f648329e7706c9fb93afc0
|
|
| BLAKE2b-256 |
dffa2129c24487fb41385700a84379ebf40cac71b5376e29a248dea179cee9c1
|