memory Power

Jev decisions at message time, immediate recall, and incremental Session memory

City owns one memory instance. The host runs message decisions and background formation; the conversational Agent does not schedule automatic memory.

Decision protocol

{
  "save_scope": "workspace",
  "should_recall": true
}

save_scope is a Jev choice with none | user | workspace | agent | mixed. should_recall is a boolean. A non-none scope creates a durable source marker. mixed is split during formation and is never a storage scope.

Recall runs before this turn's model processing. Results enter the model-input copy as historical reference, with a total content budget of 2,000 characters. Canonical messages remain unchanged. Model steps reuse the turn context.

Agent Core Memory: PROFILE.md

remember.mode accepts profile | knowledge. The default knowledge stores searchable records; profile appends Agent agreements loaded every turn.

PROFILE.md in the Agent directory is the document source for Core Memory. MemoryPower owns append, per-turn loading, and daily optimization, without editing SOUL.md. New Sessions load the file too, independently of Jev recall decisions.

{
  "target": "agent",
  "mode": "profile",
  "content": "Before the main answer, remind users to speak English and briefly correct English expressions."
}

This is an Agent-wide agreement applying to all users of that Agent. Private User information must not automatically fall back to Agent Profile. Saving is immediate and returns profile_id, not a wiki ID accepted by ordinary read/revise/forget. Existing wiki preferences are not migrated automatically.

Appending has no size cap. Once daily, visible documents above 2,000 Unicode characters are optimized with the configured text model. The limit is a target, not truncation. The model proposes exact replacements; code checks unique matches, non-overlap, source markers, and an unchanged version, and backs up the original before writing. Valid agreements must not be removed just to meet the target.

Host actions memory.profile_read, memory.profile_edit, and memory.profile_status require a registered Agent ID. Editing uses the read version plus old_text/new_text replacements. A dedicated UI is not yet connected.

Background formation

Every 30 minutes, City scans Sessions with pending markers and reads completed turns after a stable message sequence. A text model extracts short records, types, and sources. Exact duplicates are skipped; related records are merged only when needed.

The worker persists a write plan before writing and advances its cursor only after all writes succeed. It resumes pending plans after restart. Failed Jev decisions retain retry markers; delayed recall is not injected into an already completed turn. Oversized input is truncated with an observable warning and is processed at complete turn boundaries.

Automatic processing no longer creates full per-reply capture jobs or duplicates entire Session transcripts as evidence.

Scopes and types

Write targetMeaning
userTrusted user memory; requires a host identity resolver
current_workspaceIsolated shared memory for the current Workspace
agentPrivate memory for the current Agent

User and Workspace records are stored once and read by authorized Agents. A user's preference for one specific Agent remains User memory with an Agent applicability restriction. Automatic processing excludes legacy global City records.

Types remain fact, preference, decision, episode, procedure, and document. Questions and Agent proposals are not confirmed decisions. An Assistant's claim of success is not execution evidence.

Configuration

const memory_power = new MemoryPower({
  platform_root_path: "/absolute/platform-root",
  automatic: {
    enabled: true,
    decision_model_id: "jev-latest",
    formation_model_id: "configured-text-model",
    // Resolve the platform user from trusted message identity, never from text.
    resolve_user: resolve_trusted_message_user,
  },
});

resolve_trusted_message_user is an application callback, not a built-in function. Chat channels without identity mapping cannot enable User sharing. Neither the model billing account nor chat_id establishes the message sender's identity.

Memory configuration also accepts enabled, decision_model_id, and formation_model_id; restart City to apply changes. Automatic memory is disabled by default. Jev may be discovered from the Federation catalog; the formation model must be explicitly selected. Missing models do not block chat and leave pending work observable.

The host action memory.automatic_status reports model selection, identity-resolver availability, pending work, retry timing, and failures without returning conversation text.

Storage and actions

Agent records live under agents/<agent_id>/memory/wiki. Shared records live under the Memory root's users/<encoded-id>/wiki and workspaces/<encoded-id>/wiki. runtime/sessions stores markers, cursors, and write plans.

A public memory_id, such as workspace/<encoded-id>/wiki/<topic>, is a logical identifier, not a physical path. Pass it unchanged to read, revise, and forget.

Actions: status, list, search, read, remember, digest, revise, and forget. Explicit digest retains transcript-archival behavior and is separate from periodic short-memory formation.

{
  "target": "current_workspace",
  "content": "This project uses pnpm.",
  "topic": "project-overview",
  "memory_type": "decision"
}

The existing Desktop management view still has legacy City and Agent navigation. Dedicated User / Workspace navigation is not yet available; project records are accessible through domain actions. The legacy shared view is not a User memory interface.