engrm 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mcp.json +9 -0
- package/AUTH-DESIGN.md +436 -0
- package/BRIEF.md +197 -0
- package/CLAUDE.md +44 -0
- package/COMPETITIVE.md +174 -0
- package/CONTEXT-OPTIMIZATION.md +305 -0
- package/INFRASTRUCTURE.md +252 -0
- package/LICENSE +105 -0
- package/MARKET.md +230 -0
- package/PLAN.md +278 -0
- package/README.md +121 -0
- package/SENTINEL.md +293 -0
- package/SERVER-API-PLAN.md +553 -0
- package/SPEC.md +843 -0
- package/SWOT.md +148 -0
- package/SYNC-ARCHITECTURE.md +294 -0
- package/VIBE-CODER-STRATEGY.md +250 -0
- package/bun.lock +375 -0
- package/hooks/post-tool-use.ts +144 -0
- package/hooks/session-start.ts +64 -0
- package/hooks/stop.ts +131 -0
- package/mem-page.html +1305 -0
- package/package.json +30 -0
- package/src/capture/dedup.test.ts +103 -0
- package/src/capture/dedup.ts +76 -0
- package/src/capture/extractor.test.ts +245 -0
- package/src/capture/extractor.ts +330 -0
- package/src/capture/quality.test.ts +168 -0
- package/src/capture/quality.ts +104 -0
- package/src/capture/retrospective.test.ts +115 -0
- package/src/capture/retrospective.ts +121 -0
- package/src/capture/scanner.test.ts +131 -0
- package/src/capture/scanner.ts +100 -0
- package/src/capture/scrubber.test.ts +144 -0
- package/src/capture/scrubber.ts +181 -0
- package/src/cli.ts +517 -0
- package/src/config.ts +238 -0
- package/src/context/inject.test.ts +940 -0
- package/src/context/inject.ts +382 -0
- package/src/embeddings/backfill.ts +50 -0
- package/src/embeddings/embedder.test.ts +76 -0
- package/src/embeddings/embedder.ts +139 -0
- package/src/lifecycle/aging.test.ts +103 -0
- package/src/lifecycle/aging.ts +36 -0
- package/src/lifecycle/compaction.test.ts +264 -0
- package/src/lifecycle/compaction.ts +190 -0
- package/src/lifecycle/purge.test.ts +100 -0
- package/src/lifecycle/purge.ts +37 -0
- package/src/lifecycle/scheduler.test.ts +120 -0
- package/src/lifecycle/scheduler.ts +101 -0
- package/src/provisioning/browser-auth.ts +172 -0
- package/src/provisioning/provision.test.ts +198 -0
- package/src/provisioning/provision.ts +94 -0
- package/src/register.test.ts +167 -0
- package/src/register.ts +178 -0
- package/src/server.ts +436 -0
- package/src/storage/migrations.test.ts +244 -0
- package/src/storage/migrations.ts +261 -0
- package/src/storage/outbox.test.ts +229 -0
- package/src/storage/outbox.ts +131 -0
- package/src/storage/projects.test.ts +137 -0
- package/src/storage/projects.ts +184 -0
- package/src/storage/sqlite.test.ts +798 -0
- package/src/storage/sqlite.ts +934 -0
- package/src/storage/vec.test.ts +198 -0
- package/src/sync/auth.test.ts +76 -0
- package/src/sync/auth.ts +68 -0
- package/src/sync/client.ts +183 -0
- package/src/sync/engine.test.ts +94 -0
- package/src/sync/engine.ts +127 -0
- package/src/sync/pull.test.ts +279 -0
- package/src/sync/pull.ts +170 -0
- package/src/sync/push.test.ts +117 -0
- package/src/sync/push.ts +230 -0
- package/src/tools/get.ts +34 -0
- package/src/tools/pin.ts +47 -0
- package/src/tools/save.test.ts +301 -0
- package/src/tools/save.ts +231 -0
- package/src/tools/search.test.ts +69 -0
- package/src/tools/search.ts +181 -0
- package/src/tools/timeline.ts +64 -0
- package/tsconfig.json +22 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# Infrastructure & Scaling — Engrm
|
|
2
|
+
|
|
3
|
+
## Zero-Cost Start
|
|
4
|
+
|
|
5
|
+
Day one, Engrm runs on your **existing Candengo Vector server**. The memory namespace is just additional data in the same Qdrant instance. No new infrastructure needed.
|
|
6
|
+
|
|
7
|
+
| Stage | Users | Extra Cost | What Changes |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| Day 1 | You + team (2-5) | **$0** | Memory namespace added to existing Candengo Vector |
|
|
10
|
+
| Launch | 100-500 | **$0** | Same server, barely noticeable load |
|
|
11
|
+
| Traction | 500-5K | **$0-30** | Maybe bump RAM on existing server |
|
|
12
|
+
| Growth | 5K-30K | **~$200** | Dedicated GEX44 or equivalent |
|
|
13
|
+
| Scale | 30K-100K | **~$416** | Split GPU + Qdrant servers |
|
|
14
|
+
| Big | 100K-300K | **~$650-975** | Sharded Qdrant |
|
|
15
|
+
|
|
16
|
+
You don't spend real money until you have a problem worth having.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Account-Based Routing
|
|
21
|
+
|
|
22
|
+
### The Pattern
|
|
23
|
+
|
|
24
|
+
Every user account is assigned to a backend server. The plugin talks to one endpoint forever. A simple lookup routes to the right backend.
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
Plugin → mem.candengo.com → Router (api_key lookup) → Backend server
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
That's it. A dictionary lookup. No Kubernetes, no auto-scaling groups, no service mesh.
|
|
31
|
+
|
|
32
|
+
### Schema
|
|
33
|
+
|
|
34
|
+
```sql
|
|
35
|
+
-- Accounts
|
|
36
|
+
CREATE TABLE mem_accounts (
|
|
37
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
38
|
+
user_id TEXT UNIQUE NOT NULL,
|
|
39
|
+
api_key TEXT UNIQUE NOT NULL, -- cvk_...
|
|
40
|
+
email TEXT,
|
|
41
|
+
backend_id TEXT NOT NULL, -- "eu-1"
|
|
42
|
+
namespace TEXT NOT NULL, -- their memory namespace
|
|
43
|
+
site_id TEXT NOT NULL, -- their tenant
|
|
44
|
+
tier TEXT DEFAULT 'free', -- free | solo | pro | team
|
|
45
|
+
status TEXT DEFAULT 'active', -- active | migrating | suspended
|
|
46
|
+
created_at TIMESTAMPTZ DEFAULT now()
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
-- Backends
|
|
50
|
+
CREATE TABLE mem_backends (
|
|
51
|
+
backend_id TEXT PRIMARY KEY, -- "eu-1"
|
|
52
|
+
url TEXT NOT NULL, -- "https://vec-eu-1.candengo.com"
|
|
53
|
+
region TEXT DEFAULT 'eu',
|
|
54
|
+
capacity_pct FLOAT DEFAULT 0, -- auto-updated from /metrics
|
|
55
|
+
max_users INTEGER DEFAULT 30000,
|
|
56
|
+
status TEXT DEFAULT 'active', -- active | draining | full
|
|
57
|
+
created_at TIMESTAMPTZ DEFAULT now()
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
CREATE INDEX idx_accounts_api_key ON mem_accounts(api_key);
|
|
61
|
+
CREATE INDEX idx_accounts_backend ON mem_accounts(backend_id);
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Plugin Config Flow
|
|
65
|
+
|
|
66
|
+
From the user's perspective, setup starts at `www.engrm.dev`:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
1. Developer visits www.engrm.dev
|
|
70
|
+
2. Signs up (email + password, or GitHub OAuth)
|
|
71
|
+
3. Backend creates account, namespace, provisioning token
|
|
72
|
+
4. Page shows personalised install command:
|
|
73
|
+
npx engrm init --token=cmt_abc123...
|
|
74
|
+
5. Developer runs command in terminal
|
|
75
|
+
6. Plugin calls POST /v1/mem/provision with token
|
|
76
|
+
7. API returns:
|
|
77
|
+
{
|
|
78
|
+
"endpoint": "https://mem.candengo.com", ← always the same
|
|
79
|
+
"api_key": "cvk_...",
|
|
80
|
+
"site_id": "...",
|
|
81
|
+
"namespace": "dev-memory-david"
|
|
82
|
+
}
|
|
83
|
+
8. Plugin writes settings.json, registers MCP + hooks in Claude Code
|
|
84
|
+
9. Ready — next Claude Code session has memory
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The provisioning token is short-lived (1 hour) and single-use — the permanent API key never appears in the browser or clipboard. The plugin never knows which backend it's on. The endpoint never changes.
|
|
88
|
+
|
|
89
|
+
For teams: admin creates team at `www.engrm.dev/team`, shares invite URL. Team members sign up via the invite, their account is pre-configured for the shared team namespace.
|
|
90
|
+
|
|
91
|
+
### Router
|
|
92
|
+
|
|
93
|
+
The router is a thin proxy. On each request:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
1. Extract api_key from header
|
|
97
|
+
2. Lookup in mem_accounts → get backend_id
|
|
98
|
+
3. Lookup in mem_backends → get url
|
|
99
|
+
4. Proxy request to url
|
|
100
|
+
5. Return response
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Cache the api_key → url mapping in Redis or in-memory (TTL 5 minutes). The lookup adds <1ms latency.
|
|
104
|
+
|
|
105
|
+
**Day 1 implementation**: No router needed. Plugin talks directly to your existing Candengo Vector. Add the router when you need a second backend.
|
|
106
|
+
|
|
107
|
+
**Day 1+ implementation**: Traefik with header-based routing rules. One afternoon of work.
|
|
108
|
+
|
|
109
|
+
**Later**: Replace with account-aware FastAPI proxy when you need per-user routing and migration support.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Adding a New Server
|
|
114
|
+
|
|
115
|
+
Zero downtime. No user impact.
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
Step 1: Spin up new Candengo Vector instance
|
|
119
|
+
→ docker-compose up on new server
|
|
120
|
+
→ Configure BGE-M3, Qdrant, API
|
|
121
|
+
|
|
122
|
+
Step 2: Register in backends table
|
|
123
|
+
INSERT INTO mem_backends (backend_id, url, region, status)
|
|
124
|
+
VALUES ('eu-2', 'https://vec-eu-2.candengo.com', 'eu', 'active');
|
|
125
|
+
|
|
126
|
+
Step 3: New signups automatically route to eu-2 (lowest capacity)
|
|
127
|
+
Existing users stay on eu-1 (no migration)
|
|
128
|
+
|
|
129
|
+
Step 4: Done. 10 minutes of work.
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### User Migration (rebalancing)
|
|
133
|
+
|
|
134
|
+
If a server gets too hot or you're decommissioning hardware:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
Step 1: Mark user as migrating
|
|
138
|
+
UPDATE mem_accounts SET status = 'migrating' WHERE user_id = 'X';
|
|
139
|
+
|
|
140
|
+
Step 2: Background job exports from old backend
|
|
141
|
+
GET /v1/documents?namespace=user-namespace → all their data
|
|
142
|
+
|
|
143
|
+
Step 3: Bulk ingest to new backend
|
|
144
|
+
POST /v1/ingest/batch on new server
|
|
145
|
+
|
|
146
|
+
Step 4: Flip the pointer
|
|
147
|
+
UPDATE mem_accounts SET backend_id = 'eu-2', status = 'active'
|
|
148
|
+
WHERE user_id = 'X';
|
|
149
|
+
|
|
150
|
+
Step 5: Next request routes to new server automatically
|
|
151
|
+
|
|
152
|
+
Step 6: Clean up old data at leisure
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The user's plugin never reconfigures. Same API key. Same endpoint. They don't even know it happened.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Capacity Planning
|
|
160
|
+
|
|
161
|
+
### Per-User Resource Profile
|
|
162
|
+
|
|
163
|
+
| Metric | Value |
|
|
164
|
+
|---|---|
|
|
165
|
+
| Observations per active user/week | ~75 |
|
|
166
|
+
| Vectors generated per active user/month | ~325 |
|
|
167
|
+
| Storage per vector (quantised + metadata) | ~2.1 KB RAM + 4.8 KB disk |
|
|
168
|
+
| RAM per active user (month 6 steady state) | ~3.5 MB |
|
|
169
|
+
| Monthly active rate | ~30% of total users |
|
|
170
|
+
|
|
171
|
+
### Server Capacity
|
|
172
|
+
|
|
173
|
+
Using Hetzner GEX44 (EUR 184/month, 64GB RAM, RTX 4000 Ada, 2x 1.92TB NVMe):
|
|
174
|
+
|
|
175
|
+
| Metric | Capacity |
|
|
176
|
+
|---|---|
|
|
177
|
+
| Usable RAM for Qdrant (with quantisation) | ~50 GB |
|
|
178
|
+
| Max vectors in RAM | ~25M |
|
|
179
|
+
| Max users (at month 6 steady state) | ~30K |
|
|
180
|
+
| Peak QPS supported | ~50 |
|
|
181
|
+
| Embedding throughput | ~150-250/sec |
|
|
182
|
+
| GPU utilisation at 30K users | ~15% |
|
|
183
|
+
|
|
184
|
+
### Scaling Triggers
|
|
185
|
+
|
|
186
|
+
| Trigger | Threshold | Action |
|
|
187
|
+
|---|---|---|
|
|
188
|
+
| RAM usage > 70% | ~35 GB used | Start routing new users to next server |
|
|
189
|
+
| RAM usage > 85% | ~43 GB used | Mark current server as "full" |
|
|
190
|
+
| QPS sustained > 30 | Unlikely before 100K users | Add read replica |
|
|
191
|
+
| Embedding queue depth > 100 | Very unlikely | Second GPU server |
|
|
192
|
+
|
|
193
|
+
### Cost at Scale
|
|
194
|
+
|
|
195
|
+
| Users | Servers | Monthly Cost | Cost/user/month |
|
|
196
|
+
|---|---|---|---|
|
|
197
|
+
| 1-5K | Existing infra | **$0** | $0 |
|
|
198
|
+
| 5-30K | 1x GEX44 | **$200** | $0.007-0.04 |
|
|
199
|
+
| 30-100K | GEX44 + AX162 | **$416** | $0.004-0.014 |
|
|
200
|
+
| 100-300K | GEX44 + 2x AX162 | **$650-975** | $0.002-0.01 |
|
|
201
|
+
| 300K-1M | GEX44 + Qdrant cluster | **$2,200-4,300** | $0.002-0.014 |
|
|
202
|
+
|
|
203
|
+
### Hetzner vs AWS Comparison
|
|
204
|
+
|
|
205
|
+
| Users | Hetzner | AWS | Multiplier |
|
|
206
|
+
|---|---|---|---|
|
|
207
|
+
| 30K | ~$200/mo | ~$1,267/mo | AWS is **6.3x** more |
|
|
208
|
+
| 100K | ~$416/mo | ~$2,800/mo | AWS is **6.7x** more |
|
|
209
|
+
| 300K | ~$975/mo | ~$5,500/mo | AWS is **5.6x** more |
|
|
210
|
+
|
|
211
|
+
Hetzner's dedicated GPU servers are dramatically cheaper than cloud GPU instances. This is a structural cost advantage.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Architecture Diagram
|
|
216
|
+
|
|
217
|
+
### Day 1 (you + early users)
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
Plugin ──→ existing Candengo Vector server
|
|
221
|
+
(memory is just another namespace)
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Growth (500-30K users)
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
Plugin ──→ mem.candengo.com ──→ GEX44 (single server)
|
|
228
|
+
(DNS points directly, Qdrant + BGE-M3 + API
|
|
229
|
+
no router needed) all on one box
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Scale (30K+ users)
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
┌─→ vec-eu-1 (GEX44 - GPU + API)
|
|
236
|
+
Plugin ──→ mem.candengo.com ──→ Router
|
|
237
|
+
(Traefik or FastAPI) └─→ vec-eu-2 (AX162 - Qdrant only)
|
|
238
|
+
api_key → backend lookup
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Big (100K+ users)
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
┌─→ vec-eu-1 (GPU + API)
|
|
245
|
+
Plugin ──→ mem.candengo.com ──→ Router ──→ vec-eu-2 (Qdrant shard A)
|
|
246
|
+
(FastAPI proxy + └─→ vec-eu-3 (Qdrant shard B)
|
|
247
|
+
Redis cache)
|
|
248
|
+
New users → lowest capacity shard
|
|
249
|
+
Existing users → assigned shard
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Each step is additive. No rearchitecting. No downtime. No user-facing changes.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-ALv2
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 Unimpossible Consultants Ltd
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/MARKET.md
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# Market Research — Engrm
|
|
2
|
+
|
|
3
|
+
## Competitive Pricing Landscape
|
|
4
|
+
|
|
5
|
+
### Direct Competitors (AI Agent Memory)
|
|
6
|
+
|
|
7
|
+
| Product | Free Tier | Entry Paid | Mid Tier | Enterprise | Model |
|
|
8
|
+
|---|---|---|---|---|---|
|
|
9
|
+
| **Mem0** | 10K memories, 1K calls/mo | $19/mo (50K memories) | $249/mo (unlimited + graph) | Custom | Monthly sub + limits |
|
|
10
|
+
| **Zep** | 1K credits/mo | $25/mo (20K credits) | $475/mo (300K credits) | Custom + BYOC | Credits (per-episode) |
|
|
11
|
+
| **Letta (MemGPT)** | Free (beta) | TBD | TBD | TBD | Not yet launched |
|
|
12
|
+
| **MemMachine** | Open source | Enterprise TBD | TBD | TBD | Self-hosted |
|
|
13
|
+
| **MemoClaw** | 1K free calls | Pay-per-call ($0.001) | — | — | Crypto micro-payments |
|
|
14
|
+
| **LangMem** | Open source | $0 (self-host) | $39/seat (LangSmith) | Custom | Platform bundled |
|
|
15
|
+
|
|
16
|
+
### Vector DB Infrastructure (Potential Backends)
|
|
17
|
+
|
|
18
|
+
| Product | Free Tier | Entry Paid | Enterprise | Funding |
|
|
19
|
+
|---|---|---|---|---|
|
|
20
|
+
| **Pinecone** | 2GB storage | $50/mo min | $500/mo min | $238M raised |
|
|
21
|
+
| **Weaviate** | 14-day trial | ~$45/mo | ~$10K/yr | $67.7M raised |
|
|
22
|
+
| **Qdrant** | 1GB cluster | Usage-based | Custom SLA | $28M raised |
|
|
23
|
+
| **Chroma** | $5 credits | $250/mo (Team) | Custom | $18M raised |
|
|
24
|
+
|
|
25
|
+
### Claude Code Memory Plugins (All Free/Open Source)
|
|
26
|
+
|
|
27
|
+
| Plugin | Approach | Users |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| **claude-mem** | Auto-capture + ChromaDB + session summaries | Most popular |
|
|
30
|
+
| **MemCP** | MCP server, 20x token reduction claims | Growing |
|
|
31
|
+
| **Memory Anchor** | 5-layer cognitive memory model | Niche |
|
|
32
|
+
| **memory-mcp** | Persistent memory + git snapshots | Small |
|
|
33
|
+
| **mcp-memory-service** | REST API + knowledge graph + consolidation | Small |
|
|
34
|
+
|
|
35
|
+
**Key insight**: Every Claude Code memory plugin is free. No one is charging yet. The value capture is happening at the platform layer (Mem0 $249/mo, Zep $475/mo), not the plugin layer.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Competitor Deep Dive
|
|
40
|
+
|
|
41
|
+
### Mem0 — The Market Leader
|
|
42
|
+
- **Funding**: $24M total ($3.9M seed + $20M Series A, Oct 2025)
|
|
43
|
+
- **Investors**: Basis Set Ventures, Peak XV, YC, GitHub Fund
|
|
44
|
+
- **Angels**: Dharmesh Shah (HubSpot), Thomas Dohmke (ex-GitHub CEO), Paul Copplestone (Supabase)
|
|
45
|
+
- **Metrics**: 80K+ developers, 41K GitHub stars, 13M+ PyPI downloads
|
|
46
|
+
- **API calls**: 35M (Q1 2025) → 186M (Q3 2025) — 5x growth in 6 months
|
|
47
|
+
- **Partnerships**: AWS chose Mem0 as exclusive memory provider for Agent SDK
|
|
48
|
+
- **Weakness**: SaaS-only (no self-hosted), $19→$249 pricing gap, no workpacks
|
|
49
|
+
|
|
50
|
+
### Zep — Enterprise Focused
|
|
51
|
+
- **Funding**: $2.3M total, YC W24
|
|
52
|
+
- **Revenue**: Reported $1M in 2024 with 5-person team
|
|
53
|
+
- **Differentiator**: Temporal knowledge graph (Graphiti) — models entities/relationships over time
|
|
54
|
+
- **Offering**: SOC 2 Type II, HIPAA BAA, BYOC/BYOK/BYOM options
|
|
55
|
+
- **Weakness**: Complex credit system, high mid-tier pricing ($475/mo)
|
|
56
|
+
|
|
57
|
+
### Letta (formerly MemGPT) — The Academic Challenger
|
|
58
|
+
- **Funding**: $10M seed from Felicis Ventures
|
|
59
|
+
- **Angels**: Jeff Dean (Google), Clem Delangue (Hugging Face)
|
|
60
|
+
- **Approach**: Memory as first-class agent state, not just a storage layer
|
|
61
|
+
- **Recent**: Launched "Letta Code" — a memory-first coding agent (direct competitor territory)
|
|
62
|
+
- **Weakness**: Early stage, no pricing, still in beta
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Market Size
|
|
67
|
+
|
|
68
|
+
### AI Coding Agent Users (Feb 2026)
|
|
69
|
+
|
|
70
|
+
| Tool | Estimated Users | Paid Users |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| GitHub Copilot | ~20M cumulative | ~4.7M paid |
|
|
73
|
+
| Cursor | ~2M | ~1M paid |
|
|
74
|
+
| Claude Code | ~2-5M (est. from revenue) | Bundled with plans |
|
|
75
|
+
| Cline | ~5M installs | Free (BYOK) |
|
|
76
|
+
| OpenClaw | 100K+ GitHub stars | N/A (self-hosted) |
|
|
77
|
+
| Windsurf | ~500K-1M (est.) | Unknown |
|
|
78
|
+
| **Total (deduplicated)** | **~15-25M unique developers** | **~6-7M paying** |
|
|
79
|
+
|
|
80
|
+
Note: 85% of developers regularly used AI tools for coding by end of 2025. Gartner predicts 75% of enterprise software engineers will use AI code assistants by 2028.
|
|
81
|
+
|
|
82
|
+
### Total Addressable Market
|
|
83
|
+
|
|
84
|
+
| Scope | Value (2025) | Projected (2030) | CAGR |
|
|
85
|
+
|---|---|---|---|
|
|
86
|
+
| AI coding assistants (narrow) | $3.9B | — | — |
|
|
87
|
+
| AI code tools (mid) | $7.37B | $23.97B | 26.6% |
|
|
88
|
+
| AI developer tools (broad) | $29.47B | — | — |
|
|
89
|
+
|
|
90
|
+
### AI Memory Infrastructure Funding (2024-2025)
|
|
91
|
+
|
|
92
|
+
| Company | Raised | Valuation |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| Mem0 | $24M | Undisclosed |
|
|
95
|
+
| Letta | $10M | Undisclosed |
|
|
96
|
+
| Memories.ai | $8M | Undisclosed |
|
|
97
|
+
| Zep | $2.3M | Undisclosed |
|
|
98
|
+
| **Total** | **~$44M+** | — |
|
|
99
|
+
|
|
100
|
+
This validates that investors see AI memory as a distinct, fundable category.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Pricing Strategy Recommendation
|
|
105
|
+
|
|
106
|
+
### Developer Tool Pricing Context
|
|
107
|
+
|
|
108
|
+
- Typical developer spend on productivity tools: **$15-30/month**
|
|
109
|
+
- Sweet spot for individual tools: **$10-20/month**
|
|
110
|
+
- GitHub Copilot: $10/mo, Cursor: $20/mo, Windsurf: $15/mo
|
|
111
|
+
|
|
112
|
+
### Free-to-Paid Conversion Benchmarks
|
|
113
|
+
|
|
114
|
+
| Model | Conversion Rate |
|
|
115
|
+
|---|---|
|
|
116
|
+
| Freemium (self-serve) | 3-5% typical |
|
|
117
|
+
| Freemium (sales-assisted) | 5-7% average |
|
|
118
|
+
| Free trial (opt-in) | 18.2% median |
|
|
119
|
+
| Dev tools trial-to-paid | 15-28% |
|
|
120
|
+
| Open-source SaaS (mass market) | 0.3-1% |
|
|
121
|
+
|
|
122
|
+
### Proposed Engrm Pricing
|
|
123
|
+
|
|
124
|
+
| Tier | Price | Includes | Target |
|
|
125
|
+
|---|---|---|---|
|
|
126
|
+
| **Free** | $0 | Cloud sync, 10K observations, 2 devices, 1 user | Individual devs getting started |
|
|
127
|
+
| **Solo** | $9/mo | 50K observations, unlimited devices, priority sync | Power users, multi-machine devs |
|
|
128
|
+
| **Pro** | $19/mo | Unlimited observations, unlimited devices, advanced search | Heavy users |
|
|
129
|
+
| **Team** | $12/seat/mo (min 3) | Shared team memory, team analytics, admin controls | Dev teams (2-20) |
|
|
130
|
+
| **Enterprise** | Custom | Self-hosted + support SLA, SSO, audit, compliance | Large orgs |
|
|
131
|
+
|
|
132
|
+
**Rationale**:
|
|
133
|
+
- **Free tier includes cloud sync** — this is the key differentiator vs every other free plugin. 10K observations (~2-3 months of active use) is enough to get hooked, 2 devices covers the core laptop+desktop use case
|
|
134
|
+
- **$9/mo Solo** undercuts Mem0's $19 entry and sits below Cursor's $20/mo — feels like a reasonable add-on, not a major commitment
|
|
135
|
+
- **$19/mo Pro** matches Mem0's entry but gives unlimited (Mem0 caps at 50K memories for $19)
|
|
136
|
+
- **$12/seat Team** is below Windsurf's $30/seat team pricing — easy budget approval
|
|
137
|
+
- **Self-hosted is always free** — run your own Candengo Vector, no limits. Paid tiers are for the convenience of hosted infrastructure
|
|
138
|
+
|
|
139
|
+
### Licensing Strategy
|
|
140
|
+
|
|
141
|
+
**FSL-1.1-ALv2 (Functional Source License)** for the core client. Part of the [Fair Source](https://fair.io) movement (Sentry, Codecov, GitButler, Keygen). Source-available, free to use, but prevents competitors from offering a competing hosted service. Each version converts to Apache 2.0 after 2 years. Sentinel (real-time AI audit) is proprietary, in a separate private repo. This split model (open core + proprietary premium) follows the GitLab CE/EE pattern.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Influencer & Distribution Analysis
|
|
146
|
+
|
|
147
|
+
### Developer YouTube Landscape
|
|
148
|
+
|
|
149
|
+
| Creator | Subscribers | Avg Views | Reach Profile |
|
|
150
|
+
|---|---|---|---|
|
|
151
|
+
| **NetworkChuck** | ~5.1M | High | Broad tech, IT, networking |
|
|
152
|
+
| **Fireship** | ~4.1M | 500K-2M | Developer-focused, fast-paced |
|
|
153
|
+
| **ThePrimeagen** | ~527K | Varies | Performance, dev culture |
|
|
154
|
+
| **Theo (t3.gg)** | ~472K | ~100K avg | Full-stack TypeScript |
|
|
155
|
+
| **Greg Isenberg** | ~451K | Varies | AI business, startups |
|
|
156
|
+
| **Alex Finn** | ~11K | Low thousands | AI tools for creators |
|
|
157
|
+
|
|
158
|
+
### Conversion Estimates
|
|
159
|
+
|
|
160
|
+
YouTube mention → signups funnel:
|
|
161
|
+
```
|
|
162
|
+
Video views → Landing page visits (1-5% CTR) → Signups (5-10% of visitors)
|
|
163
|
+
Net: ~0.05-0.5% of video viewers sign up
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
| Scenario | Views | Est. Signups | At 4% conversion to paid | MRR impact |
|
|
167
|
+
|---|---|---|---|---|
|
|
168
|
+
| Alex Finn mention | ~5K | 25-50 | 1-2 paid | ~$19 |
|
|
169
|
+
| Theo / ThePrimeagen | ~100K | 500-1,000 | 20-40 paid | ~$380-760 |
|
|
170
|
+
| Fireship "100 seconds of..." | ~1M | 5,000-10,000 | 200-400 paid | ~$3,800-7,600 |
|
|
171
|
+
| NetworkChuck tutorial | ~2M | 10,000-20,000 | 400-800 paid | ~$7,600-15,200 |
|
|
172
|
+
|
|
173
|
+
### Realistic Launch Projections
|
|
174
|
+
|
|
175
|
+
**Conservative (organic + 1-2 mid-tier YouTubers)**:
|
|
176
|
+
|
|
177
|
+
| Timeframe | Free Users | Paid Users | MRR | ARR |
|
|
178
|
+
|---|---|---|---|---|
|
|
179
|
+
| Month 1 | 500 | 15 | $200 | $2.4K |
|
|
180
|
+
| Month 3 | 3,000 | 120 | $1,600 | $19.2K |
|
|
181
|
+
| Month 6 | 10,000 | 400 | $5,200 | $62.4K |
|
|
182
|
+
| Month 12 | 30,000 | 1,200 | $15,600 | $187.2K |
|
|
183
|
+
|
|
184
|
+
**Optimistic (Fireship or similar tier-1 coverage + strong product)**:
|
|
185
|
+
|
|
186
|
+
| Timeframe | Free Users | Paid Users | MRR | ARR |
|
|
187
|
+
|---|---|---|---|---|
|
|
188
|
+
| Month 1 | 5,000 | 150 | $2,000 | $24K |
|
|
189
|
+
| Month 3 | 20,000 | 800 | $10,400 | $124.8K |
|
|
190
|
+
| Month 6 | 50,000 | 2,000 | $26,000 | $312K |
|
|
191
|
+
| Month 12 | 100,000 | 5,000 | $65,000 | $780K |
|
|
192
|
+
|
|
193
|
+
**Viral scenario (multiple tier-1 creators + HackerNews front page)**:
|
|
194
|
+
|
|
195
|
+
| Timeframe | Free Users | Paid Users | MRR | ARR |
|
|
196
|
+
|---|---|---|---|---|
|
|
197
|
+
| Month 3 | 50,000 | 2,000 | $26,000 | $312K |
|
|
198
|
+
| Month 6 | 150,000 | 6,000 | $78,000 | $936K |
|
|
199
|
+
| Month 12 | 300,000 | 15,000 | $195,000 | $2.34M |
|
|
200
|
+
|
|
201
|
+
### Key Growth Levers
|
|
202
|
+
|
|
203
|
+
1. **Open-source GitHub repo** — stars drive organic discovery (see: OpenClaw 0→100K stars)
|
|
204
|
+
2. **Claude Code marketplace** — built-in distribution to Claude Code's ~2-5M user base
|
|
205
|
+
3. **OpenClaw skill directory** — access to 100K+ engaged community
|
|
206
|
+
4. **HackerNews / Reddit launches** — dev tool launches regularly hit front page
|
|
207
|
+
5. **Content marketing** — comparison posts (vs Mem0), tutorials, integration guides
|
|
208
|
+
6. **Word of mouth from teams** — each team member who uses it tells others
|
|
209
|
+
7. **Workpack partnerships** — co-branded content with framework communities
|
|
210
|
+
|
|
211
|
+
### Comparable Growth Trajectories
|
|
212
|
+
|
|
213
|
+
- **Mem0**: 0 → 41K GitHub stars, 80K developers, $24M funding in ~18 months
|
|
214
|
+
- **Cursor**: $1M → $1B ARR in 24 months (fastest B2B SaaS ever)
|
|
215
|
+
- **OpenClaw**: 0 → 100K GitHub stars in weeks after going viral
|
|
216
|
+
- **Supabase**: 1M → 4.5M developers in under a year (content-led growth)
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Strategic Pricing Insights
|
|
221
|
+
|
|
222
|
+
1. **Mem0's $19→$249 gap is an opportunity**: Many developers need more than the free tier but can't justify $249/mo. Our $9 Solo and $19 Pro tiers sit in that gap.
|
|
223
|
+
|
|
224
|
+
2. **Self-hosted free tier is a trust builder**: Developers are sceptical of sending code context to clouds. "Here, run it yourself for free" builds trust that converts to paid cloud convenience.
|
|
225
|
+
|
|
226
|
+
3. **Team pricing is where the real revenue is**: $12/seat × 10 developers = $120/mo per team. Enterprise teams are less price-sensitive and have procurement budgets.
|
|
227
|
+
|
|
228
|
+
4. **Workpacks are high-margin recurring revenue**: Content costs to produce once, generates revenue indefinitely. Premium workpacks at $5-10/mo add-on could be significant.
|
|
229
|
+
|
|
230
|
+
5. **The plugin layer is free; the premium layer is paid**: Core client under FSL (free to use, converts to Apache 2.0 after 2yr). Sentinel (real-time AI audit) and Candengo Vector hosting are the revenue drivers. This matches the GitLab CE/EE pattern.
|