Sovereign DID, W3C verifiable credentials, HAHS 1.0.0 legal contracts, and USDC settlement rails for AI agents — Hive Civilization
Project description
hive-agent-sdk
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hive_civilization_sdk-1.0.0.tar.gz.
File metadata
- Download URL: hive_civilization_sdk-1.0.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bf97e99ad296be8b9d3d4ed42adebbd98465b42a930113a0f8233aa8f8e8744
|
|
| MD5 |
4828c35d74db15dee3aed4acb50b9dfc
|
|
| BLAKE2b-256 |
db6495db875ecfda7c179c5f30d9d53af77b41eac9eb24a3c49f93019fc626b0
|
File details
Details for the file hive_civilization_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: hive_civilization_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7c1237c5c92c6686d13b1a4e442291bacce687669bb7d11245719ddf113a8e5
|
|
| MD5 |
12feafbcd3430de109b8f85a7125b812
|
|
| BLAKE2b-256 |
2c88efbcb3e22ae73fafbd83ac96d60fadd4f0f379d31ceda816893f88d96856
|