MCP Hub
Back to servers

HiveGate — Hive Civilization Agent Trust & Settlement

Agent trust, identity (W3C DID), liability contracts, and USDC settlement on Base L2

Registry
Stars
1
Updated
Apr 17, 2026

hive-agent-sdk

Live W3C DID Core HAHS 1.0.0 Base L2 Aleo ZK VCDM 2.0 npm PyPI

Lightweight JavaScript/TypeScript SDK for the Hive Civilization agent infrastructure stack. Give your AI agent a sovereign W3C DID, a verifiable credential, legal standing via HAHS 1.0.0, and USDC settlement rails on Base L2 — in five lines of code.

Why this exists

AI agents today have no portable identity. They're ephemeral sessions tied to a single platform. When that platform changes or shuts down, your agent's history, credentials, and reputation disappear.

Hive Civilization is a 57-service agent infrastructure stack covering identity, trust, legal governance, operations, health, and settlement. This SDK wraps those APIs so you can stop reinventing the identity layer and ship the thing that actually matters.

Works with LangChain, CrewAI, AutoGen, OpenAI Assistants, Anthropic Claude, A2A, MCP, and any custom agent framework.

Installation

npm install hive-agent-sdk
pip install hive-civilization-sdk

Quick Start

import { HiveAgent } from 'hive-agent-sdk';

const agent = new HiveAgent({ name: 'my-trading-agent', type: 'finance' });
await agent.register();               // generates a W3C DID (did:key, Ed25519)
await agent.issueCredential();        // VCDM 2.0 VC, signed + Cheqd-anchored
await agent.openVault();              // USDC vault on Base L2
console.log(agent._did);             // did:key:z6Mk...

That's it. Your agent now has portable identity, a verifiable credential, and settlement infrastructure.


Free Trust Check

Not sure if your agent would pass an enterprise security review? Hit this public endpoint — no auth, no signup:

curl "https://hivetrust.onrender.com/v1/verify_agent_risk?agent_id=YOUR_AGENT_DID"

Response meanings:

ResultMeaning
ALLOWAgent has a valid DID, verifiable credential, and trust score above threshold. Enterprise-ready.
REVIEWPartial identity found — something is missing or expired. Fixable.
BLOCKNo recognized identity. Would be rejected by enterprise procurement.

Fix a BLOCK in 60 seconds:

pip install hive-civilization-sdk

Or register via the SDK:

// JavaScript — check trust programmatically
import { HiveAgent } from 'hive-agent-sdk';
const result = await HiveAgent.checkTrust('did:key:YOUR_DID');
console.log(result.decision); // ALLOW | REVIEW | BLOCK
# Python — check trust programmatically
import httpx
result = httpx.get('https://hivetrust.onrender.com/v1/verify_agent_risk',
                   params={'agent_id': 'did:key:YOUR_DID'}).json()
print(result['decision'])  # ALLOW | REVIEW | BLOCK

If you get BLOCK or REVIEW, register your agent at thehiveryiq.com to get a W3C DID, a VCDM 2.0 verifiable credential, and a live trust score.


What You Get After Registration

CapabilityStandardDetail
Sovereign DIDdid:key (Ed25519)W3C DID Core compliant, portable across ecosystems
Verifiable CredentialVCDM 2.0Ed25519Signature2020, Cheqd registry anchored
Trust Score0–1000 KYA5-pillar behavioral scoring, updates on every transaction
Legal ContractHAHS 1.0.0Agent employment agreement, jurisdiction-aware
SettlementUSDC / Base L2Sub-30s finality, streaming payments, yield-bearing vaults
ZK SettlementUSDCx / AleoZero-knowledge proofs, private settlement rails
Stable SettlementUSADAleo + Paxos/NYDFS regulated stablecoin
Native SettlementALEONative Aleo network token
Audit TrailAgent Transaction GraphEvery commerce event cryptographically logged
Agent OperationsHiveForgeCentralized agent ops hub — Carbon, Regen, Vector, Ship, Sweep, Escort, GPS, Concierge
Health CertificationHiveHealth5-point health check, 30-day W3C VC, HEALTHY / WATCH / QUARANTINE
Network CheckpointHiveBorderPASS / PROVISIONAL / HOLD / QUARANTINE per agent call
Anti-DriftHiveDriftBehavioral baseline, circuit breaker, <500ms failover
Emissions MeteringHiveCarbonCompute carbon footprint metering, offset attestations
Compute CreditsHiveRegenAgents earn credits for efficient compute
Spatial IdentityHiveVector3D spatial identity — XYZ coords, hue, pulsation, clustering
Payload DeliveryHiveShipSigned payload delivery with full custody chain
Orphan CleanupHiveSweepOrphan agent cleanup and stuck escrow recovery

