v0.1.0¶
Release Date: 2024-06-27
Initial release of OmniMemory - a vendor-neutral memory abstraction layer for Go.
Highlights¶
- Unified Provider Interface: Single API for all memory backends
- Multi-Tenancy Built-in: Strict tenant and subject isolation
- Semantic Search: Vector similarity with pluggable embedders
- Provider Fallback: Automatic failover between providers
Features¶
Core¶
- Provider interface with CRUD and semantic operations
- Multi-provider client with automatic fallback
- Provider registry with priority-based selection
- Memory types: observation, fact, preference, summary, trait, relationship
- Memory scopes: user, agent, tenant, team, session, domain
- Context-based isolation (TenantID, SubjectID, SessionID)
Providers¶
- In-Memory: Zero-config provider for testing and development
- PostgreSQL: Production-grade storage with pgvector for similarity search
- KVS: Flexible provider wrapping omnistorage-core ListableStore
- Stubs: Placeholder providers for Mem0, Graphiti, Twilio (external)
Embeddings¶
- Embedder interface for pluggable embedding generation
- OmniLLM integration for OpenAI, Anthropic, and other providers
- Support for custom embedders
Testing¶
- Conformance test suite (
core/providertest) - Interface tests
- CRUD tests
- Behavior tests (tenant/subject isolation)
- Search tests
Database¶
- Ent ORM schema for PostgreSQL
- pgvector embedding column with HNSW indexing
- Automatic migrations
Installation¶
Quick Start¶
import (
"github.com/plexusone/omnimemory"
"github.com/plexusone/omnimemory/core"
_ "github.com/plexusone/omnimemory/provider/memory"
)
client, _ := omnimemory.NewClient(core.ClientConfig{
Providers: []core.ProviderConfig{
{Name: core.ProviderNameMemory},
},
})
defer client.Close()
// Add a memory
memory, _ := client.Add(ctx, &core.AddRequest{
Context: core.Context{
TenantID: "tenant-1",
SubjectID: "user-1",
},
Type: core.MemoryTypeObservation,
Content: "User prefers dark mode",
})
// Search memories
results, _ := client.Search(ctx, &core.SearchRequest{
Context: core.Context{
TenantID: "tenant-1",
SubjectID: "user-1",
},
Query: "user preferences",
})
Package Structure¶
omnimemory/
├── omnimemory.go # Package entry point
├── core/
│ ├── provider.go # Provider interface
│ ├── types.go # Memory, Context, Request/Response
│ ├── registry.go # Provider registry
│ ├── client.go # Multi-provider client
│ ├── embedder.go # Embedder interface
│ └── providertest/ # Conformance tests
├── ent/
│ └── schema/ # Ent schema definitions
└── provider/
├── memory/ # In-memory provider
├── postgres/ # PostgreSQL provider
└── kvs/ # KVS provider
Breaking Changes¶
N/A - Initial release.
Dependencies¶
| Dependency | Version | Purpose |
|---|---|---|
entgo.io/ent |
v0.14+ | ORM for PostgreSQL |
github.com/pgvector/pgvector-go |
v0.2+ | pgvector type support |
github.com/plexusone/omnistorage-core |
v0.1+ | KVS backend |
Documentation¶
Contributors¶
- PlexusOne Team