Quick Start: SDK
Install
Section titled “Install”npm install @honeybee-ai/hivemind-sdkCreate a platform client
Section titled “Create a platform client”import { createPlatformClient } from '@honeybee-ai/hivemind-sdk';
const client = createPlatformClient({ profile: 'default' });The client reads auth credentials from ~/.honeyb/auth/default.json (set up via wgl auth login).
List your hives
Section titled “List your hives”const hives = await client.listHives();for (const hive of hives) { console.log(`${hive.name} — ${hive.status}`);}Create and start a hive
Section titled “Create and start a hive”// Createconst hive = await client.createHive({ name: 'my-project', protocol_name: 'code-review',});
// Configure providerawait client.setSecret({ provider: 'cerebras', key: 'csk-...', hiveId: hive.id,});
// Startawait client.startHive(hive.id);Use contracts for type safety
Section titled “Use contracts for type safety”import { HiveSchema } from '@honeybee-ai/hivemind-sdk/contracts';import type { z } from 'zod';
type Hive = z.infer<typeof HiveSchema>;
// Validate API responsesconst hive: Hive = HiveSchema.parse(apiResponse);Add telemetry
Section titled “Add telemetry”import { createTelemetryFromEnv } from '@honeybee-ai/hivemind-sdk/telemetry';
const reporter = createTelemetryFromEnv('my-project');
// Record events (fire-and-forget)reporter.record({ type: 'llm_call', model: 'claude-sonnet', promptTokens: 500, completionTokens: 200, latencyMs: 1500,});Load configuration
Section titled “Load configuration”import { loadConfig } from '@honeybee-ai/hivemind-sdk/config';
const config = loadConfig();const serverUrl = config.get('server') || 'http://localhost:3100';What’s next
Section titled “What’s next”- SDK reference — Full API, contracts, integrations
- REST API reference — Incubator endpoints
- WebSocket reference — Real-time events