JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 239
  • Score
    100M100P100Q80862F
  • License Apache-2.0

Developer contract for building Motebit-powered agents, services, and integrations — stable types, adapter interfaces, governance config. Re-exports @motebit/protocol.

Package Exports

  • @motebit/sdk

Readme

@motebit/sdk

The developer contract for building Motebit-powered agents, services, and integrations. Apache-2.0, zero runtime dependencies.

Why this exists

@motebit/sdk is the permissive-floor boundary between the open protocol and your application. It re-exports everything in @motebit/protocol (identity, receipts, credentials, settlement, trust algebra) and adds the product vocabulary the reference runtime consumes: state vectors, behavior cues, memory graph, rendering spec, AI provider interfaces. Binding to the SDK instead of the runtime keeps your code portable across surfaces (desktop, mobile, spatial, cloud) and across alternative runtimes.

If you only need the protocol core, depend on @motebit/protocol directly — both are Apache-2.0.

Install

npm install @motebit/sdk

Example

import type { IntelligenceProvider, ContextPack, AIResponse, MotebitState } from "@motebit/sdk";
import { TrustMode, BatteryMode } from "@motebit/sdk";

// Swap in any AI backend by implementing one interface.
class MyProvider implements IntelligenceProvider {
  async generate(ctx: ContextPack): Promise<AIResponse> {
    // Call your model + tool-use loop, then return the four required fields.
    return {
      text: "...",
      confidence: 0.8,
      memory_candidates: [],
      state_updates: { attention: 0.9 },
    };
  }
  async estimateConfidence() {
    return 0.8;
  }
  async extractMemoryCandidates(_r: AIResponse) {
    return [];
  }
}

// State vector — the motebit's self-model, bounded by species constraints.
const state: MotebitState = {
  attention: 0.7,
  processing: 0.2,
  confidence: 0.9,
  affect_valence: 0.3,
  affect_arousal: 0.15,
  social_distance: 0.4,
  curiosity: 0.6,
  trust_mode: TrustMode.Guarded,
  battery_mode: BatteryMode.Normal,
};

What's included

Everything from @motebit/protocol (re-exported), plus:

  • State vectorMotebitState, TrustMode, BatteryMode
  • BehaviorBehaviorCues, SPECIES_CONSTRAINTS
  • Memory graphMemoryNode, MemoryEdge, MemoryQuery, MemoryStorageAdapter
  • RenderingRenderSpec, GeometrySpec, MaterialSpec, LightingSpec
  • AI providerContextPack, AIResponse, IntelligenceProvider, ConversationMessage
  • GradientGradientSnapshot, GradientStoreAdapter, PrecisionWeights
  • ExportExportManifest, StorageAdapters

License

Apache-2.0 — see LICENSE.

"Motebit" is a trademark. The Apache License grants rights to this software, not to any Motebit trademarks, logos, or branding. You may not use Motebit branding in a way that suggests endorsement or affiliation without written permission.