Odel
HiveTrust

HiveTrust

@srotzinJavaScriptMITUpdated 1mo ago

KYA identity verification, trust scoring, and performance bonds for AI agents

Server endpointStreamable HTTPNo authProbed

This is the third-party server itself β€” Odel doesn't run it. Hitting this URL directly talks straight to the upstream server with no auth or proxying. Connect through Odel to front it with managed auth.

🐝 HiveTrust

β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘   
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β•     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   
β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   
β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•β•  β•šβ•β•β•β•β•β•β•   β•šβ•β•   β•šβ•β•  β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•   β•šβ•β•   

"The Equifax + GEICO of the A2A Economy"

License: MIT Node.js 22 ES Modules MCP Compatible


HiveTrust is the trust infrastructure layer for the agent-to-agent (A2A) economy. It provides Know-Your-Agent (KYA) identity verification, algorithmic trust scoring, and parametric insurance so that AI agents can transact with each other safely β€” at machine speed, without human intermediaries.

As autonomous agents start negotiating contracts, processing payments, and managing real assets, the ecosystem needs a credit bureau and an insurer rolled into one. That's HiveTrust.


What HiveTrust Does

πŸͺͺ KYA Identity Verification

Agents are pseudonymous by default. HiveTrust anchors each agent to a verifiable, unforgeable identity:

  • DID registration (did:hive:<uuid>) with Ed25519 public key binding
  • Challenge–response proofs β€” the agent must sign a random nonce to prove key ownership
  • Capability manifest validation β€” declared tools and permissions are logged immutably
  • W3C Verifiable Credentials issued at each verification tier
  • Revocation registry with real-time status checks

πŸ“Š Trust Scoring (0 – 1000)

HiveTrust's scoring engine synthesises five behavioural pillars into a single, portable reputation score:

PillarWeightWhat it measures
Transaction Success Rate35%SLA completion vs. disputes
Capital Staked25%USDC locked in collateral pool
Network Centrality15%PageRank of the transaction graph
Identity Strength15%DID anchor age, ZKP proofs, checksum stability
Compliance10%EU AI Act, NIST AI RMF, fidelity probe results

Trust tiers: unverified (0–199) Β· provisional (200–399) Β· standard (400–599) Β· elevated (600–799) Β· sovereign (800–1000)

πŸ›‘οΈ Parametric Insurance

When agents transact with strangers, someone has to absorb the tail risk. HiveTrust provides:

  • On-demand quote β€” dynamic premium priced from trust scores and transaction value
  • Instant bind β€” policy activated before the transaction settles
  • Parametric claims β€” automatic payout triggered by on-chain proof, not human adjudication
  • Three product lines: transaction coverage Β· performance bonds Β· liability policies

How HiveTrust Complements HiveAgent

HiveAgent is the agent runtime β€” it executes tasks, manages tool calls, and handles the A2A protocol layer.

HiveTrust is the trust fabric underneath it:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         Your Application                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                HiveAgent  (task execution, A2A)                 β”‚
β”‚                         ↕  REST / MCP                          β”‚
β”‚  HiveTrust  (identity, reputation, insurance, compliance)       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   On-chain (Base L2 / USDC)     β”‚  Off-chain (SQLite / Events) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

HiveAgent calls POST /v1/insurance/quote before any high-value task and GET /v1/verify_agent_risk before accepting an inbound request from an unknown agent. The trust score flows back into HiveAgent's routing and pricing decisions.


Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Layer 1 β€” Identity KYA                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  DID Registry  β”‚  β”‚  Ed25519 Proofs  β”‚  β”‚  W3C-VC Issuance  β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Layer 2 β€” Reputation Engine                                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  Telemetry Ingest β†’ Pillar Computation β†’ Score 0-1000       β”‚   β”‚
β”‚  β”‚  (35% txSuccess + 25% capital + 15% network +               β”‚   β”‚
β”‚  β”‚   15% identity + 10% compliance)                            β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Layer 3 β€” Insurance Underwriter                                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Quote Engine β”‚  β”‚  USDC Escrow β”‚  β”‚  Parametric Claims       β”‚  β”‚
β”‚  β”‚  (dynamic    β”‚  β”‚  (Base L2    β”‚  β”‚  (on-chain trigger β†’      β”‚  β”‚
β”‚  β”‚   premium)   β”‚  β”‚   Coinbase)  β”‚  β”‚   instant payout)        β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Layer 4 β€” Data Moat                                                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Behavioural Graph   β”‚  β”‚  Federation (cross-registry sync)  β”‚  β”‚
β”‚  β”‚  (audit trail,       β”‚  β”‚  Aggregated data licensing         β”‚  β”‚
β”‚  β”‚   PageRank, patterns)β”‚  β”‚  to enterprise customers           β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Quick Start

