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 pip install muninndb
# or: pip install muninn-python
# With LangChain: pip install muninndb[langchain] 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() { ... } from muninn import MuninnClient
async with MuninnClient("http://localhost:8475", token="api-key") as client:
# Store
eng_id = await client.write(
vault="default", concept="...", content="...", tags=[])
# Activate (cognitive retrieval)
results = await client.activate(
vault="default", context=["user question context"])
# Get by ID
engram = await client.read(vault="default", engram_id=eng_id)
# Subscribe to push events
async for push in client.subscribe(vault="default"):
print(push.engram_id) 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) from muninn import MuninnClient
# MuninnClient(base_url, *, token=None)
async with MuninnClient("http://localhost:8475", token="api-key") as client:
# Health check
await client.health()
# Stats
stats = await client.stat(vault="default")