v0.1.0¶
Release Date: 2026-06-28
Initial release of mem0-go, the Go client SDK for mem0.
Highlights¶
- Go client SDK for mem0 with support for hosted (api.mem0.ai) deployments
- OmniMemory provider implementation for vendor-neutral memory abstraction
Features¶
Memory Operations¶
Full support for mem0 memory operations:
- Add - Store memories from conversation messages
- Get - Retrieve a specific memory by ID
- GetAll - List all memories with pagination
- Search - Semantic search across memories
- Update - Modify existing memory content
- Delete - Remove individual memories
- DeleteAll - Bulk delete with filters
- History - Track memory changes over time
Multi-Tenancy¶
Organize memories by multiple scopes:
WithUserID()- User-level memoriesWithAgentID()- Agent-level memoriesWithAppID()- Application-level memoriesWithRunID()- Session/run-level memories
OmniMemory Integration¶
The omnimemory subpackage implements the core.Provider interface from OmniMemory, enabling:
- Vendor-neutral memory operations
- Automatic provider registration
- Multi-tenancy mapping (TenantID → app_id, SubjectID → user_id)
- Memory type and scope preservation via metadata
Installation¶
Quick Start¶
package main
import (
"context"
"fmt"
"log"
"github.com/plexusone/mem0-go"
)
func main() {
client, err := mem0.NewClient(mem0.WithAPIKey("your-api-key"))
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
// Add a memory
messages := []mem0.Message{
{Role: mem0.RoleUser, Content: "I prefer dark mode"},
}
result, err := client.Memory().Add(ctx, messages, mem0.WithUserID("user-123"))
if err != nil {
log.Fatal(err)
}
fmt.Printf("Added: %s\n", result.ID)
// Search memories
results, err := client.Memory().Search(ctx, "preferences",
mem0.WithFilters(mem0.Filters{UserID: "user-123"}),
)
if err != nil {
log.Fatal(err)
}
for _, r := range results {
fmt.Printf("Found: %s\n", r.Memory)
}
}
Dependencies¶
- ogen - OpenAPI code generation
- omnimemory - Memory abstraction layer (optional)
Links¶
- Documentation
- API Reference
- GitHub Repository
- mem0.ai - mem0 platform