You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/sync/README.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,9 +59,26 @@ The sync layer routes changes through a [SQLiteCloud](https://sqlitecloud.io/) m
59
59
60
60
1.**Create an account** at [https://sqlite.ai/](https://sqlite.ai/) and create a project.
61
61
2.**Create a database** in the [dashboard](https://dashboard.sqlitecloud.io/).
62
-
3.**Enable OffSync** for the database: open the database, click **OffSync**, and enable synchronization. This provisions the CloudSync microservice that routes changes between agents.
63
-
4.**Copy the managed database ID** — shown on the OffSync page (format: `db_xxxxxxxxxxxx`).
64
-
5.**Create API keys** — one per agent is recommended, so access can be revoked independently. API keys are created in the dashboard under **API Keys**.
62
+
3.**Create the memory table** — connect to your database and run:
63
+
```sql
64
+
CREATETABLEIF NOT EXISTS dbmem_content (
65
+
hash INTEGERPRIMARY KEYNOT NULL,
66
+
pathTEXTNOT NULL DEFAULT '' UNIQUE,
67
+
value TEXT DEFAULT NULL,
68
+
length INTEGERNOT NULL DEFAULT 0,
69
+
context TEXT DEFAULT NULL,
70
+
created_at INTEGER DEFAULT 0,
71
+
last_accessed INTEGER DEFAULT 0
72
+
);
73
+
```
74
+
4.**Enable OffSync** for the database: open the database, click **OffSync**, and enable synchronization. This provisions the CloudSync microservice that routes changes between agents.
75
+
5.**Enable OffSync for the table** — initialize sync on `dbmem_content` and configure the `value` column to use block-level LWW so that concurrent agent edits to different lines of the same entry are preserved rather than overwritten. This can be done from the dashboard UI (Database → OffSync section) or via SQL:
6.**Copy the managed database ID** — shown on the OffSync page (format: `db_xxxxxxxxxxxx`).
81
+
7.**Create API keys** — one per agent is recommended, so access can be revoked independently. API keys are created in the dashboard under **API Keys**.
0 commit comments