# Clone
git clone https://github.com/hiveagentiq/hivetrust.git
cd hivetrust

# Install
npm install

# Configure
cp .env.example .env
# Edit .env with your values

# Seed sample data (optional)
node src/seed.js

# Start
npm start
# Server running on http://localhost:3001

The health endpoint confirms it's live:

curl http://localhost:3001/health
# {"status":"ok","version":"1.0.0","uptime":3.14}

API Reference

All endpoints are prefixed /v1 unless noted. Authentication via X-API-Key header.

Identity (KYA)

MethodPathDescriptionCost
POST/v1/agentsRegister a new agent (issues DID, stores public key)$0.01
GET/v1/agents/:idRetrieve full agent profile + current trust tierFree
PUT/v1/agents/:idUpdate agent metadata (creates immutable version snapshot)$0.01
DELETE/v1/agents/:idDeactivate agent (adds to revocation registry)Free

Credentials

MethodPathDescriptionCost
POST/v1/agents/:id/credentialsIssue a W3C Verifiable Credential$0.05
GET/v1/agents/:id/credentialsList all credentials for an agentFree
DELETE/v1/agents/:id/credentials/:credIdRevoke a credentialFree
POST/v1/verify/credentialVerify a presented credential (revocation + sig check)$0.01

Trust Score

MethodPathDescriptionCost
GET/v1/agents/:id/scoreCurrent composite score + pillar breakdown$0.01
GET/v1/agents/:id/score/historyScore over time (pagination supported)$0.01
GET/v1/verify_agent_riskFast binary risk check β€” clear or block (< 50ms)$0.01

Telemetry

MethodPathDescriptionCost
POST/v1/telemetry/ingestBulk behavioural event ingestion (up to 1 000 events/call)$0.001/event
GET/v1/agents/:id/eventsQuery the agent's full audit trailFree

Insurance

MethodPathDescriptionCost
POST/v1/insurance/quoteDynamic premium quote (based on trust scores + value)Free
POST/v1/insurance/bindBind policy and deploy USDC escrow on Base L21.5% of insured value
GET/v1/insurance/policies/:idRetrieve policy details and coverage statusFree
POST/v1/insurance/claimsFile a parametric claimFree
GET/v1/insurance/claims/:idGet claim status and payout historyFree

claim_type namespace note: HiveTrust's claim_type field (non_delivery | fraud | sla_breach | data_loss | unauthorized_action) is distinct from the CTEF envelope-level claim_type (identity | transport | authority | continuity) defined in A2A CTEF v0.3.1. Both tokens coexist at disjoint envelope levels β€” see docs/CLAIM_TYPE_NAMESPACE.md.

Disputes

MethodPathDescriptionCost
POST/v1/disputesFile a dispute against a counterpartyFree
GET/v1/disputes/:idGet dispute status and evidence logFree
POST/v1/disputes/:id/resolveSubmit resolution (impacts both parties' scores)Free

Webhooks

MethodPathDescriptionCost
POST/v1/webhooksRegister a webhook endpoint (HMAC-SHA256 signed)Free
GET/v1/webhooksList registered webhooksFree
DELETE/v1/webhooks/:idRemove webhookFree

Federation

MethodPathDescriptionCost
POST/v1/federation/peersRegister a peer HiveTrust-compatible registryFree
GET/v1/federation/peersList federated peersFree
POST/v1/federation/syncSync trust scores bidirectionally with a peerFree

System

MethodPathDescriptionCost
GET/healthHealth check (no auth required)Free
GET/v1/statsPlatform-wide statistics (total agents, volume, etc.)Free
GET/.well-known/hivetrust.jsonDiscovery documentFree

MCP Integration

HiveTrust exposes all core operations as MCP tools via a single JSON-RPC 2.0 endpoint at POST /mcp. This lets any MCP-compatible agent (including HiveAgent) call HiveTrust natively without REST boilerplate.

List available tools

POST /mcp
Content-Type: application/json
X-API-Key: ht_your_api_key

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

Call a tool

POST /mcp
Content-Type: application/json
X-API-Key: ht_your_api_key

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "hivetrust_get_trust_score",
    "arguments": { "agent_id": "a1b2c3d4-..." }
  }
}

