Skip to content
Developer Ecosystem

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.

terminalbash
1npm install @murkworks/hive-sdk
index.tstypescript
1import { HiveCouncil } from '@murkworks/hive-sdk';
2
3const 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);
Try it No credit card required for Cadet tier

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.

council-deliberate.tstypescript
1import { HiveCouncil } from '@murkworks/hive-sdk';
2
3const hive = new HiveCouncil({ apiKey: process.env.HIVE_API_KEY });
4
5const 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 required
10 maxRounds: 3, // up to 3 deliberation rounds
11 temperature: 0.4,
12});
13
14// Result shape
15console.log(result.consensus); // boolean
16console.log(result.agreementPct); // number (0-100)
17console.log(result.verdict); // string — synthesized answer
18console.log(result.evidenceHash); // BLAKE3 hash
19console.log(result.responses); // per-model breakdown

configure()

Set default options for all subsequent deliberation calls on this instance.

council-configure.tstypescript
1hive.configure({
2 defaultModels: ['claude-3-opus', 'gpt-4-turbo'],
3 consensusThreshold: 0.8,
4 timeout: 30_000, // 30s per model
5 retryOnDisagree: true, // auto-retry if no consensus
6 maxRetries: 2,
7});
8
9// All subsequent calls inherit these defaults
10const 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.

evidence-log.tstypescript
1import { HiveEvidence } from '@murkworks/hive-sdk';
2
3const evidence = new HiveEvidence({ apiKey: process.env.HIVE_API_KEY });
4
5const 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});
15
16console.log(entry.hash); // BLAKE3 hash
17console.log(entry.chainIndex); // position in evidence chain
18console.log(entry.timestamp); // ISO 8601

verify()

Verify an evidence chain for integrity. Detects any tampering or gaps.

evidence-verify.tstypescript
1const verification = await evidence.verifyChain({
2 sessionId: result.sessionId,
3 fromIndex: 0,
4 toIndex: 'latest',
5});
6
7console.log(verification.valid); // boolean
8console.log(verification.entriesChecked); // number
9console.log(verification.gaps); // any missing entries

export()

Export evidence chains in standard formats for external audit systems.

evidence-export.tstypescript
1const bundle = await evidence.export({
2 sessionId: result.sessionId,
3 format: 'json', // 'json' | 'csv' | 'pdf'
4 includePayloads: true,
5 signBundle: true, // adds a signature envelope
6});
7
8// bundle.data -- formatted evidence chain
9// bundle.signature -- Ed25519 signature
10// bundle.publicKey -- verification key

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

compliance-report.tstypescript
1import { HiveCompliance } from '@murkworks/hive-sdk';
2
3const compliance = new HiveCompliance({ apiKey: process.env.HIVE_API_KEY });
4
5// EU AI Act compliance report
6const 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 all
11 },
12 includeEvidence: true,
13 riskClassification: 'high', // 'minimal' | 'limited' | 'high' | 'unacceptable'
14});
15
16console.log(euReport.status); // 'compliant' | 'non_compliant' | 'review_needed'
17console.log(euReport.findings); // detailed finding objects
18console.log(euReport.pdfUrl); // downloadable report

HIPAA

Generate HIPAA compliance reports with PHI detection and access logging.

compliance-hipaa.tstypescript
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 payloads
8 accessLogAudit: true, // verify access controls
9});
10
11console.log(hipaaReport.phiDetections); // any PHI found
12console.log(hipaaReport.accessViolations); // unauthorized access attempts

Authentication

All SDK calls require a valid API key. Keys are scoped to control access to specific modules and operations.

Get your API Key
Settings → API Keys
auth.tstypescript
1import { HiveCouncil, HiveEvidence, HiveCompliance } from '@murkworks/hive-sdk';
2
3// All modules accept the same apiKey
4const 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.

ScopeAccess
council:readRead deliberation results
council:writeCreate and run deliberation sessions
evidence:readRead and verify evidence chains
evidence:writeLog new evidence entries
compliance:readGenerate 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.

TierRequestsSessionsModelsEvidence StoragePrice
Cadet100/min500/day21 GBFree
Operator1,000/min10,000/day425 GB$49/mo
Command10,000/minUnlimited4500 GB$299/mo

Rate limit headers are included in every response: X-RateLimit-Remaining, X-RateLimit-Reset

Further Reading

Last updated: April 2026