@betterdb/agent-memory 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +2 -0
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -73,6 +73,8 @@ await memory.ensureIndex();
73
73
 
74
74
  Recall ranks by `compositeScore` — a weighted blend of similarity, recency (true half-life decay), and importance. Defaults are tunable via `MemoryStoreOptions` (`weights`, `halfLifeSeconds`, `defaultThreshold`) or live via config refresh. Set `maxItemsPerScope` to cap memories per scope; over-capacity writes evict the lowest-scoring items (importance + recency).
75
75
 
76
+ `recall` only returns candidates whose cosine **distance** is within a threshold (default `0.25`, i.e. similarity ≥ ~0.875) — tuned for real semantic embeddings, where a relevant memory lands well inside it. A weak or non-semantic `embedFn` can push every candidate past the threshold and yield no hits; raise it per call (`recall(query, { threshold })`) or globally (`defaultThreshold`) if that happens.
77
+
76
78
  ## Observability
77
79
 
78
80
  Set `telemetry: { registry }` to register Prometheus metrics (`agent_memory_*`: items, recall total/hits/empty/latency, embedding calls, evictions, consolidations) and OpenTelemetry spans for each operation. With `discovery` enabled (default in the facade), the store publishes a marker to the shared `__betterdb:caches` registry so Monitor can auto-discover it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterdb/agent-memory",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Standalone agent memory: agent-cache short-term tiers plus a semantic long-term MemoryStore over valkey-search",
5
5
  "keywords": [
6
6
  "valkey",
@@ -31,8 +31,8 @@
31
31
  "dependencies": {
32
32
  "@opentelemetry/api": "^1.9.0",
33
33
  "prom-client": "^15.1.3",
34
- "@betterdb/agent-cache": "0.7.0",
35
- "@betterdb/valkey-search-kit": "0.1.0"
34
+ "@betterdb/valkey-search-kit": "0.1.0",
35
+ "@betterdb/agent-cache": "0.7.0"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">=20.0.0"