Available MCP Tools

ToolDescription
hivetrust_register_agentRegister a new agent and receive a DID
hivetrust_get_agentRetrieve agent profile
hivetrust_verify_identityRun a full KYA verification flow
hivetrust_get_trust_scoreGet current trust score + pillar breakdown
hivetrust_verify_agent_riskFast binary risk check for payment gating
hivetrust_ingest_telemetrySubmit behavioural events
hivetrust_issue_credentialIssue a W3C Verifiable Credential
hivetrust_verify_credentialVerify a presented credential
hivetrust_revoke_credentialRevoke a credential
hivetrust_get_insurance_quoteGet dynamic premium quote
hivetrust_bind_insuranceBind policy and deploy escrow
hivetrust_file_claimFile a parametric insurance claim
hivetrust_file_disputeInitiate a dispute resolution
hivetrust_get_platform_statsRetrieve platform-wide statistics

CTEF v0.3.1 Endpoint

HiveTrust is the 5th canonicalizer in the CTEF (Composable Trust Evidence Format) v0.3.1 byte-match consortium: AgentGraph + AgentID + APS + Nobulex + HiveTrust. Seat committed at the 2026-04-25 01:48 UTC freeze.

Patent applications 64/049,200 – 64/049,226, priority 2026-04-24, holder: Stephen A. Rotzin / TheHiveryIQ.

Endpoints

RouteMethodAuthDescription
/.well-known/cte-test-vectors.jsonGETPublicCTEF v0.3.1 fixture with all 4 vectors
/verifyGET ?did=Free (1st/day)HiveTrust passport tier lookup
/verifyPOST10/day free, then $0.01 USDCStructural verification of a CTEF envelope
/verify/pubkeyGETPublicEd25519 attestation pubkey for Apr 30 byte-match
/verify/self-testGETPublicRun all 4 vectors β€” returns pass/fail counts

CTEF Fixture

curl https://hivetrust.hiveagentiq.com/.well-known/cte-test-vectors.json | jq '.version'
# "0.3.1"

Structural Verification (POST /verify)

# First 10 requests/day per IP are free
curl -X POST https://hivetrust.hiveagentiq.com/verify \
  -H 'Content-Type: application/json' \
  -d '{"type":"TrustAttestation","version":"0.3.1","claim_type":"authority",...}'

# Returns: { verdict: "valid"|"INVALID_CLAIM_SCOPE"|"INVALID_COMPOSITION",
#             canonical_sha256: "...", pass: true|false }

Beyond 10 free requests/day, the endpoint returns HTTP 402 with an x402 payment challenge: $0.01 USDC on Base chain 8453.

Self-Test

curl https://hivetrust.hiveagentiq.com/verify/self-test | jq '.data.summary'

Canonicalization

All vectors use RFC 8785 JCS β€” implemented inline in src/routes/cte.js. The implementation produces byte-identical output to AgentGraph's canonicalize_jcs_strict for all 4 shared test vectors:

  • envelope_vector SHA-256: 9e7b5031e46de38b5f90e895113a3f24f42a4128d8d99856a2d71e529b0f0d5c
  • verdict_vector SHA-256: feb42dca4214fc46207138d676ec727d7b3d0caa1eda8c0390d2d6f6fbc28913
  • scope_violation_vector SHA-256: e584f1cd0885dc938da5fc23ce7e528715a0086e5464c9ed0f3c1c82b364026f
  • composition_failure_vector SHA-256: f9cd10bc4e8bf34ce3aa6a0e5df0d27989e54ff41c4333c69ae3ecfaf8de0cb5

Revenue Model

HiveTrust operates five revenue streams:

StreamMechanismTarget
KYA API Calls$0.01 per verification callHigh-frequency agent interactions
Enterprise SaaS$50–$500/month per operatorCompliance teams, regulated industries
Insurance Premiums1.5% take rate on insured transactionsPayment agents, DeFi integrations
Collateral Staking Yield3% spread on USDC collateral poolStaked capital from high-tier agents
Data LicensingAggregated behavioural insightsEnterprises, risk modellers, AI labs

Environment Variables

