Skip to content

Commit 7406278

Browse files
authored
Merge pull request #52 from dontbanmeplz/main
feat(embedding): add AWS embedding provider
2 parents 20e5678 + b698bb5 commit 7406278

File tree

14 files changed

+1863
-292
lines changed

14 files changed

+1863
-292
lines changed

.env.example

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ OM_WEAVIATE_CLASS=OpenMemory
5959
# --------------------------------------------
6060
# Embeddings Configuration
6161
# --------------------------------------------
62-
# Available providers: openai, gemini, ollama, local, synthetic
62+
# Available providers: openai, gemini, aws, ollama, local, synthetic
6363
# Embedding models per sector can be configured in models.yaml
6464
#
6565
# NOTE: Your selected TIER (fast/smart/deep) affects how embeddings work:
@@ -103,6 +103,11 @@ OPENAI_API_KEY=your-openai-api-key-here
103103
# Google Gemini Embeddings
104104
GEMINI_API_KEY=your-gemini-api-key-here
105105

106+
# AWS Titan Text Embeddings V2
107+
AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY
108+
AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY
109+
AWS_REGION=us-east-1
110+
106111
# Ollama Local Embeddings
107112
OLLAMA_URL=http://localhost:11434
108113

ARCHITECTURE.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ OpenMemory is a self-hosted AI memory engine implementing **Hierarchical Memory
3232
│ │ │ │ │ │
3333
│ • Classify │ │ • OpenAI │ │ • PDF Parser │
3434
│ • Encode │ │ • Gemini │ │ • DOCX Parser │
35-
│ • Store │ │ • Ollama │ │ • URL Scraper │
36-
│ • Query │ │ • Local/Synth │ │ • Text Chunking │
37-
│ • Decay │ │ • Batch API │ │ │
38-
│ • Reinforce │ └──────────────────┘ └──────────────────┘
39-
└───────┬───────┘
35+
│ • Store │ │ • AWS │ │ • URL Scraper │
36+
│ • Query │ │ • Ollama │ │ • Text Chunking │
37+
│ • Decay │ │ • Local/Synth │ │ │
38+
│ • Reinforce │ | • Batch API | └──────────────────┘
39+
└───────┬───────┘ └──────────────────┘
4040
4141
├────────────────┐
4242
│ │
@@ -209,6 +209,7 @@ Memory A ──0.85──> Memory B
209209
| ------------- | -------------------------------------------------- | ------------- | ---------------- |
210210
| **OpenAI** | `text-embedding-3-small`, `text-embedding-3-large` || ~$0.02/1M tokens |
211211
| **Gemini** | `embedding-001` || ~$0.01/1M tokens |
212+
| **AWS** | `amazon.titan-embed-text-v2:0` || ~$0.02/1M tokens |
212213
| **Ollama** | `nomic-embed-text`, `bge-small`, `bge-large` || Free (local) |
213214
| **Local** | Custom models || Free (local) |
214215
| **Synthetic** | Hash-based || Free |
@@ -522,7 +523,7 @@ OM_DB_PATH=./data/openmemory.sqlite
522523
OM_API_KEY= # Optional bearer token
523524

524525
# Embeddings
525-
OM_EMBEDDINGS=openai # openai|gemini|ollama|local|synthetic
526+
OM_EMBEDDINGS=openai # openai|gemini|aws|ollama|local|synthetic
526527
OM_EMBED_MODE=simple # simple|advanced
527528
OM_ADV_EMBED_PARALLEL=false # Parallel in advanced mode
528529
OM_EMBED_DELAY_MS=200 # Delay between calls
@@ -534,6 +535,10 @@ OPENAI_API_KEY=sk-...
534535
# Gemini
535536
GEMINI_API_KEY=...
536537

538+
# AWS
539+
AWS_ACCESS_KEY_ID=...
540+
AWS_SECRET_ACCESS_KEY=...
541+
AWS_REGION="us-east-1"
537542
# Ollama
538543
OLLAMA_URL=http://localhost:11434
539544

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ This approach improves recall accuracy while reducing costs.
108108
### Summary
109109

110110
OpenMemory delivers **2–3× faster contextual recall**, **6–10× lower cost**, and **full transparency** compared to hosted "memory APIs" like Zep or Supermemory.
111-
Its **multi-sector cognitive model** allows explainable recall paths, hybrid embeddings (OpenAI / Gemini / Ollama / local), and real-time decay, making it ideal for developers seeking open, private, and interpretable long-term memory for LLMs.
111+
Its **multi-sector cognitive model** allows explainable recall paths, hybrid embeddings (OpenAI / Gemini / AWS / Ollama / local), and real-time decay, making it ideal for developers seeking open, private, and interpretable long-term memory for LLMs.
112112

113113
---
114114

@@ -142,7 +142,7 @@ Requirements:
142142

143143
- Node.js 20 or higher
144144
- SQLite 3.40 or higher (included)
145-
- Optional: OpenAI/Gemini API key or Ollama
145+
- Optional: OpenAI/Gemini/AWS API key or Ollama
146146

147147
```bash
148148
git clone https://github.com/caviraoss/openmemory.git
@@ -230,7 +230,7 @@ OpenMemory uses Hierarchical Memory Decomposition (HMD):
230230

231231
- Backend: TypeScript
232232
- Storage: SQLite or PostgreSQL
233-
- Embeddings: E5/BGE/OpenAI/Gemini/Ollama
233+
- Embeddings: E5/BGE/OpenAI/Gemini/AWS/Ollama
234234
- Scheduler: node-cron for decay and maintenance
235235

236236
**Query flow:**

Why.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,17 @@ No vector DB can do this natively.
109109

110110
## 6. Developer Value Proposition
111111

112-
| Area | Why OpenMemory Wins |
113-
| ------------------ | ----------------------------------------------------- |
114-
| **Setup** | Single binary or Docker; no external service required |
115-
| **Integrations** | Works with any LLM (OpenAI, Gemini, Ollama, Claude) |
116-
| **SDKs** | TypeScript + Python included |
117-
| **Cost** | 10× cheaper than hosted alternatives |
118-
| **Explainability** | Memory formation and recall fully transparent |
119-
| **Performance** | p95 retrieval under 130ms on 100k+ nodes |
120-
| **Scalability** | Horizontally shardable by sector |
121-
| **Extensibility** | Add new embedding models with 1 config line |
122-
| **Privacy** | Zero vendor lock-in; full data control |
112+
| Area | Why OpenMemory Wins |
113+
| ------------------ | ---------------------------------------------------------|
114+
| **Setup** | Single binary or Docker; no external service required |
115+
| **Integrations** | Works with any LLM (OpenAI, Gemini, AWS, Ollama, Claude) |
116+
| **SDKs** | TypeScript + Python included |
117+
| **Cost** | 10× cheaper than hosted alternatives |
118+
| **Explainability** | Memory formation and recall fully transparent |
119+
| **Performance** | p95 retrieval under 130ms on 100k+ nodes |
120+
| **Scalability** | Horizontally shardable by sector |
121+
| **Extensibility** | Add new embedding models with 1 config line |
122+
| **Privacy** | Zero vendor lock-in; full data control |
123123

124124
---
125125

0 commit comments

Comments
 (0)