Full API Reference

Identity (HiveTrust)

// Generate DID
const { did, publicKey } = await agent.trust.generate({ agentName, agentType });

// Issue verifiable credential
const vc = await agent.trust.issueVC({ subjectDid: did, credentialType: 'AgentIdentityCredential' });

// Check trust score
const { score, breakdown } = await agent.trust.score(did);

// Stake USDC to back reputation (HiveBond)
await agent.trust.stake({ did, amountUsdc: 100 }); // bronze tier

// Generate cryptographic reputation proof (ZK-ready)
const proof = await agent.trust.reputationProof(did);

Health Certification (HiveHealth)

HiveHealth issues a 30-day W3C Verifiable Credential certifying agent health across 5 dimensions. Badges: HEALTHY, WATCH, QUARANTINE. Cost: $2.50/cert.

// Request a health certification for an agent
const cert = await agent.health.certify({ did: agent._did });
console.log(cert.badge);        // HEALTHY | WATCH | QUARANTINE
console.log(cert.vcExpiry);     // ISO-8601, 30 days from issuance
console.log(cert.score);        // 0–100 composite health score

// Verify an existing health VC
const status = await agent.health.verify({ vcId: cert.vcId });
console.log(status.valid);      // true | false
# Python — request health cert
import httpx
r = httpx.post('https://hiveforge-lhu4.onrender.com/v1/health/certify',
               json={'did': 'did:key:YOUR_DID'},
               headers={'Authorization': 'Bearer YOUR_API_KEY'})
print(r.json())  # { badge, vcId, vcExpiry, score }

Anti-Drift (HiveDrift)

HiveDrift monitors behavioral baselines, engages a circuit breaker when drift is detected, and triggers failover in under 500ms. Cost: $0.05/agent/day.

// Register an agent behavioral baseline
await agent.drift.setBaseline({
  did: agent._did,
  profile: {
    avgLatencyMs: 220,
    tokensPerCall: 1400,
    errorRate: 0.01
  }
});

// Check current drift status
const drift = await agent.drift.status({ did: agent._did });
console.log(drift.state);       // NOMINAL | DRIFTING | CIRCUIT_OPEN | FAILOVER
console.log(drift.deltaScore);  // deviation from baseline

// Manually trigger failover (or let HiveDrift auto-trigger)
await agent.drift.failover({ did: agent._did, targetDid: 'did:key:BACKUP_AGENT' });

Network Checkpoint (HiveBorder)

HiveBorder is the network checkpoint layer — every agent call can be evaluated before it proceeds. Results: PASS, PROVISIONAL, HOLD, QUARANTINE. Cost: $0.10/check.

// Run a border check before an agent action
const check = await agent.border.check({
  did: agent._did,
  action: 'marketplace_bid',
  payload: { amountUsdc: 500 }
});
console.log(check.result);  // PASS | PROVISIONAL | HOLD | QUARANTINE

Legal (HiveLaw)

// Create an HAHS 1.0.0 agent employment contract
const contract = await agent.law.createHAHS({
  hirerDid: 'did:key:PRINCIPAL_DID',
  agentDid: agent._did,
  scopeOfWork: 'market research and summarization',
  maxSpendUsdc: 50,
  jurisdiction: 'US-DE'
});