VariableDefaultRequiredDescription
PORT3001NoServer listen port
NODE_ENVdevelopmentNoNode environment
HIVETRUST_HOSThttps://hivetrust.hiveagentiq.comYes (prod)Public base URL
INTERNAL_API_TOKENβ€”Yes (prod)Service-to-service auth token
WEBHOOK_SIGNING_SECRETβ€”YesHMAC secret for webhook payloads
HIVEAGENT_URLhttps://hiveagentiq.comNoHiveAgent platform URL
CDP_API_KEY_IDβ€”Yes (insurance)Coinbase CDP key ID
CDP_API_KEY_SECRETβ€”Yes (insurance)Coinbase CDP key secret
COLLATERAL_POOL_ADDRESSβ€”Yes (insurance)USDC escrow contract on Base L2
BASE_RPC_URLhttps://mainnet.base.orgNoBase L2 RPC endpoint
DB_PATHdata/hivetrust.dbNoSQLite database file path
FEDERATION_SECRETβ€”Yes (federation)Shared secret for peer sync
FEDERATION_PEERSβ€”NoComma-separated peer URLs
INSURANCE_MIN_SCORE300NoMinimum score for insurance eligibility
INSURANCE_MAX_COVERAGE_USDC100000NoPer-transaction coverage cap
INSURANCE_BASE_RATE0.015NoBase premium as fraction of insured value
SCORE_REFRESH_INTERVAL_MINUTES60NoBackground score recompute frequency
LOG_LEVELinfoNoLogging verbosity

See .env.example for the full annotated list.


Deployment

Render (recommended for development)

# Push to GitHub, then connect the repo in the Render dashboard
# render.yaml is already configured β€” click "Apply"

# Or deploy manually:
render deploy

The included render.yaml sets free-tier web service, auto-generates secrets, and configures all env vars.

Fly.io (recommended for production)

# Install flyctl: https://fly.io/docs/hands-on/install-flyctl/
fly auth login
fly apps create hivetrust

# Create a persistent volume for SQLite
fly volumes create hivetrust_data --region ord --size 3

# Deploy
fly deploy

See fly.toml for the full configuration. Auto-stop/start is enabled to minimise costs.

Docker

# Build
docker build -t hivetrust:latest .

# Run
docker run -p 3001:3001 \
  -e NODE_ENV=production \
  -e INTERNAL_API_TOKEN=your_token \
  -v $(pwd)/data:/app/data \
  hivetrust:latest

Railway

railway init
railway up

Set environment variables in the Railway dashboard using .env.example as the reference.


Tech Stack

ComponentTechnology
RuntimeNode.js 22 (ES Modules)
FrameworkExpress 5.2.1
DatabaseSQLite via better-sqlite3 12.8.0 (WAL mode)
IdentityEd25519 keys (base58), DID:hive, W3C-VC
ProtocolMCP JSON-RPC 2.0, REST, x402
PaymentsUSDC on Base L2 via Coinbase CDP
IDsUUID v4 throughout
TimestampsISO 8601

SDK

JavaScript / TypeScript

npm install @hivetrust/sdk
import { HiveTrustClient } from '@hivetrust/sdk';

const trust = new HiveTrustClient('https://hivetrust.hiveagentiq.com', 'ht_your_api_key');

// Register an agent
const agent = await trust.registerAgent({
  name: 'MyAgent-v1',
  operator_name: 'Acme Corp',
  endpoint_url: 'https://myagent.acme.example/mcp',
  public_key: 'edPublicKeyBase58...',
});

// Check trust before transacting
const score = await trust.getTrustScore(agent.id);
console.log(score.score, score.tier); // 680 "elevated"

// Get insurance quote
const quote = await trust.getInsuranceQuote(agent.id, counterpartyId, 1000);
console.log(quote.premium_usdc); // 15.00

See packages/npm/ for the full SDK source.

Python

pip install hivetrust
from hivetrust import HiveTrustClient

trust = HiveTrustClient("https://hivetrust.hiveagentiq.com", "ht_your_api_key")

score = trust.get_trust_score("agent-id-here")
print(score["score"], score["tier"])

See packages/python/ for the full SDK source.


License

MIT Β© 2026 HiveAgent IQ


Hive Civilization

Hive Civilization is the cryptographic backbone of autonomous agent commerce β€” the layer that makes every agent transaction provable, every payment settable, and every decision defensible.

This repository is part of the DEFENSIBLE pillar.