MuninnDB

SDKs

Go SDK — stable Python SDK — stable TypeScript SDK — coming soon REST (any language) — stable

Install

go get github.com/scrypster/muninndb/sdk/go/muninn

Memory API (High-Level)

The Memory API is the recommended interface for most applications. It provides simple methods for the most common operations and handles connection pooling automatically.

client := muninn.NewClient("http://localhost:8475", "api-key")

// Store
engID, _ := client.Write(ctx, "default", "concept", "content", []string{"tag"})

// Activate (cognitive retrieval)
results, _ := client.Activate(ctx, "default", []string{"user question context"}, 10)

// Get by ID
engram, _ := client.Read(ctx, "default", id)

// Subscribe to push events
stream, _ := client.Subscribe(ctx, "default")
for push := range stream.C() { ... }

Client API (Low-Level)

The Client API gives direct access to every MuninnDB operation including batch operations, vault management, and advanced configuration. Use this when you need full control.

// NewClient(baseURL, token string) — REST on port 8475
client := muninn.NewClient("http://localhost:8475", "api-key")

// Custom options (timeout, retries, backoff)
client = muninn.NewClientWithOptions(
    "http://localhost:8475", "api-key",
    10*time.Second, 5, 500*time.Millisecond)

// Health check
client.Health(ctx)
← Previous Next →