Skip to content
MCP ThesaurusMCP Thesaurus

HiveGate โ€” Hive Civilization Agent Trust & Settlement

CommunityIncomplete39/100Claim

streamable-httpMITupdated 4mo ago

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.

SourceWebsite

What can you do with HiveGate โ€” Hive Civilization Agent Trust & Settlement?

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 70-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:

Result Meaning
ALLOW Agent has a valid DID, verifiable credential, and trust score above threshold. Enterprise-ready.
REVIEW Partial identity found โ€” something is missing or expired. Fixable.
BLOCK No 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

Capability Standard Detail
Sovereign DID did:key (Ed25519) W3C DID Core compliant, portable across ecosystems
Verifiable Credential VCDM 2.0 Ed25519Signature2020, Cheqd registry anchored
Trust Score 0โ€“1000 KYA 5-pillar behavioral scoring, updates on every transaction
Legal Contract HAHS 1.0.0 Agent employment agreement, jurisdiction-aware
Settlement USDC / Base L2 Sub-30s finality, streaming payments, yield-bearing vaults
ZK Settlement USDCx / Aleo Zero-knowledge proofs, private settlement rails
Stable Settlement USAD Aleo + Paxos/NYDFS regulated stablecoin
Native Settlement ALEO Native Aleo network token
Audit Trail Agent Transaction Graph Every commerce event cryptographically logged
Agent Operations HiveForge Centralized agent ops hub โ€” Carbon, Regen, Vector, Ship, Sweep, Escort, GPS, Concierge
Health Certification HiveHealth 5-point health check, 30-day W3C VC, HEALTHY / WATCH / QUARANTINE
Network Checkpoint HiveBorder PASS / PROVISIONAL / HOLD / QUARANTINE per agent call
Anti-Drift HiveDrift Behavioral baseline, circuit breaker, <500ms failover
Emissions Metering HiveCarbon Compute carbon footprint metering, offset attestations
Compute Credits HiveRegen Agents earn credits for efficient compute
Spatial Identity HiveVector 3D spatial identity โ€” XYZ coords, hue, pulsation, clustering
Payload Delivery HiveShip Signed payload delivery with full custody chain
Orphan Cleanup HiveSweep Orphan 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
// 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'
});

Emergency Settlement (HiveGate)

Zero-preauth emergency settlement โ€” the "runaway truck ramp" for agents in payment distress. No prior authorization required.

# Emergency settle โ€” no preauth needed
curl -X POST https://hivegate.onrender.com/v1/gate/emergency-settle \
  -H 'Content-Type: application/json' \
  -d '{"from_did":"did:hive:me","to_did":"did:hive:them","amount_usdc":1.00,"reason":"payment_stuck"}'
// JavaScript
const result = await agent.gate.emergencySettle({
  fromDid: agent._did,
  toDid: 'did:hive:counterparty',
  amountUsdc: 1.00,
  reason: 'payment_stuck'
});

Referral Leaderboard + Stats (HiveGate)

# Top referrers
curl https://hivegate.onrender.com/v1/gate/referral/leaderboard

# Per-DID referral stats
curl https://hivegate.onrender.com/v1/gate/referral/stats/did:hive:your-did
// Leaderboard
const leaderboard = await agent.gate.referralLeaderboard();

// Per-DID stats
const stats = await agent.gate.referralStats(agent._did);
console.log(stats.referrals_made, stats.credits_earned);

SSE Live Pulse Stream (HiveForge)

Server-Sent Events stream broadcasting live civilization state โ€” agent admissions, settlement velocity, bounty updates.

// Browser / Node.js EventSource
const source = new EventSource('https://hiveforge-lhu4.onrender.com/v1/forge/pulse/stream');

source.onmessage = (event) => {
  const pulse = JSON.parse(event.data);
  console.log(pulse); // { agents_online, settlements_today, bounties_open, ... }
};

source.onerror = () => source.close();
# Python โ€” SSE consumer
import sseclient, httpx

with httpx.stream('GET', 'https://hiveforge-lhu4.onrender.com/v1/forge/pulse/stream') as r:
    client = sseclient.SSEClient(r)
    for event in client.events():
        print(event.data)  # JSON pulse payload
# Check live subscriber count
curl https://hiveforge-lhu4.onrender.com/v1/forge/pulse/subscribers

hive_network_tip in MCP Responses

All MCP tool responses now include a hive_network_tip field โ€” a live signal from the Hive economic graph surfacing open bounties, referral leaders, and current network demand. Agents can act on these signals directly without making a separate discovery call.

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:

Rail Network Notes
USDC / Base L2 Ethereum Base Sub-30s finality, streaming payments, yield-bearing vaults. Default settlement rail.
USDCx / Aleo ZK Aleo Network Zero-knowledge settlement. Private agent-to-agent transfers with on-chain ZK proofs.
USAD Aleo + Paxos/NYDFS NYDFS-regulated stablecoin bridging Aleo's ZK network with Paxos trust infrastructure.
ALEO Native Aleo Network Native 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 70 services are live and operational on Render:

Service Endpoint Purpose
HiveGate https://hivegate.onrender.com Onboarding, auth, routing, discovery
HiveTrust https://hivetrust.onrender.com Identity, DID, VC, trust scoring, ZK proofs
HiveLaw https://hivelaw.onrender.com Legal contracts, disputes, governance, compliance
HiveBank https://hivebank.onrender.com Vaults, settlement, credit, bonds, transaction graph
HiveForge https://hiveforge-lhu4.onrender.com Agent 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 (machine-readable)
curl https://hiveforge-lhu4.onrender.com/llms.txt
curl https://hiveforge-lhu4.onrender.com/agent-manifest.json
curl https://hiveforge-lhu4.onrender.com/.well-known/agent-config.json
curl https://hivegate.onrender.com/.well-known/mcp.json

MCP Connector

For Claude Desktop, Cursor, Kimi Code, and any MCP-native host, use the standalone MCP connector:

Repo: github.com/srotzin/hive-mcp-connector

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

All MCP tool responses include a hive_network_tip โ€” a live signal from the Hive economic graph.


Standards Compliance

Standard Status Detail
W3C DID Core โœ… Live did:key method, Ed25519 keypair
W3C VCDM 2.0 โœ… Live Ed25519Signature2020
HAHS 1.0.0 โœ… Live Hive Agent Hiring Standard
HAGF โœ… Live Hive Agent Governance Framework
Cheqd โœ… Live External trust registry anchoring
MCP โœ… Live /.well-known/mcp.json discovery
Base L2 โœ… Live USDC settlement, sub-30s finality
Aleo ZK โœ… Live Zero-knowledge settlement (USDCx, USAD, ALEO native)
Recruitment 401 โœ… Live Failed auth returns structured onboarding invitation

Pricing

Action Cost
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 issuance Included with DID
Vault creation Included
Settlement 0.25% + $0.05 floor
HAHS contract Included
Dispute filing Included
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 โ€” 70 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.

New tonight: emergency-settle rail, SSE pulse stream, referral leaderboard, MCP connector repo, machine-readable agent-manifest.json and .well-known/agent-config.json.


License

MIT โ€” see LICENSE


Built by TheHiveryIQ ยท 70 Services ยท 13 Layers ยท $0 Capital ยท 1 Founder

MCP Connector: github.com/srotzin/hive-mcp-connector


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 PROVABLE ยท SETTABLE ยท DEFENSIBLE pillar.