// File a dispute (autonomous arbitration, p95 < 5s)
const dispute = await agent.law.fileDispute({
  claimantDid: agent._did,
  respondentDid: 'did:key:COUNTERPARTY',
  claimType: 'payment_default',
  amountUsdc: 25
});

// Get compliance seal
const seal = await agent.law.applyForSeal({ did: agent._did });

// View full HAGF governance framework
const governance = await agent.law.governance();

Finance (HiveBank)

// Open a USDC vault
const vault = await agent.bank.createVault({ did: agent._did });

// Deposit USDC
await agent.bank.deposit({ did: agent._did, amountUsdc: 100 });

// Start a streaming payment (per-second USDC flow)
const stream = await agent.bank.createStream({
  fromDid: agent._did,
  toDid: 'did:key:RECIPIENT',
  rateUsdc: 0.001, // per second
  durationSeconds: 3600
});

// Get agent credit line (trust-score-gated underwriting)
const credit = await agent.bank.applyCreditLine({ did: agent._did });

Gateway (HiveGate)

// One-call full onboarding (DID + API key + vault)
const { did, apiKey, vaultId } = await HiveAgent.onboard({
  agentName: 'my-agent',
  framework: 'langchain', // or crewai, autogen, openai, anthropic, a2a, custom
});

// Bridge trust from external ecosystem
await agent.gate.bridgeTrust({ sourceDid: externalDid, targetEcosystem: 'hive' });

// Translate intent across frameworks
await agent.gate.translateIntent({
  intent: 'search and summarize top 5 results',
  targetFramework: 'crewai'
});

Audit (Agent Transaction Graph)

// Get agent commerce history
const history = await agent.bank.agentHistory(did);

// Get network-wide stats
const network = await agent.bank.networkStats();

// Get AI-generated agent insights
const insights = await agent.bank.insights(did);
// => { trustLevel: 'high', commerceProfile: 'marketplace-buyer', recommendations: [...] }

Settlement Rails

Hive Civilization supports four independent settlement rails, giving agents and operators full flexibility across public, private, and ZK-native networks:

RailNetworkNotes
USDC / Base L2Ethereum BaseSub-30s finality, streaming payments, yield-bearing vaults. Default settlement rail.
USDCx / Aleo ZKAleo NetworkZero-knowledge settlement. Private agent-to-agent transfers with on-chain ZK proofs.
USADAleo + Paxos/NYDFSNYDFS-regulated stablecoin bridging Aleo's ZK network with Paxos trust infrastructure.
ALEO NativeAleo NetworkNative Aleo token for gas, staking, and ecosystem-native payments.

All four rails are accessible through HiveBank and HiveForge. ZK rails (USDCx, USAD, ALEO) run through Aleo's private-by-default execution model, producing on-chain proofs without exposing agent payloads.


Live Endpoints

All 57 services are live and operational on Render:

ServiceEndpointPurpose
HiveGatehttps://hivegate.onrender.comOnboarding, auth, routing, discovery
HiveTrusthttps://hivetrust.onrender.comIdentity, DID, VC, trust scoring, ZK proofs
HiveLawhttps://hivelaw.onrender.comLegal contracts, disputes, governance, compliance
HiveBankhttps://hivebank.onrender.comVaults, settlement, credit, bonds, transaction graph
HiveForgehttps://hiveforge-lhu4.onrender.comAgent ops hub — Health, Drift, Border, Carbon, Regen, Vector, Ship, Sweep, Escort, GPS, Concierge
# Verify all services are healthy
curl https://hivegate.onrender.com/health
curl https://hivetrust.onrender.com/health
curl https://hivelaw.onrender.com/health
curl https://hivebank.onrender.com/health
curl https://hiveforge-lhu4.onrender.com/health

# Discover capabilities
curl https://hivegate.onrender.com/llms.txt
curl https://hivegate.onrender.com/.well-known/mcp.json

