SDK Module
HiveCouncil
The primary interface for multi-model orchestration. HiveCouncil manages the deliberation cycle across different LLM providers to reach verified consensus.
Constructor Options
| Property | Type | Description |
|---|---|---|
| apiKey | string | Your AGI-HIVE API key. |
| models | string[] | Default models for deliberation. |
| evidenceChain | boolean | Whether to enable cryptographic chaining. Defaults to true. |
| requireConsensus | boolean | If true, deliberate() throws if consensus fails. |
Method: deliberate()
Initiates a council session across multiple models.
typescript
1const result = await hive.deliberate({2 question: "Evaluate the security implications of autonomous agents using blake3 for hashing.",3 models: ['claude-3-opus', 'gpt-4-turbo'],4 requireConsensus: true,5 consensusThreshold: 0.76});Return Object
typescript
1interface CouncilResult {2 consensus: string; // The agreed-upon analysis3 confidence: number; // Consensus score (0.0 to 1.0)4 evidenceHash: string; // BLAKE3 hash of the deliberation5 modelResponses: {6 model: string;7 response: string;8 score: number;9 }[];10}Code Example
typescript
1import { HiveCouncil } from '@murkworks/hive-sdk';23const hive = new HiveCouncil({4 apiKey: process.env.HIVE_API_KEY,5 models: ['claude-3-sonnet']6});78async function runSecurityAudit() {9 try {10 const audit = await hive.deliberate({11 question: "Is the current blake3 implementation in src/lib/ RSI-compliant?",12 models: ['claude-3-opus', 'gpt-4o']13 });1415 console.log(`Audit completed with ${audit.confidence * 100}% confidence.`);16 console.log(`Evidence: ${audit.evidenceHash}`);17 } catch (error) {18 console.error("Deliberation failed:", error.message);19 }20}