|
| 1 | +# MemOS Helm Chart |
| 2 | + |
| 3 | +MemOS - AI Memory Operating System for LLM and Agent systems. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- Kubernetes 1.20+ |
| 8 | +- Helm 3.0+ |
| 9 | +- PV provisioner support in the underlying infrastructure |
| 10 | + |
| 11 | +## Components |
| 12 | + |
| 13 | +| Component | Description | Port | |
| 14 | +|-----------|-------------|------| |
| 15 | +| memos-api | Main API service | 8000 | |
| 16 | +| neo4j | Graph database | 7474 (HTTP), 7687 (Bolt) | |
| 17 | +| qdrant | Vector database | 6333 (HTTP), 6334 (gRPC) | |
| 18 | + |
| 19 | +## Quick Start |
| 20 | + |
| 21 | +### 1. Build Docker Image |
| 22 | + |
| 23 | +```bash |
| 24 | +# From repo root |
| 25 | +docker build -t memos:2.0.9 . |
| 26 | +``` |
| 27 | + |
| 28 | +### 2. Push to Registry |
| 29 | + |
| 30 | +```bash |
| 31 | +docker tag memos:2.0.9 your-registry/memos:2.0.9 |
| 32 | +docker push your-registry/memos:2.0.9 |
| 33 | +``` |
| 34 | + |
| 35 | +### 3. Configure Values |
| 36 | + |
| 37 | +```bash |
| 38 | +cp deploy/helm/values-example.yaml my-values.yaml |
| 39 | + |
| 40 | +# Edit my-values.yaml with your settings: |
| 41 | +# - OPENAI_API_KEY |
| 42 | +# - MEMRADER_API_KEY |
| 43 | +# - image.repository (your registry) |
| 44 | +``` |
| 45 | + |
| 46 | +### 4. Install |
| 47 | + |
| 48 | +```bash |
| 49 | +helm install memos deploy/helm -f my-values.yaml -n memos --create-namespace |
| 50 | +``` |
| 51 | + |
| 52 | +## Configuration |
| 53 | + |
| 54 | +### Required Settings |
| 55 | + |
| 56 | +```yaml |
| 57 | +memos: |
| 58 | + image: |
| 59 | + repository: your-registry/memos |
| 60 | + tag: "2.0.9" |
| 61 | + env: |
| 62 | + OPENAI_API_KEY: "sk-your-key" |
| 63 | + MEMRADER_API_KEY: "sk-your-key" |
| 64 | +``` |
| 65 | +
|
| 66 | +### Enable Ingress |
| 67 | +
|
| 68 | +```yaml |
| 69 | +ingress: |
| 70 | + enabled: true |
| 71 | + className: nginx |
| 72 | + hosts: |
| 73 | + - host: memos.yourdomain.com |
| 74 | + paths: |
| 75 | + - path: / |
| 76 | + pathType: Prefix |
| 77 | +``` |
| 78 | +
|
| 79 | +### Use External Neo4j/Qdrant |
| 80 | +
|
| 81 | +```yaml |
| 82 | +neo4j: |
| 83 | + enabled: false |
| 84 | + |
| 85 | +qdrant: |
| 86 | + enabled: false |
| 87 | + |
| 88 | +memos: |
| 89 | + env: |
| 90 | + NEO4J_URI: "bolt://external-neo4j:7687" |
| 91 | + NEO4J_USER: "neo4j" |
| 92 | + NEO4J_PASSWORD: "password" |
| 93 | + QDRANT_HOST: "external-qdrant" |
| 94 | + QDRANT_PORT: "6333" |
| 95 | +``` |
| 96 | +
|
| 97 | +## Values Reference |
| 98 | +
|
| 99 | +| Key | Default | Description | |
| 100 | +|-----|---------|-------------| |
| 101 | +| `memos.replicaCount` | `1` | API replicas | |
| 102 | +| `memos.image.repository` | `memos/memos` | Image repository | |
| 103 | +| `memos.image.tag` | `2.0.9` | Image tag | |
| 104 | +| `memos.service.type` | `ClusterIP` | Service type | |
| 105 | +| `memos.service.port` | `8000` | Service port | |
| 106 | +| `neo4j.enabled` | `true` | Enable Neo4j | |
| 107 | +| `neo4j.auth.password` | `memos123456` | Neo4j password | |
| 108 | +| `neo4j.persistence.size` | `10Gi` | Neo4j data size | |
| 109 | +| `qdrant.enabled` | `true` | Enable Qdrant | |
| 110 | +| `qdrant.persistence.size` | `10Gi` | Qdrant data size | |
| 111 | +| `ingress.enabled` | `false` | Enable Ingress | |
| 112 | + |
| 113 | +## API Endpoints |
| 114 | + |
| 115 | +```bash |
| 116 | +# Add memory |
| 117 | +curl -X POST http://memos-api:8000/product/add \ |
| 118 | + -H "Content-Type: application/json" \ |
| 119 | + -d '{ |
| 120 | + "user_id": "test-user", |
| 121 | + "mem_cube_id": "test-cube", |
| 122 | + "messages": [{"role": "user", "content": "I like strawberry"}], |
| 123 | + "async_mode": "sync" |
| 124 | + }' |
| 125 | +
|
| 126 | +# Search memory |
| 127 | +curl -X POST http://memos-api:8000/product/search \ |
| 128 | + -H "Content-Type: application/json" \ |
| 129 | + -d '{ |
| 130 | + "query": "What do I like", |
| 131 | + "user_id": "test-user", |
| 132 | + "mem_cube_id": "test-cube" |
| 133 | + }' |
| 134 | +``` |
| 135 | + |
| 136 | +## Uninstall |
| 137 | + |
| 138 | +```bash |
| 139 | +helm uninstall memos -n memos |
| 140 | +kubectl delete namespace memos |
| 141 | +``` |
| 142 | + |
| 143 | +## Troubleshooting |
| 144 | + |
| 145 | +```bash |
| 146 | +# Check logs |
| 147 | +kubectl logs -n memos -l app.kubernetes.io/component=api |
| 148 | +
|
| 149 | +# Check Neo4j |
| 150 | +kubectl exec -n memos -it deployment/memos-neo4j -- cypher-shell -u neo4j -p memos123456 |
| 151 | +
|
| 152 | +# Check Qdrant |
| 153 | +kubectl exec -n memos -it deployment/memos-qdrant -- curl localhost:6333 |
| 154 | +``` |
0 commit comments