wolbarg 0.5.5 → 0.5.7
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/CHANGELOG.md +36 -0
- package/README.md +73 -292
- package/dist/cli.js +515 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.cjs +532 -116
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +145 -8
- package/dist/index.d.ts +145 -8
- package/dist/index.js +518 -119
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,42 @@ All notable changes to this project are documented here.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Postgres `compress()` atomicity:** `insertMemory` no longer joins the coalesce queue inside an ambient transaction (summary + archive now share one TX)
|
|
13
|
+
- **Postgres blob archive:** `archiveMemories` deletes from `memory_embeddings_blob` when pgvector is unavailable (no longer updates missing `memory_embeddings`)
|
|
14
|
+
- **Postgres TX context:** transaction `AsyncLocalStorage` is per-provider instance (no cross-instance leakage)
|
|
15
|
+
- **Compress race:** abort TX when fewer than 2 sources remain active after concurrent compressors
|
|
16
|
+
- **SQLite startup storm:** `open()` now retries the whole connect → WAL switch → migrate sequence on `SQLITE_BUSY` (many processes opening one file no longer fail with "database is locked"). `busy_timeout` is applied before the WAL switch
|
|
17
|
+
- **SQLite savepoint corruption / lost writes under concurrency:** top-level write transactions are serialized on the single connection with an async write mutex, and the ambient-transaction bypass is now gated on an `AsyncLocalStorage` flag instead of a shared depth counter. Fixes intermittent `no such savepoint: wolbarg_sp_N` under many concurrent same-process writers, and materially improves write throughput (e.g. 32-agent same-process inserts ~2k → ~7k ops/s)
|
|
18
|
+
- **CLI `askConfirm`:** used an undefined `defaultValue` (would throw at runtime); now honors the `defaultYes` parameter
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- Postgres deadlock/serialization retries (`40P01` / `40001`) with jitter backoff
|
|
23
|
+
- Postgres session timeouts: `statement_timeout`, `lock_timeout`, `idle_in_transaction_session_timeout`
|
|
24
|
+
- Postgres `FOR UPDATE` on `updateMemory` and ordered row locks on archive
|
|
25
|
+
- SQLite `concurrency.lockDeadlineMs` and `concurrency.multiProcess` profile
|
|
26
|
+
- SQLite ambient-TX coalesce bypass (parity with Postgres)
|
|
27
|
+
- Full-jitter SQLITE_BUSY backoff
|
|
28
|
+
- Vector-storage-only benchmark suite: `benchmark/vector-storage-bench.ts`
|
|
29
|
+
|
|
30
|
+
## [0.5.6] — 2026-07-24
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- **`wolbarg` CLI** with `wolbarg init` — interactive (or `--yes`) project setup for database + embedding provider
|
|
35
|
+
- Default SQLite path: `.wolbarg/shared-memory/memory.db`
|
|
36
|
+
- Provider presets (OpenAI, Ollama, OpenRouter, LM Studio, Gemini, Together, vLLM, custom) with **visible default base URLs** the user can edit
|
|
37
|
+
- Writes `.wolbarg/config.json` and optional `.wolbarg/.env` (API key); adds `.env` paths to `.gitignore`
|
|
38
|
+
- **`createWolbargFromProjectConfig()`** / `loadProjectConfig()` to boot the SDK from init output
|
|
39
|
+
|
|
40
|
+
### Compatibility
|
|
41
|
+
|
|
42
|
+
- Additive. Existing programmatic `wolbarg({...})` usage unchanged.
|
|
43
|
+
|
|
8
44
|
## [0.5.5] — 2026-07-21
|
|
9
45
|
|
|
10
46
|
### Added
|
package/README.md
CHANGED
|
@@ -1,323 +1,104 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./assets/wolbarg-icon.png" alt="Wolbarg" width="96" height="96" align="absmiddle" />
|
|
3
|
+
|
|
4
|
+
<picture>
|
|
5
|
+
<source media="(prefers-color-scheme: dark)" srcset="./assets/wolbarg-name-dark.png" />
|
|
6
|
+
<img src="./assets/wolbarg-name-light.png" alt="wolbarg" height="46" align="absmiddle" />
|
|
7
|
+
</picture>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<b>Modular, provider-agnostic semantic memory for AI agents.</b>
|
|
12
|
+
</p>
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://www.npmjs.com/package/wolbarg"><img alt="npm version" src="https://img.shields.io/npm/v/wolbarg.svg" /></a>
|
|
15
|
+
<a href="./LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-green.svg" /></a>
|
|
16
|
+
<a href="https://nodejs.org"><img alt="Node.js" src="https://img.shields.io/badge/node-%3E%3D22.5-brightgreen.svg" /></a>
|
|
17
|
+
<a href="https://wolbarg.com/docs/quick-start"><img alt="Docs" src="https://img.shields.io/badge/docs-wolbarg.com-black" /></a>
|
|
18
|
+
<a href="https://wolbarg.com/benchmarks"><img alt="Benchmarks" src="https://img.shields.io/badge/benchmarks-wolbarg.com-black" /></a>
|
|
19
|
+
<a href="https://github.com/wolbarg/wolbarg/actions/workflows/sdk-ci.yml"><img alt="SDK CI" src="https://github.com/wolbarg/wolbarg/actions/workflows/sdk-ci.yml/badge.svg?branch=main" /></a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
Wolbarg is **memory infrastructure**, not an agent framework. Agents call `remember()` / `recall()` against durable semantic memory on your disk or Postgres — with optional ingest, graph links, hybrid search, and [Wolbarg Studio](https://wolbarg.com/docs/observability) for observability. You bring any OpenAI-compatible embedding API.
|
|
23
|
+
|
|
24
|
+
> [!TIP]
|
|
25
|
+
> No API key needed to try it — point embeddings at local [Ollama](https://ollama.com) below. For projects, run `npx wolbarg init` and use `createWolbargFromProjectConfig()` — see the [Quick Start](https://wolbarg.com/docs/quick-start).
|
|
26
|
+
|
|
27
|
+
## Quickstart
|
|
13
28
|
|
|
14
29
|
```bash
|
|
15
30
|
npm install wolbarg
|
|
31
|
+
ollama pull nomic-embed-text
|
|
16
32
|
```
|
|
17
33
|
|
|
18
|
-
Wolbarg is **memory infrastructure**, not an agent framework. Agents call `remember()` / `recall()` (and optionally ingest, compress, subscribe, and link memories in a graph). You bring SQLite or PostgreSQL, any OpenAI-compatible embedding API, and optional peers for PDF/DOCX/OCR/Neo4j.
|
|
19
|
-
|
|
20
|
-
**Current release: [v0.5.5](./CHANGELOG.md)** — comprehensive JSDoc for IDE hover docs across the SDK and adapters. Still includes official framework adapters (`@wolbarg/openai`, `@wolbarg/langchain`, `@wolbarg/llamaindex`, `@wolbarg/mastra`, `@wolbarg/vercel-ai`), experimental `rememberFromMessages()`, 0.5 graph memory (SQLite + Neo4j), `includeGraph` recall, and [Wolbarg Studio](https://wolbarg.com/docs/observability).
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Why Wolbarg?
|
|
25
|
-
|
|
26
|
-
| Problem | What Wolbarg does |
|
|
27
|
-
| --- | --- |
|
|
28
|
-
| Agents forget between sessions | Durable semantic memory on **your** disk or Postgres |
|
|
29
|
-
| Vendor lock-in | Pluggable embeddings, LLM, rerankers, OCR, vision, storage, graph |
|
|
30
|
-
| Vectors alone are not enough | Hybrid search (semantic + BM25), metadata filters, MMR, optional rerank |
|
|
31
|
-
| Multi-agent writes collide | SQLite `BEGIN IMMEDIATE` + retries; Postgres row-level locking |
|
|
32
|
-
| Duplicate facts pile up | Opt-in write-time dedupe / upsert |
|
|
33
|
-
| Repeated embeds cost money | Transparent embedding cache (default on) |
|
|
34
|
-
| Need structure, not only similarity | Optional **graph** — `linkMemories` / `getRelated` (SQLite ↔ Neo4j) |
|
|
35
|
-
| Hard to debug memory | Telemetry + **Wolbarg Studio** (local, read-only) |
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Features
|
|
40
|
-
|
|
41
|
-
- **Storage** — SQLite (`node:sqlite` + sqlite-vec) or PostgreSQL (+ optional pgvector)
|
|
42
|
-
- **Recall** — semantic, hybrid, metadata filters, MMR, rerank, `explain: true`
|
|
43
|
-
- **Ingest** — text / markdown / PDF / DOCX / images (peers for PDF/DOCX/OCR)
|
|
44
|
-
- **Compress** — optional LLM summarization with archive lineage
|
|
45
|
-
- **`subscribe()`** — real-time change events (SQLite in-process; Postgres LISTEN/NOTIFY)
|
|
46
|
-
- **Concurrency** — multi-writer SQLite hardening (`WOLBARG_STORAGE_LOCKED`)
|
|
47
|
-
- **Embedding cache** — `hash(content) + model`
|
|
48
|
-
- **Dedupe / upsert** — opt-in exact / near / exact-or-near
|
|
49
|
-
- **Graph memory (0.5)** — `sqliteGraph` / `neo4jGraph`, `linkMemories`, `getRelated`, `includeGraph`
|
|
50
|
-
- **Conversation bridge (0.5.2, experimental)** — `rememberFromMessages()` raw or LLM extract
|
|
51
|
-
- **Framework adapter** — official [`@wolbarg/vercel-ai`](../packages/vercel-ai/) middleware (`wrapLanguageModel`)
|
|
52
|
-
- **Checkpoints / export** — file-backed SQLite snapshots (+ graph file when applicable)
|
|
53
|
-
- **Telemetry** — independent event DB; Studio dashboard, Trace Explorer, graph canvas
|
|
54
|
-
|
|
55
|
-
Docs: [Getting started](https://wolbarg.com/docs/getting-started) · [Vercel AI](https://wolbarg.com/docs/integrations/vercel-ai) · [rememberFromMessages](https://wolbarg.com/docs/api/remember-from-messages) · [Graph memory](https://wolbarg.com/docs/graph-memory) · [Studio](https://wolbarg.com/docs/observability)
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Benchmarks (v0.4.0 stress · mock embeddings)
|
|
60
|
-
|
|
61
|
-
Published dual-backend **v4-stress** suite (2026-07-18 · Node v24.13.1 · win32/arm64 · 8 CPUs). Mock embeddings isolate SDK + database cost — not LIVE provider latency.
|
|
62
|
-
|
|
63
|
-
### Headlines
|
|
64
|
-
|
|
65
|
-
| Metric | SQLite | PostgreSQL |
|
|
66
|
-
| --- | --- | --- |
|
|
67
|
-
| Cold `ready()` | **16.18 ms** | **91.39 ms** |
|
|
68
|
-
| Batch remember (200) | **5,795 ops/s** | **2,795 ops/s** |
|
|
69
|
-
| Bulk insert 2k | **7,509 ops/s** | **4,085 ops/s** |
|
|
70
|
-
| Recall p95 @ 2k | **4.83 ms** | **141.5 ms** |
|
|
71
|
-
| 16 writers throughput | **8,660 ops/s** | **3,335 ops/s** |
|
|
72
|
-
| Embedding cache speedup | **1.47×** | **1.18×** |
|
|
73
|
-
| Suite result | 25 pass / 0 fail | 21 pass / 0 fail / 4 skip\* |
|
|
74
|
-
|
|
75
|
-
\*Postgres skips SQLite-only paths (telemetry EventDatabase, file checkpoints, export/import).
|
|
76
|
-
|
|
77
|
-
### SQLite — stress & concurrency
|
|
78
|
-
|
|
79
|
-
| Case | Result |
|
|
80
|
-
| --- | --- |
|
|
81
|
-
| Bulk insert 2k + search | 7,509 insert ops/s · recall p50 **4.12 ms** · p95 **4.83 ms** |
|
|
82
|
-
| 8 writers × 20 ops | **6,084** ops/s · p95 **3.05 ms** · 0 failures |
|
|
83
|
-
| 16 writers × 20 ops | **8,660** ops/s · p95 **2.46 ms** · 0 failures |
|
|
84
|
-
| 32 writers × 20 ops | **6,798** ops/s · p95 **22.94 ms** · 0 failures |
|
|
85
|
-
| Mixed read/write storm | 0 failures |
|
|
86
|
-
|
|
87
|
-
### PostgreSQL — stress & concurrency
|
|
88
|
-
|
|
89
|
-
| Case | Result |
|
|
90
|
-
| --- | --- |
|
|
91
|
-
| Bulk insert 2k + search | 4,085 insert ops/s · recall p50 **23.29 ms** · p95 **141.5 ms** |
|
|
92
|
-
| 8 writers × 20 ops | **2,555** ops/s · p95 **8.51 ms** · 0 failures |
|
|
93
|
-
| 16 writers × 20 ops | **3,335** ops/s · p95 **9.48 ms** · 0 failures |
|
|
94
|
-
| 32 writers × 20 ops | **3,802** ops/s · p95 **14.77 ms** · 0 failures |
|
|
95
|
-
| Mixed read/write storm | 0 failures |
|
|
96
|
-
|
|
97
|
-
**Artifacts:** [SQLite JSON](https://wolbarg.com/benchmarks/version-0.4.0-sqlite-benchmark.json) · [SQLite MD](https://wolbarg.com/benchmarks/version-0.4.0-sqlite-benchmark.md) · [Postgres JSON](https://wolbarg.com/benchmarks/version-0.4.0-postgres-benchmark.json) · [Postgres MD](https://wolbarg.com/benchmarks/version-0.4.0-postgres-benchmark.md) · [Interactive page](https://wolbarg.com/benchmarks) · [Methodology](https://wolbarg.com/docs/benchmarks)
|
|
98
|
-
|
|
99
|
-
Also published: [embedding-cache](https://wolbarg.com/benchmarks/embedding-cache.json) · [multiprocess concurrency](https://wolbarg.com/benchmarks/multiprocess-concurrency.json)
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Installation
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
npm install wolbarg
|
|
107
|
-
# or: pnpm add wolbarg · yarn add wolbarg · bun add wolbarg
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
**Requires Node.js 22.5+** (built-in `node:sqlite`).
|
|
111
|
-
|
|
112
|
-
### Optional peers
|
|
113
|
-
|
|
114
|
-
Install only what you use:
|
|
115
|
-
|
|
116
|
-
| Peer | Required for |
|
|
117
|
-
| --- | --- |
|
|
118
|
-
| `pg` | PostgreSQL storage |
|
|
119
|
-
| `neo4j-driver` | `neo4jGraph(...)` |
|
|
120
|
-
| `pdf-parse@1.1.4` | PDF ingest |
|
|
121
|
-
| `mammoth` | DOCX ingest |
|
|
122
|
-
| `tesseract.js` | OCR |
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
npm install pg neo4j-driver # production storage + graph
|
|
126
|
-
npm install pdf-parse@1.1.4 mammoth # document ingest
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Peers are **not** bundled. Missing peers fail at use time for that path — not at import. Plain `.txt` / `.md` / `.csv` / `.json` and SQLite graph need no extras.
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## Quick start
|
|
134
|
-
|
|
135
34
|
```ts
|
|
136
|
-
import { wolbarg,
|
|
35
|
+
import { wolbarg, sqlite, openaiEmbedding } from "wolbarg";
|
|
137
36
|
|
|
138
37
|
const ctx = wolbarg({
|
|
139
|
-
organization: "
|
|
140
|
-
|
|
38
|
+
organization: "demo",
|
|
39
|
+
storage: sqlite("./memory.db"),
|
|
141
40
|
embedding: openaiEmbedding({
|
|
142
|
-
|
|
143
|
-
|
|
41
|
+
baseUrl: "http://localhost:11434/v1",
|
|
42
|
+
apiKey: "ollama",
|
|
43
|
+
model: "nomic-embed-text",
|
|
144
44
|
}),
|
|
145
|
-
llm: openaiLlm({
|
|
146
|
-
apiKey: process.env.OPENAI_API_KEY!,
|
|
147
|
-
model: "gpt-4.1-mini",
|
|
148
|
-
}),
|
|
149
|
-
keywordSearch: bm25(),
|
|
150
|
-
concurrency: { maxRetries: 5 },
|
|
151
|
-
embeddingCache: { enabled: true },
|
|
152
|
-
memory: { dedupe: { enabled: true, strategy: "exact-or-near" } },
|
|
153
|
-
telemetry: {
|
|
154
|
-
enabled: true,
|
|
155
|
-
database: { provider: "sqlite", url: "./telemetry.db" },
|
|
156
|
-
level: "debug",
|
|
157
|
-
},
|
|
158
45
|
});
|
|
159
46
|
|
|
160
47
|
await ctx.ready();
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
agent: "research",
|
|
48
|
+
await ctx.remember({
|
|
49
|
+
agent: "demo",
|
|
164
50
|
content: { text: "Stripe supports recurring invoices." },
|
|
165
|
-
metadata: { topic: "billing" },
|
|
166
|
-
});
|
|
167
|
-
// saved.action === "created" | "updated"
|
|
168
|
-
|
|
169
|
-
const hits = await ctx.recall({
|
|
170
|
-
query: "How do recurring invoices work?",
|
|
171
|
-
topK: 5,
|
|
172
|
-
hybrid: true,
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
ctx.subscribe({ organization: "my-org" }, (e) => {
|
|
176
|
-
console.log(e.event, e.memoryId);
|
|
177
51
|
});
|
|
178
|
-
|
|
179
|
-
|
|
52
|
+
const hits = await ctx.recall({ query: "How do recurring invoices work?" });
|
|
53
|
+
console.log(hits[0].content.text);
|
|
180
54
|
await ctx.close();
|
|
181
55
|
```
|
|
182
56
|
|
|
183
|
-
|
|
57
|
+
That's the loop: `remember()` writes it, `recall()` finds it by meaning. Swap the embedding config for OpenAI, Gemini, or anything OpenAI-compatible when you're ready for production — nothing else in your code changes.
|
|
184
58
|
|
|
185
|
-
|
|
59
|
+
Requires **Node.js 22.5+**. Optional peers (`pg`, `neo4j-driver`, PDF/DOCX/OCR) — [Installation](https://wolbarg.com/docs/installation).
|
|
186
60
|
|
|
187
|
-
|
|
188
|
-
import { wolbarg, openaiEmbedding, sqliteGraph, neo4jGraph } from "wolbarg";
|
|
61
|
+
## Wolbarg ecosystem
|
|
189
62
|
|
|
190
|
-
|
|
191
|
-
graph: sqliteGraph({ path: "./graph.db" })
|
|
63
|
+
Use the core SDK alone, or plug into the tools around it:
|
|
192
64
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
65
|
+
- **[Docs](https://wolbarg.com/docs/quick-start)** — quick start, configuration, API reference
|
|
66
|
+
- **[@wolbarg/vercel-ai](https://wolbarg.com/docs/integrations/vercel-ai)** — Vercel AI SDK middleware (`wrapLanguageModel`)
|
|
67
|
+
- **[@wolbarg/openai](https://wolbarg.com/docs/integrations/openai)** — OpenAI Agents SDK session
|
|
68
|
+
- **[@wolbarg/langchain](https://wolbarg.com/docs/integrations/langchain)** — LangChain / LangGraph memory
|
|
69
|
+
- **[@wolbarg/llamaindex](https://wolbarg.com/docs/integrations/llamaindex)** — LlamaIndexTS memory block
|
|
70
|
+
- **[@wolbarg/mastra](https://wolbarg.com/docs/integrations/mastra)** — Mastra processor
|
|
71
|
+
- **[Cursor plugin](https://wolbarg.com/docs/connectors/cursor)** — shared memory for Cursor agents
|
|
72
|
+
- **[Wolbarg Studio](https://wolbarg.com/docs/observability)** — local telemetry dashboard, Trace Explorer, graph canvas
|
|
73
|
+
- **[Benchmarks](https://wolbarg.com/benchmarks)** — published SQLite / Postgres stress results
|
|
200
74
|
|
|
201
|
-
|
|
202
|
-
const a = await ctx.remember({
|
|
203
|
-
agent: "support",
|
|
204
|
-
content: { text: "Refunds take 5 business days." },
|
|
205
|
-
});
|
|
206
|
-
const b = await ctx.remember({
|
|
207
|
-
agent: "support",
|
|
208
|
-
content: { text: "Chargebacks escalate to risk." },
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
await ctx.linkMemories(a.id, b.id, "related_to");
|
|
212
|
-
const related = await ctx.getRelated(a.id, { depth: 1 });
|
|
213
|
-
|
|
214
|
-
const withGraph = await ctx.recall({
|
|
215
|
-
query: "refunds",
|
|
216
|
-
includeGraph: true,
|
|
217
|
-
});
|
|
218
|
-
// withGraph[0].related — neighbors from the graph
|
|
219
|
-
```
|
|
75
|
+
## Why use Wolbarg?
|
|
220
76
|
|
|
221
|
-
|
|
77
|
+
Most agent stacks either bolt memory onto a chat transcript or lock you into a hosted vector database. Wolbarg sits in between: a **shared semantic memory layer** you own, with a small public API and replaceable backends.
|
|
222
78
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
embedding: openaiEmbedding({
|
|
232
|
-
apiKey: process.env.OPENAI_API_KEY!,
|
|
233
|
-
model: "text-embedding-3-small",
|
|
234
|
-
}),
|
|
235
|
-
});
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
**Required:** `organization`, `storage` or `database`, `embedding`.
|
|
239
|
-
**Optional:** `llm`, `keywordSearch`, `reranker`, `ocr`, `vision`, `chunking`, `telemetry`, `concurrency`, `embeddingCache`, `memory.dedupe`, `graph`, `checkpoint` / `checkpointDirectory`.
|
|
79
|
+
- **Agents that forget between sessions** — Durable memory on your SQLite file or Postgres. Facts survive restarts, redeploys, and new agent runs — not trapped in a single conversation window.
|
|
80
|
+
- **No vendor lock-in** — Pluggable embeddings, LLM, rerankers, OCR, vision, storage, and graph. Swap OpenAI ↔ Ollama or SQLite ↔ Postgres by changing a factory, not your agent logic.
|
|
81
|
+
- **Vectors alone are not enough** — Hybrid search (semantic + BM25), metadata filters, MMR, and optional rerank so recall matches how agents actually ask questions.
|
|
82
|
+
- **Multi-agent writes collide** — SQLite hardened with `BEGIN IMMEDIATE` + retries (`WOLBARG_STORAGE_LOCKED` when exhausted); Postgres uses row-level locking. Built for parallel writers, not single-process demos.
|
|
83
|
+
- **Duplicate facts pile up** — Opt-in write-time dedupe / upsert so restated preferences update instead of flooding the store.
|
|
84
|
+
- **Repeated embeds cost money** — Transparent embedding cache keyed by `hash(content) + model` (on by default) cuts provider calls on repeated text.
|
|
85
|
+
- **Need structure, not only similarity** — Optional [graph memory](https://wolbarg.com/docs/graph-memory): `linkMemories` / `getRelated` / `includeGraph` on recall, with the same typed API for local SQLite graph and production Neo4j.
|
|
86
|
+
- **Hard to debug memory** — Independent telemetry DB plus [Wolbarg Studio](https://wolbarg.com/docs/observability) (dashboard, Trace Explorer, graph canvas) so you can see what was remembered and how recall ranked it.
|
|
240
87
|
|
|
241
88
|
---
|
|
242
89
|
|
|
243
|
-
##
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
| `export` / `import` | Portable SQLite + manifest |
|
|
256
|
-
| `forget` / `history` / `stats` / `clear` | Lifecycle (forget/clear cascade graph when configured) |
|
|
257
|
-
| `ready` / `close` / `flushTelemetry` | Lifecycle |
|
|
258
|
-
|
|
259
|
-
Full reference: [wolbarg.com/docs/api](https://wolbarg.com/docs/api)
|
|
260
|
-
|
|
261
|
-
---
|
|
262
|
-
|
|
263
|
-
## Wolbarg Studio
|
|
264
|
-
|
|
265
|
-
Local observability dashboard — **not** bundled in the npm package. The SDK writes telemetry; Studio reads it (and can open memory / graph files for the canvas).
|
|
266
|
-
|
|
267
|
-
```bash
|
|
268
|
-
git clone https://github.com/Atharvmunde11/wolbarg-studio
|
|
269
|
-
cd wolbarg-studio
|
|
270
|
-
npm install
|
|
271
|
-
npm run dev # http://localhost:3100
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
Connect telemetry (`./telemetry.db`), optional memory DB, checkpoint directory, and graph backend. Screenshots and setup: [Observability & Studio](https://wolbarg.com/docs/observability).
|
|
275
|
-
|
|
276
|
-
---
|
|
277
|
-
|
|
278
|
-
## Documentation
|
|
279
|
-
|
|
280
|
-
| Topic | Link |
|
|
281
|
-
| --- | --- |
|
|
282
|
-
| Getting started | https://wolbarg.com/docs/getting-started |
|
|
283
|
-
| Installation & project layout | https://wolbarg.com/docs/installation |
|
|
284
|
-
| Configuration | https://wolbarg.com/docs/configuration |
|
|
285
|
-
| Graph memory | https://wolbarg.com/docs/graph-memory |
|
|
286
|
-
| Observability & Studio | https://wolbarg.com/docs/observability |
|
|
287
|
-
| Concurrency | https://wolbarg.com/docs/concurrency |
|
|
288
|
-
| Real-time events | https://wolbarg.com/docs/realtime-events |
|
|
289
|
-
| Embedding cache | https://wolbarg.com/docs/embedding-cache |
|
|
290
|
-
| Memory upsert | https://wolbarg.com/docs/memory-upsert |
|
|
291
|
-
| What's new in 0.5 | https://wolbarg.com/docs/guides/whats-new |
|
|
292
|
-
| Migration | https://wolbarg.com/docs/migration |
|
|
293
|
-
| Limitations | https://wolbarg.com/docs/guides/limitations |
|
|
294
|
-
| Changelog | [CHANGELOG.md](./CHANGELOG.md) |
|
|
295
|
-
|
|
296
|
-
---
|
|
297
|
-
|
|
298
|
-
## Limitations
|
|
299
|
-
|
|
300
|
-
- **Node 22.5+** required (`node:sqlite`).
|
|
301
|
-
- **Ingest peers** required for PDF / DOCX / OCR paths.
|
|
302
|
-
- **PDF** text-layer via `pdf-parse`; scan PDFs need OCR/vision.
|
|
303
|
-
- **Telemetry** is SQLite-only today (Postgres typed but not implemented).
|
|
304
|
-
- **SQLite `subscribe()`** is in-process only; Postgres uses LISTEN/NOTIFY.
|
|
305
|
-
- **Checkpoints / export** require file-backed SQLite memory (not `:memory:` / not Postgres).
|
|
306
|
-
- **Neo4j** checkpoint / export / import throw `GraphCheckpointNotSupportedError` (refuse, don't skip).
|
|
307
|
-
- **Cypher `query()`** is Neo4j-only; SQLite graph uses typed methods.
|
|
308
|
-
- Not an agent framework, chat UI, or hosted vector SaaS.
|
|
309
|
-
|
|
310
|
-
---
|
|
311
|
-
|
|
312
|
-
## Upgrade
|
|
313
|
-
|
|
314
|
-
```bash
|
|
315
|
-
npm install wolbarg@^0.5.0
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
0.5 is **additive**. Omitting `graph` keeps 0.4 behavior. See [Migration](https://wolbarg.com/docs/migration) and [CHANGELOG](./CHANGELOG.md).
|
|
319
|
-
|
|
320
|
-
---
|
|
90
|
+
## Resources
|
|
91
|
+
|
|
92
|
+
- [Quick start](https://wolbarg.com/docs/quick-start) — remember / recall in under a minute
|
|
93
|
+
- [Installation & project layout](https://wolbarg.com/docs/installation) — peers and recommended folder structure
|
|
94
|
+
- [Configuration](https://wolbarg.com/docs/configuration) — every constructor option
|
|
95
|
+
- [API reference](https://wolbarg.com/docs/api) — public methods and types
|
|
96
|
+
- [Graph memory](https://wolbarg.com/docs/graph-memory) — SQLite ↔ Neo4j graph layer
|
|
97
|
+
- [Examples](https://wolbarg.com/docs/examples) — copy-paste snippets
|
|
98
|
+
- [Migration](https://wolbarg.com/docs/migration) — upgrade guides
|
|
99
|
+
- [Limitations](https://wolbarg.com/docs/guides/limitations) — honest boundaries
|
|
100
|
+
- [Changelog](./CHANGELOG.md) — release history
|
|
101
|
+
- [llms.txt](https://wolbarg.com/llms.txt) — docs index for LLMs
|
|
321
102
|
|
|
322
103
|
## License
|
|
323
104
|
|