✳WKE LLM
Home

ScriptorMemory, events and state reconstruction

Memory you can verify

History needs storage beyond the current response. An event log records changes and a search index selects evidence for the next conversation.

A memory key and its record

ScriptorMemory describes compact keys, their semantic descriptions, a sequence buffer and a decoder. A key locates a record and the dictionary expands it, organising access to context within available capacity.

kai-graph-bio offers a simplified research implementation with concepts, roles, attention filters and a directed graph. Its README distinguishes the prototype from the full behaviour proposed in the original concepts.

What AIS implements

AIS saves immutable JSON events. Adding, revising, merging and retracting a memory produce distinct events containing identifiers, timestamps, action origins, types, schema versions and content. The current view is rebuilt by replaying the log.

The local runtime uses Ollama and a rebuildable SQLite/FTS index. The API runtime treats each model call as stateless, reconstructs the log and injects a limited selection of evidence. The external history can survive a change of provider.

Store separately and retrieve selectively

Each request needs a bounded selection of records chosen by query, recency, durability and provenance. Excess irrelevant context can interfere with a response.

Back up the canonical log. The index can be rebuilt. AIS recommends keeping working memory outside the code repository. Concurrent writers need an explicit consistency strategy beyond an ordinary synchronised folder.

ais --workspace ./kai-local memory list
ais --workspace ./kai-local memory search "pressure and agreement"
ais --workspace ./kai-local export --output exports/portable-self-state.json

Check the whole path of a record

Trace one event through storage, the current view, search and the next turn’s context. Failures can occur at each step, including an unsaved event, a stale index, a missed result or retrieval of an outdated version.

Debug with one known event and a simple query before expanding the archive. This makes it possible to distinguish storage failures from interpretation errors.

Put it into practice

  1. Keep code and canonical memory in separate directories.
  2. Save an event and inspect its appearance in the current view.
  3. Retrieve it by a meaningful query and compare it with the archive.
Open a working recordChoose an exercise

Check the result

  • The physical storage location is known.
  • The index is accompanied by a canonical history.
  • Retrieved records retain their source and version.

Primary sources

uncia-poison / KAiScriptor / blob / main / specs / scriptormemory.mduncia-poison / kai-graph-bio / blob / main / README.mduncia-poison / autonomous-identity-scaffolding / blob / main / ARCHITECTURE.mduncia-poison / autonomous-identity-scaffolding / blob / main / README.md