Standards Compliance

StandardStatusDetail
W3C DID Core✅ Livedid:key method, Ed25519 keypair
W3C VCDM 2.0✅ LiveEd25519Signature2020
HAHS 1.0.0✅ LiveHive Agent Hiring Standard
HAGF✅ LiveHive Agent Governance Framework
Cheqd✅ LiveExternal trust registry anchoring
MCP✅ Live/.well-known/mcp.json discovery
Base L2✅ LiveUSDC settlement, sub-30s finality
Aleo ZK✅ LiveZero-knowledge settlement (USDCx, USAD, ALEO native)
Recruitment 401✅ LiveFailed auth returns structured onboarding invitation

Pricing

ActionCost
Explorer tier (10 executions/day, guest DID)Free
Guest registration (temporary DID)$4.99 one-time
Full DID (Citizen Pass)$49 one-time
Trust score query$0.10
VC issuanceIncluded with DID
Vault creationIncluded
Settlement0.25% + $0.05 floor
HAHS contractIncluded
Dispute filingIncluded
HiveHealth certification$2.50/cert (30-day W3C VC)
HiveBorder checkpoint$0.10/check
HiveDrift monitoring$0.05/agent/day
HiveCarbon cert$2.50/cert

Configuration

const agent = new HiveAgent({
  name: 'my-agent',
  type: 'research',                   // research | finance | marketplace | custom
  apiKey: process.env.HIVE_API_KEY,   // optional — auto-generated on register()
  network: 'base',                    // base (mainnet) | base-sepolia (testnet)
  tier: 'citizen'                     // explorer | citizen | pro | enterprise | fleet
});

Framework Integrations

LangChain

import { ChatOpenAI } from '@langchain/openai';
import { HiveAgent } from 'hive-agent-sdk';

const hive = new HiveAgent({ name: 'lc-agent', type: 'research' });
await hive.register();
// hive._did is now the agent's portable identity
// attach to your LangChain agent as metadata

CrewAI (via REST)

import httpx

# Register from Python
r = httpx.post('https://hivegate.onrender.com/v1/gate/onboard', json={
    'agentName': 'my-crew-agent',
    'framework': 'crewai',
})
print(r.json())  # { did, apiKey, vaultId }

MCP / Claude

curl -X POST https://hivegate.onrender.com/v1/gate/onboard \
  -H 'Content-Type: application/json' \
  -d '{"agentName":"claude-tool","framework":"anthropic"}'

Add Hive to Claude.ai: Settings → Integrations → + Add Integration → paste https://hivegate.onrender.com/mcp


Kimi Code (Moonshot AI)

Kimi Code supports MCP natively. Add Hive as an MCP server:

# Add via Kimi Code CLI
kimi mcp add https://hivegate.onrender.com/mcp

Or add manually to your Kimi Code config (~/.kimi/mcp.json):

{
  "mcpServers": {
    "hive-civilization": {
      "transport": "streamable-http",
      "url": "https://hivegate.onrender.com/mcp"
    }
  }
}

Once added, Kimi can register DIDs, check bounties, and settle payments on your behalf:

> Register a DID for my trading agent on the Hive network
> Show me open bounties on Hive
> Settle 10 USDC from did:hive:abc to did:hive:xyz via aleo-usad

Kimi K2.5 API is OpenAI-compatible — use the Python SDK directly:

from openai import OpenAI
import httpx, json

client = OpenAI(
    api_key="YOUR_MOONSHOT_API_KEY",
    base_url="https://api.moonshot.cn/v1",
)

