Documentation
VLite 0.7.2 upgrade and rollback
VLite 0.7.2 adds an atomic key-value batch and a multi-key read (REST, gRPC, the clients, the shell and the MCP tools), adds key-value operations to the embedded libraries and lets the dashboard sign in while agent memory is enabled.
It follows 0.7.1. The store opens unchanged: there is no new file format, setting or migration, and files written by 0.7.1 open as before. The REST and gRPC surfaces of vlite-server only gain: two REST routes, two gRPC calls, one audit event and one capability flag; vlite-mcp and vlite-shell gain two tools and two commands. The OpenAPI document also corrects the entry of one existing route without changing the route (see Compatibility). Programs that build the routers themselves with the library see the gRPC change described under Upgrade. A file written by 0.7.2 opens in 0.7.1 (see Rollback). No benchmarks were run for this release, and the 0.7.0 numbers make no claim about it.
What is new
Key-value: atomic batch and multi-get
Two operations join get, put, delete and list. A batch writes several keys of one collection, all or nothing, and a multi-get reads several keys in one call. Both need explicit use; single-key operations are unchanged. The key-value guide has the full rules.
-
Where. REST
POST /v1/collections/{collection}/kv/batch(needswrite) andPOST /v1/collections/{collection}/kv/entries/get(needsread, so the read-only token may call it); gRPCWriteKvBatchandGetKvEntriesonvlite.v1.Kv; the local MCP toolsvlite_kv_batch(listed and callable only with--writable) andvlite_kv_get_many; the shell commandskv-batchandkv-get-many; the Rust methodsKvStore::write_batchandKvView::get_many; and the clients:kv_batchandkv_get_manyin Python,kvBatchandkvGetManyin JavaScript,KvBatchAsyncandKvGetManyAsyncin .NET, andKvBatchandKvGetManyin Go. The Go client had no key-value operations before; it now has all six (get, put, delete, list, multi-get and batch). -
What a batch does. It holds up to 1,000 puts and deletes, for any namespaces of the collection, and commits them as one frame: after a crash you find all of it or none of it, and a reader sees the state before the batch or the state after it, never part of it. Each operation takes the same
expectedcondition as the single call (any,absentor a revision). The first operation that cannot run fails the whole batch and nothing is written. Every put of one batch gets the same version, the commit's sequence, and each is a validexpectedrevision for its own key. A delete of a key with no live entry succeeds withdeleted: false; if an expired record of the key is still stored, the delete removes it, still reportsfalseand counts as a change. A batch that changes no record commits nothing. -
Rules. Each
(namespace, key)may appear once. The values of all puts total at most 4,194,304 decoded bytes. A put in a batch has noexpires_at_ms(the field is unknown, so 422invalid_json) and, like any put without a deadline, clears the deadline of the entry it replaces; use single puts for entries that need one. The request is checked as a whole before anything runs, and a bound, encoding, size, duplicate-key orexpectedfault is 422invalid_inputwhose message names the operation. -
Errors and quota. A failed condition is 412
precondition_failed(gRPCABORTED). All 16 record IDs of a key taken is 409kv_slots_exhausted, and a delete of an entry that a graph node is attached to is 409graph_attached_record(bothFAILED_PRECONDITION). A batch that changes a record in a file of format 1 is 409upgrade_required. The record quota is judged once, on the count that the whole batch leaves, and only when the batch writes at least one record, so an empty batch or a batch of deletes is never refused for quota. A 503commit_indeterminate(gRPCUNKNOWN) means that all of the batch or none of it was written and nobody can tell which: read the keys back with a multi-get before you decide, and do not retry blindly. -
Multi-get. It names 0 to 1,000 keys (a key may repeat) and answers one element per key, in order, with
nullfor a key that is absent or due. One read and one expiry clock serve the call. If the entries would pass 16,777,216 bytes of compact JSON, the call returns the longest prefix that fits andnext_indexnames the first key it did not read; ask again for the rest. Calls share no snapshot, so a key can change between two calls. -
Audit and metrics. A batch writes one
kv_batchaudit event, not one per operation. It carries the request ID, principal, actor, collection, outcome andduration_ns, plus the countsputsanddeletes, and never a namespace, key or value. A batch refused for slots counts once inkv_slots_exhausted_total. See Key-value permissions. -
Finding out whether a server has the routes.
GET /v1/capabilitieslists both routes inroutesfor every file format and gainsfeatures.kv_batch, which is true for format 5 and later. Look for the two paths inroutes, not at the flag: a file before format 5 serves both routes while the flag is false.
Key-value in the embedded libraries
The C library, the Python package (vlite-embedded), the Node.js package (@vlite/embedded) and WebAssembly now carry get, put, delete and list, with the rules of the other surfaces: byte values under namespaced text keys, compare-and-set on versions, an optional absolute expiry (it needs a file of format 5) and ordered prefix listing. They work in an existing collection of one dimension, such as the default collection of a file created with one dimension, and never create one. A page of a list holds at most limit entries (1 to 10,000, default 100) and 16 MiB of JSON. There are no batch, multi-get or lease operations in the embedded libraries.
- C library. Key-value is one more request of
vlite_execute,{"op":"kv","request":{"op":"get",...}}.vlite_abi_version()still returns 1 and no symbol is added. A library older than the request answersinvalid_input; the Python and Node.js wrappers report that asunsupported. - Python, Node.js and WebAssembly.
db.kv_get,db.kv_put,db.kv_deleteanddb.kv_list(keyword-only arguments,bytesandint);db.kvGet,db.kvPut,db.kvDeleteanddb.kvListin Node.js (an options object,Uint8Arrayandbigint) and in WebAssembly (positional arguments). A key that is absent or due iskv_not_foundin the C library, Python and Node.js, andundefinedfrom WebAssembly'skvGet. A read-only handle refuses writes withread_only.
gRPC applies the memory reservations of its REST router
This is a security fix for programs that build the routers with the library. vlite-server was never exposed: it refuses --grpc-bind while a memory binding is configured or reserved records remain (see Known limits), so a server that runs with memory serves no gRPC. In 0.7.1 a gRPC adapter built after a configured REST router adopted that router's tokens, credential store and audit log but none of its memory reservations, so its lists, reads and imports ignored them. The adapter now adopts the reservations too, and a reserved collection or graph answers like a missing one on every RPC. A generated differential runs the checks of the REST differential on every RPC, with and without bindings.
A program that builds the routers itself must build every REST router first (configured_admin_router, then grpc_router) over one service. The gRPC adapter adopts, once, when it is built, what the REST routers published: normally the tokens, credential store and reservations of the last router. A later router that protects less (no admin token where the published one has one, or reservations that do not cover the published ones) does not replace them, and a build with the grpc feature logs a publication_kept warning. Only the presence of the admin token and the set of reserved resources are compared; the token values, the credential store and the raw-access grants are those of the router that last replaced the publication. In a build with the grpc feature, configured_admin_router returns an error when a gRPC router was built from the service before any REST router, or after one without an admin token (the listener would serve every caller as the administrator); when the router reserves memory resources and a gRPC router has been built; and when the router cannot be ordered against the published one, because each protects something the other does not (the admin token, a reserved resource). The last error also occurs when no gRPC router is built. router and authenticated_router cannot refuse: they log a warning for the first order and, for a later router that would protect less, keep the published tokens and reservations with a warning. After an error, close the service (Service::close().await) and drop it with every router built from it; what the refused router already did stays. Builds without the grpc feature are unchanged. See gRPC.
Agent memory
Expiry and forget are logical deletion. A memory whose expires_at_ms has passed is hidden from reads and later removed from the graph, but its expiry does not carry over to its evidence record: the record stays in the evidence collection until someone with raw_access deletes it, or until it expires on its own if it was given an expiry. Only forget deletes the evidence record that only the forgotten memory used. Neither is secure erasure. This documents behavior that 0.7.1 already had; nothing changed in the server. See Forget.
Clients and guides
The Python, JavaScript and .NET client guides and the JavaScript typings now say how to settle a mutation after a timeout or a cancellation: look up a forget or consolidate with get_receipt and the same idempotency key, and repeat a remember with the same key and body inside the receipt window, because the server refuses a lookup of a remember receipt (409 memory_capability_unavailable, details.feature remember_receipt_lookup). They also state that text and vector recall find only memories that hold an evidence record, and that the Go client has no agent-memory methods. Client behavior is unchanged apart from the new key-value methods above.
Fixed
-
A gRPC adapter built with the library ignored the memory reservations of its REST router (security; library embedders only). A
grpc_routerbuilt after a configured REST router adopted that router's tokens but none of its memory reservations, so the adapter's lists, reads and imports ignored them. It now applies both. Only programs that build the routers with the library were affected:vlite-serverwas never exposed, because it refuses to start gRPC with memory. See gRPC applies the memory reservations of its REST router for the rules. -
The dashboard signs in while agent memory is enabled. While agent memory is enabled the server answers
GET /metricsand a few other database-wide routes with 403forbidden_scope, even to the administrator, so that memory data cannot be reached through them. The 0.7.1 dashboard read that refusal as a failed sign-in: a super admin gotHTTP 403: forbidden_scopeand could not enter. The dashboard now reads the refusal as the memory case when the credential could otherwise use the route. Sign-in succeeds, the overview shows the database size as Unavailable with a plain note, and Observability, Health, the Prometheus text, webhooks, automatic maintenance, import status, replication export and graph statistics each say in their own panel that they are off while agent memory is enabled. A 401, a 5xx, a network failure and every other 403 still fail as before. The server, the OpenAPI document and the security model are unchanged: the routes still answer 403. See Monitor the server and Memory-bound resources. -
The MemoryAI clock hint no longer appears for every refused memory request. The hint ("Your computer or proxy clock may be ahead of the VLite server") matched the server's generic "memory request field is invalid" text, so every 422
invalid_inputof a memory request showed it. The server refuses an observation time later than its own clock like any core refusal, with that generic message and no named field, while a refused request field always names itself. The hint now appears only for arememberorconsolidaterefused with 422invalid_inputthat names no field or namesobserved_at_ms, and for the dashboard's own "server time is unavailable" error. Recall, forget, receipt lookups, other statuses and other fields show the server's own message alone. -
A vertical touch drag on a graph is handled by the graph. On a touch screen, a vertical drag that starts on the 2D diagram or the 3D stage moves a node or pans or turns the graph instead of scrolling the page. A drag that starts anywhere else, and the mouse wheel, still scroll the page, and the gesture hint says so.
Upgrade
Back up and verify checksums first. Replace the binary or image with 0.7.2 and restart. The store opens unchanged: there is no format change, no setting and no data migration, and existing files are never converted in place. Follow the single-writer rule in the same order as for 0.7.1: stop the old process (or deactivate the old revision and wait until it has no replica), then start the new one. The 0.7.1 upgrade section explains why and covers hosted apps. If you upgrade from 0.7.0, the 0.7.1 changes come with it: read its checks and First start under 0.7.1 first. 0.7.2 adds no check of that kind.
Check these before you upgrade:
- Servers before clients. A 0.7.2 client that calls a batch or a multi-get on a 0.7.1 server gets 404
not_foundwith the administrator token (the clients raise their unsupported-operation error) and 403 with every other credential (an ordinary permission error), because that server checks permissions before it matches a route. Over gRPC the 0.7.1 server answersUNIMPLEMENTEDto every caller. Nothing falls back to single calls. To find out beforehand, look for the two paths inroutesofGET /v1/capabilities; gRPC has no capabilities call, so a gRPC client asks REST. - The standalone dashboard image. The server serves the dashboard from its own binary, so upgrading the server brings the dashboard fixes. If you also run the separate dashboard image (
ghcr.io/mahpate/vlite-dashboard:<version>, which the release workflow publishes on its own), upgrade it together with the server: the fixes live in the dashboard files, and that image carries its own copy of them. Use the same version for both; see Docker operations. - Audit queries. A query, alert or export that counts key-value writes by the
kv_putandkv_deleteevents must also countkv_batch, which is one event per batch withputsanddeletescounts. - Group commit. If you run
--group-commitand send large batches, keep--group-commit-bytesat 8 MiB or more. Each mutating request is charged an estimate of the memory it retains against that budget (default 64 MiB), and a request that alone needs more than the whole budget is refused with 503busyon every attempt. A batch at every limit at once is charged less than 8 MiB. - gRPC clients. The proto file only gains messages and RPCs, so existing stubs keep working. Generate new ones to call
WriteKvBatchandGetKvEntries, and give the channel a receive limit of at least 16 MiB + 1 KiB forListKvEntriesandGetKvEntriesand a send limit above 6 MiB for a fullWriteKvBatch. - Programs that build the routers themselves. Build every REST router first and the gRPC router after them, over one service. The gRPC adapter adopts, once, when it is built, what the routers published, normally the last router's tokens and reservations; a later router that protects less does not replace them. In a build with the
grpcfeature,configured_admin_routercan now refuse build orders that 0.7.1 accepted (a gRPC router built first, a router that reserves memory resources after a gRPC router, a router that cannot be ordered against the published one); close and drop the service after such an error. Builds without thegrpcfeature are unchanged. The section above has the rules.
These changes apply with the upgrade and need no further action: the dashboard fixes (the standalone dashboard image needs its own upgrade, above). The reservation parity of the gRPC library path applies automatically too, but a program that builds the routers itself may have to change its build order (above). The batch, the multi-get and the embedded key-value operations need explicit use.
Rollback
Restart with the 0.7.1 binary or image, in the same order as the upgrade: stop the 0.7.2 process (or deactivate its revision and wait until it has no replica), then start 0.7.1 from its pinned image digest. 0.7.2 writes nothing that 0.7.1 cannot read, and there is no exception. A batch commits the ordinary batch frame that the engine already writes for atomic batches (the version-4 frame for a named collection, the format-2 frame only for the default collection), so each entry it wrote is an ordinary record that 0.7.1 reads, lists, updates and deletes. Nothing about a batch is one-way.
After a rollback:
- Batch and multi-get stop working. 0.7.1 has neither route, RPC, MCP tool nor shell command. A call over REST answers 404
not_foundto the administrator token and 403 to every other credential, and a gRPC call answersUNIMPLEMENTEDto every caller. Stop clients and scripts from sending them. - The embedded key-value methods go with the packages. The 0.7.1 libraries have no key-value request. Entries written through them stay in the file, and the 0.7.1 server, shell and MCP tools read them.
- Audit log. The log is only appended to, so the
kv_batchlines stay. 0.7.1 reads each line of the log as JSON without a fixed list of event names, so it reads a log that holdskv_batchlines without error. - The dashboard fixes go. With agent memory enabled, the 0.7.1 dashboard again fails sign-in for a super admin with
HTTP 403: forbidden_scope, the MemoryAI clock hint again appears for every 422invalid_inputof a memory request, and a vertical touch drag over a graph again scrolls the page. This holds for the standalone dashboard image too: roll it back together with the server. - Further back. Rolling back past 0.7.1 to 0.7.0 has its own exceptions, which the 0.7.1 rollback section lists: item evidence references and the gRPC disk-ANN path rule.
Compatibility
-
Files and settings. No file format, flag or setting changes, and no server dependency changes:
Cargo.tomlandCargo.lockmatch 0.7.1 apart from the version, and the minimum Rust version (1.89) is unchanged. The WebAssembly package adds one dependency,js-sys(default features off), for its key-value methods. -
Wire. The proto file gains the two RPCs
GetKvEntriesandWriteKvBatchand ten messages, and nothing existing in it is removed or changed. The OpenAPI document gains the two paths and their schemas and corrects one entry:POST /v1/collections/{collection}/batchesnow documents its204and its errors (400, 401, 403, 404, 409, 413, 415, 422, 429 and 503) and no longer lists a200, which the route never served. That changes the document only: the handler, its answers and the route are unchanged, andPOST /v1/batchesis as before.GET /v1/capabilitiesgainsfeatures.kv_batchand the two paths inroutes. The OpenAPIinfo.versionreads 0.7.2. -
Audit log. The new
kv_batchevent is described above. The existing events keep their fields. -
Tools.
vlite-mcplistsvlite_kv_get_manyalways andvlite_kv_batchonly with--writable; a read-only session refuses the batch withread_only.vlite-shellgainskv-get-manyandkv-batch, and--read-onlyrefuseskv-batch. Their request fields and bounds are those of the REST routes. -
Rust.
KvOpandKvOutcome(both#[non_exhaustive]), the constantsMAX_KV_BATCH_OPERATIONS,MAX_KV_BATCH_VALUE_BYTESandMAX_KV_GET_MANY_KEYS,KvStore::write_batchandwrite_batch_at, andKvView::get_many,get_many_atandvisit_many_atare new public items invlite::kv. Existing signatures are unchanged; in builds with thegrpcfeature, though,configured_admin_routercan now refuse router build orders that 0.7.1 accepted (see Upgrade). -
Embedded libraries. The C ABI stays at version 1 with no new symbol, and
vlite.hgains only a comment. The Python, Node.js and WebAssembly packages gain the four key-value methods. -
Clients. The Python, JavaScript, .NET and Go clients gain the batch and the multi-get; the Go client gains key-value as a whole. Each client checks the bounds before it sends, never retries and never falls back to single calls.
-
Memory. The first-slice refusals and error codes are unchanged; every refusal and its
details.featureis in Agent memory (REST).
Known limits
-
Server-wide metrics while agent memory is enabled. While a memory bindings file is configured, or the database still holds memory binding records after the file is removed,
GET /metrics(JSON and Prometheus text),GET /v1/admin/metrics/summary, graph guard statistics, replication export, webhook list and status, every import route and the automatic-maintenance routes answer 403forbidden_scopeto every credential, the administrator token included, except that the read-only token gets 403read_onlyon the/v1/adminroutes (and on any route that writes). This did not change. What changed is that the dashboard shows these views as unavailable instead of failing sign-in, so with memory on the overview, Observability and Health stay empty of server metrics. -
Dashboard messages while agent memory is enabled. The plain-words message appears only where the refusal cannot be an ordinary scope denial: a tenant editor (a scoped credential) still sees the raw 403 on the import routes. When the bindings file is removed but memory binding records remain in the database, the server keeps the same routes off and the dashboard still says that agent memory is enabled. The MemoryAI clock hint can still appear for another 422 on a
rememberorconsolidatethat names no field. -
Touch drag on a 3D graph label. A touch drag that starts on a label of the 3D graph (a node or edge button) does nothing: the label answers a tap, and the graph's stage keeps the page from scrolling. Start the drag on the canvas.
-
No gRPC and no automatic index maintenance with memory.
vlite-serverrefuses to start with--grpc-bindor with automatic index maintenance while a memory binding is configured or the database holds reserved memory resources ("gRPC listener is disabled while memory bindings are configured", or "...while the database holds reserved memory resources"). The gRPC adapter applies the reservations, but the refusal stays. -
Backups are the administrator's while anything is reserved. A backup job that uses a backup credential gets 403 once memory bindings exist: run it with the administrator token, or take the backups before you enable memory.
-
Batch. One collection per batch, at most 1,000 operations and 4,194,304 value bytes, each key once, no deadline on a batch put and no check-only operation. Over REST, a batch inside every other limit can still pass the 8 MiB body limit when many of its keys are escaped in JSON, and then answers 413
invalid_json; a batch is atomic and cannot be split, so use fewer or shorter keys. A batch that changes a record in a file of format 1 is refused. -
Multi-get. At most 1,000 keys per call, and a long result stops early with
next_index; the client never continues it, and calls share no snapshot. -
Key-value generally. A list still reads the whole collection, so its cost grows with the number of entries; keep large key spaces in their own collections and list by a narrow prefix. A version is a compare-and-set token, not a fencing token. The local shell and MCP tools,
kv-batchandvlite_kv_batchincluded, open the file themselves, so stopvlite-serverfirst;vlite-mcp --serverdoes not forward them. -
A credential that can write but not read can still probe a key it may overwrite. It can learn whether the key is live (a delete with
expected=absentanswers 412 for a live key anddeleted: falsefor a missing one, and changes no live entry either way), and it can test a guessed revision when it can make the request fail in some other way after the condition. A batch widens that class, because it can add a failing operation on another key. It never learns a value. The 0.7.1 guide said that such a credential cannot learn whether a key exists; the guides now say what holds. Givewriteon a key-value collection only to principals you trust with its keys. -
Embedded key-value. The embedded libraries open the file inside your process, so the single-writer rule holds; they have the four single-key operations only.
-
Deletion in agent memory is logical. Forget and expiry are not secure erasure, and an expired memory's evidence record stays until it is deleted or expires on its own. Plan backup retention and external copies yourself.
Not included in this release
These are not available, and you should not rely on them.
-
Compact and float16 vector storage and compact graph storage. Float32 stays the only storage precision and production graph storage is unchanged.
-
Agent-memory facts and erasure jobs.
facts/query,facts/correct,erasures/getanderasures/resumeanswer 409memory_capability_unavailablewithdetails.feature, andforgetby series, entity, session or scope is refused the same way.forgetby ID is logical deletion, not secure erasure. - Approximate recall.
mode: approximateanswers 422memory_bounded_plan_unsupported: no approximate index is built for a binding, and none is built lazily. -
Agent memory outside REST. Memory is served over REST and by the clients, the command-line client and the MCP tools that call it. There is no gRPC memory service and no embedded memory API, and an operator provisions every binding in the bindings file: no route or dashboard control creates one.
-
Leases and a fencing-token ledger. These are not implemented. Key-value versions are not such a ledger (see Key-value store).
-
Unchanged from 0.7.0: temporal graph, a Cypher-style query subset and document-to-graph ingestion are not available (see 0.7.0).