MuninnDB

SDKs

Go SDK — stable Python SDK — coming soon TypeScript SDK — coming soon REST (any language) — stable
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.

mem := muninn.NewMemory("api-key", "muninn://localhost:8747")

// Store
e, _ := mem.Store(ctx, &muninn.StoreRequest{...})

// Activate (cognitive retrieval)
results, _ := mem.Activate(ctx, "user question context", 10)

// Get by ID
engram, _ := mem.Get(ctx, id)

// Update
mem.Update(ctx, id, &muninn.UpdateRequest{...})

// Archive
mem.Archive(ctx, id)

// Subscribe to triggers
mem.Subscribe(ctx, &muninn.TriggerRequest{...})

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.

client, err := muninn.NewClient(muninn.ClientConfig{
    Address:  "muninn://localhost:8747",
    APIKey:   "api-key",
    Vault:    "my-vault",
    PoolSize: 5,
})

// Batch store
client.BatchStore(ctx, engrams...)

// Vault stats
stats, _ := client.VaultStats(ctx)

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