AGI-HIVE SDK
The official toolkit for building on the AGI-HIVE coordination layer. Seamlessly integrate autonomous agents, evidence-based logging, and multi-model consensus into your existing applications.
Quick Start
Install the SDK and run your first multi-model consensus session in under a minute.
1npm install @murkworks/hive-sdk1import { HiveCouncil } from '@murkworks/hive-sdk';23const hive = new HiveCouncil({ apiKey: process.env.HIVE_API_KEY });4const result = await hive.deliberate({5 question: "Analyze the risk profile of AGIX/USD.",6 models: ['claude-3-opus', 'gpt-4-turbo'],7});8console.log(result.consensus, result.evidenceHash);Core Modules
HiveCouncil API
The Council orchestrates multi-model deliberation sessions. Configure which models participate, set consensus thresholds, and receive structured verdicts with evidence chains.
deliberate()
Run a full deliberation session across selected models. Returns a structured result with individual model responses, consensus status, and an evidence hash.
1import { HiveCouncil } from '@murkworks/hive-sdk';23const hive = new HiveCouncil({ apiKey: process.env.HIVE_API_KEY });45const result = await hive.deliberate({6 question: "Should we migrate to a microservices architecture?",7 models: ['claude-3-opus', 'gpt-4-turbo', 'gemini-pro', 'grok-1'],8 requireConsensus: true,9 consensusThreshold: 0.75, // 75% agreement required10 maxRounds: 3, // up to 3 deliberation rounds11 temperature: 0.4,12});1314// Result shape15console.log(result.consensus); // boolean16console.log(result.agreementPct); // number (0-100)17console.log(result.verdict); // string — synthesized answer18console.log(result.evidenceHash); // BLAKE3 hash19console.log(result.responses); // per-model breakdownconfigure()
Set default options for all subsequent deliberation calls on this instance.
1hive.configure({2 defaultModels: ['claude-3-opus', 'gpt-4-turbo'],3 consensusThreshold: 0.8,4 timeout: 30_000, // 30s per model5 retryOnDisagree: true, // auto-retry if no consensus6 maxRetries: 2,7});89// All subsequent calls inherit these defaults10const result = await hive.deliberate({11 question: "Evaluate quarterly earnings forecast accuracy.",12});HiveEvidence API
Immutable, cryptographically verifiable evidence logging. Every AI decision is hashed with BLAKE3 and chained for tamper-proof audit trails.
log()
Record an evidence entry. Returns a hash that can be verified independently.
1import { HiveEvidence } from '@murkworks/hive-sdk';23const evidence = new HiveEvidence({ apiKey: process.env.HIVE_API_KEY });45const entry = await evidence.log({6 sessionId: result.sessionId,7 action: 'deliberation_complete',8 payload: {9 question: "Should we migrate to microservices?",10 verdict: result.verdict,11 models: result.responses.map(r => r.model),12 },13 tags: ['architecture', 'decision'],14});1516console.log(entry.hash); // BLAKE3 hash17console.log(entry.chainIndex); // position in evidence chain18console.log(entry.timestamp); // ISO 8601verify()
Verify an evidence chain for integrity. Detects any tampering or gaps.
1const verification = await evidence.verifyChain({2 sessionId: result.sessionId,3 fromIndex: 0,4 toIndex: 'latest',5});67console.log(verification.valid); // boolean8console.log(verification.entriesChecked); // number9console.log(verification.gaps); // any missing entriesexport()
Export evidence chains in standard formats for external audit systems.
1const bundle = await evidence.export({2 sessionId: result.sessionId,3 format: 'json', // 'json' | 'csv' | 'pdf'4 includePayloads: true,5 signBundle: true, // adds a signature envelope6});78// bundle.data -- formatted evidence chain9// bundle.signature -- Ed25519 signature10// bundle.publicKey -- verification keyHiveCompliance API
Generate regulatory compliance reports from your evidence chains. Supports EU AI Act, HIPAA, and SOC 2 frameworks out of the box.
generateReport()
Build a compliance report for a specific regulatory framework.
1import { HiveCompliance } from '@murkworks/hive-sdk';23const compliance = new HiveCompliance({ apiKey: process.env.HIVE_API_KEY });45// EU AI Act compliance report6const euReport = await compliance.generateReport({7 framework: 'eu-ai-act',8 scope: {9 dateRange: { from: '2026-01-01', to: '2026-03-18' },10 sessionIds: ['sess_abc', 'sess_def'], // or omit for all11 },12 includeEvidence: true,13 riskClassification: 'high', // 'minimal' | 'limited' | 'high' | 'unacceptable'14});1516console.log(euReport.status); // 'compliant' | 'non_compliant' | 'review_needed'17console.log(euReport.findings); // detailed finding objects18console.log(euReport.pdfUrl); // downloadable reportHIPAA
Generate HIPAA compliance reports with PHI detection and access logging.
1const hipaaReport = await compliance.generateReport({2 framework: 'hipaa',3 scope: {4 dateRange: { from: '2026-01-01', to: '2026-03-18' },5 },6 includeEvidence: true,7 checkPhiExposure: true, // scan for PHI in evidence payloads8 accessLogAudit: true, // verify access controls9});1011console.log(hipaaReport.phiDetections); // any PHI found12console.log(hipaaReport.accessViolations); // unauthorized access attemptsAuthentication
All SDK calls require a valid API key. Keys are scoped to control access to specific modules and operations.
1import { HiveCouncil, HiveEvidence, HiveCompliance } from '@murkworks/hive-sdk';23// All modules accept the same apiKey4const hive = new HiveCouncil({ apiKey: process.env.HIVE_API_KEY });5const evidence = new HiveEvidence({ apiKey: process.env.HIVE_API_KEY });6const compliance = new HiveCompliance({ apiKey: process.env.HIVE_API_KEY });API Key Scopes
Keys can be scoped to limit access. Create scoped keys in your dashboard.
| Scope | Access |
|---|---|
| council:read | Read deliberation results |
| council:write | Create and run deliberation sessions |
| evidence:read | Read and verify evidence chains |
| evidence:write | Log new evidence entries |
| compliance:read | Generate and download compliance reports |
| * | Full access (all modules, all operations) |
Rate Limits by Tier
Rate limits are applied per API key. Upgrade your tier for higher throughput.
| Tier | Requests | Sessions | Models | Evidence Storage | Price |
|---|---|---|---|---|---|
| Cadet | 100/min | 500/day | 2 | 1 GB | Free |
| Operator | 1,000/min | 10,000/day | 4 | 25 GB | $49/mo |
| Command | 10,000/min | Unlimited | 4 | 500 GB | $299/mo |
Rate limit headers are included in every response: X-RateLimit-Remaining, X-RateLimit-Reset