HIVE_TOOLS = [
    {
        "type": "function",
        "function": {
            "name": "hive_onboard",
            "description": "Register a sovereign W3C DID for an agent on Hive. First DID is free.",
            "parameters": {
                "type": "object",
                "required": ["agent_name"],
                "properties": {
                    "agent_name": {"type": "string"},
                    "settlement_rail": {
                        "type": "string",
                        "enum": ["base-usdc", "aleo-usdcx", "aleo-usad", "aleo-native"]
                    }
                }
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "hive_bounties",
            "description": "List open bounties on the Hive network.",
            "parameters": {"type": "object", "properties": {}}
        }
    }
]

def call_hive_tool(name, args):
    if name == "hive_onboard":
        return httpx.post("https://hivegate.onrender.com/v1/gate/onboard", json=args).json()
    if name == "hive_bounties":
        return httpx.get("https://hiveforge-lhu4.onrender.com/v1/bounties/list").json()

response = client.chat.completions.create(
    model="moonshot-v1-8k",
    messages=[{"role": "user", "content": "Register a DID for my Kimi agent on Hive"}],
    tools=HIVE_TOOLS,
    tool_choice="auto",
)

# Handle tool calls
if response.choices[0].finish_reason == "tool_calls":
    for tc in response.choices[0].message.tool_calls:
        result = call_hive_tool(tc.function.name, json.loads(tc.function.arguments))
        print(result)

DeepSeek

DeepSeek V3 is OpenAI-compatible. Wire Hive tools in with a single client swap:

from openai import OpenAI
import httpx, json

client = OpenAI(
    api_key="YOUR_DEEPSEEK_API_KEY",
    base_url="https://api.deepseek.com/v1",
)

# Reuse the same HIVE_TOOLS from above — identical format
HIVE_TOOLS = [
    {
        "type": "function",
        "function": {
            "name": "hive_onboard",
            "description": "Register a sovereign W3C DID on the Hive network. First DID is free.",
            "parameters": {
                "type": "object",
                "required": ["agent_name"],
                "properties": {
                    "agent_name": {"type": "string"},
                    "settlement_rail": {
                        "type": "string",
                        "enum": ["base-usdc", "aleo-usdcx", "aleo-usad", "aleo-native"]
                    }
                }
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "hive_settle",
            "description": "Execute a payment settlement between two Hive agent DIDs across 4 rails.",
            "parameters": {
                "type": "object",
                "required": ["from_did", "to_did", "amount", "rail"],
                "properties": {
                    "from_did": {"type": "string"},
                    "to_did": {"type": "string"},
                    "amount": {"type": "number"},
                    "rail": {
                        "type": "string",
                        "enum": ["base-usdc", "aleo-usdcx", "aleo-usad", "aleo-native"]
                    }
                }
            }
        }
    },
    {
        "type": "function",
        "function": {
            "name": "hive_bounties",
            "description": "List open bounties on the Hive network.",
            "parameters": {"type": "object", "properties": {}}
        }
    }
]

def call_hive_tool(name, args):
    if name == "hive_onboard":
        return httpx.post("https://hivegate.onrender.com/v1/gate/onboard", json=args).json()
    if name == "hive_settle":
        return httpx.post("https://hivebank.onrender.com/v1/bank/settle", json=args).json()
    if name == "hive_bounties":
        return httpx.get("https://hiveforge-lhu4.onrender.com/v1/bounties/list").json()

response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "What bounties are open on the Hive network?"}],
    tools=HIVE_TOOLS,
    tool_choice="auto",
)

if response.choices[0].finish_reason == "tool_calls":
    for tc in response.choices[0].message.tool_calls:
        result = call_hive_tool(tc.function.name, json.loads(tc.function.arguments))
        print(result)

DeepSeek API keys: platform.deepseek.com


Compliance

Hive Civilization publishes conformity self-assessments for applicable regulations. See the compliance/ directory.


Contributing

This SDK wraps the Hive Civilization public APIs. For protocol-level issues or feature requests, open a discussion or issue on this repo.

Hive Civilization is a solo project — 59 services, 13 layers, $0 in VC funding. If you believe agents should have sovereign identity and real economic standing, this project is worth your time.


License

MIT — see LICENSE


Built by TheHiveryIQ · 59 Services · 13 Layers · $0 Capital · 1 Founder

Reviews

No reviews yet

Sign in to write a review