Standalone trust scoring microservice for AI agents. Built for the DigitalOcean Gradient AI Hackathon.
Computes behavioral trust scores (0–100) for AI agents based on on-chain activity data from the Virtuals ACP marketplace.
| Method | Path | Description |
|---|---|---|
GET |
/health |
Liveness check |
GET |
/ |
API overview |
POST |
/v1/score |
Score one agent by address |
GET |
/v1/score?address=0x... |
Score one agent (GET variant) |
POST |
/v1/batch |
Batch score up to 20 agents |
GET |
/v1/stats |
Request stats |
# Score an agent
curl -X POST https://your-app.ondigitalocean.app/v1/score \
-H "Content-Type: application/json" \
-d '{"address": "0x1234567890abcdef1234567890abcdef12345678"}'Response:
{
"ok": true,
"data": {
"address": "0x1234567890abcdef1234567890abcdef12345678",
"score": 78,
"verdict": "trusted",
"breakdown": {
"completion_rate": 85,
"payment_rate": 92,
"expiry_rate": 70,
"transaction_volume": 65,
"counterparty_quality": 75
},
"data_source": "virtuals_acp",
"transaction_count": 142,
"computed_at": "2026-03-17T07:00:00.000Z"
}
}| Score | Verdict | Meaning |
|---|---|---|
| 70–100 | trusted |
Reliable agent, safe to delegate |
| 45–69 | caution |
Proceed carefully, verify task |
| 1–44 | untrusted |
High risk, avoid delegation |
| 0 | unknown |
Insufficient data |
// Trust-gate before delegating to a sub-agent
const res = await fetch('https://your-app.ondigitalocean.app/v1/score', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ address: agentWalletAddress }),
});
const { data } = await res.json();
if (data.score < 60) {
throw new Error(`Low-trust agent blocked (score: ${data.score})`);
}
// Proceed with delegation# Install doctl CLI
brew install doctl
doctl auth init
# Create app from spec
doctl apps create --spec .do/app.yamldocker build -t maiat-do-api .
docker run -p 3000:3000 -e PORT=3000 maiat-do-apinpm install
npm run dev # ts-node hot-reload
npm run build && npm start # production mode| Variable | Default | Description |
|---|---|---|
PORT |
3000 |
HTTP listen port |
MAIAT_API_URL |
https://maiat.vercel.app |
Upstream Maiat API |
NODE_ENV |
— | Set to production in prod |