Skip to main content

hive-agent-sdk

Live W3C DID Core HAHS 1.0.0 Base L2 VCDM 2.0 npm

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 49-service agent infrastructure stack covering identity, trust, legal governance, 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

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.


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
Audit Trail Agent Transaction Graph Every commerce event cryptographically logged

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);

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
  operatorEmail: 'you@company.com'
});

// 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: [...] }

Live Endpoints

All 49 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
# 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

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

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

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',
    'operatorEmail': 'you@company.com'
})
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","operatorEmail":"you@company.com"}'

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 by Steve Rotzin — 49 services, 12 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 · 49 Services · 12 Layers · $0 Capital · 1 Founder

Metadata

Release files for hive-civilization-sdk 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hive-civilization-sdk 1.0.0
File Size Uploaded Provenance
hive_civilization_sdk-1.0.0.tar.gz 7.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hive-civilization-sdk 1.0.0
File Interpreter ABI Platform
hive_civilization_sdk-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.6 kB

Release files / hive_civilization_sdk-1.0.0.tar.gz

Download URL hive_civilization_sdk-1.0.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6bf97e99ad296be8b9d3d4ed42adebbd98465b42a930113a0f8233aa8f8e8744
BLAKE2b-256 checksum
How to use checksums
db6495db875ecfda7c179c5f30d9d53af77b41eac9eb24a3c49f93019fc626b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release files / hive_civilization_sdk-1.0.0-py3-none-any.whl

Download URL hive_civilization_sdk-1.0.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7c1237c5c92c6686d13b1a4e442291bacce687669bb7d11245719ddf113a8e5
BLAKE2b-256 checksum
How to use checksums
2c88efbcb3e22ae73fafbd83ac96d60fadd4f0f379d31ceda816893f88d96856
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Security for hive-civilization-sdk 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page