AiMemoryItem ai.memory-item@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
ai
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/ai/memory-item.v1.json

ai.memory-item@1 (OpenVibe.AI; Memory M2): one memory item as the person's own API reads it. Tenant is the owner (`user:usr_…`); the text is decrypted only inside AI's process and never logged, never in an error, a span or an event. `source_ref` is the file path relative to the scanned root and the heading, when the item came from a file.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^mem_[0-9A-HJKMNP-TV-Z]{26}$
ownerstringyes
  • pattern ^user:usr_[0-9A-HJKMNP-TV-Z]{26}$
scopestringyes`user` for the person's own notes, or `project:<slug>` for a repo or folder they chose. Never an absolute path.
  • pattern ^(user|project:[a-z0-9][a-z0-9._-]{0,63})$
kindenumyes
  • one of "preference", "fact", "project_rule", "procedure", "decision", "lesson"
textstringyesThe item text after the server-side redaction. Only the person's own routes and a granted agent search see it.
  • minLength 1
  • maxLength 8000
sourcestringyesThe adapter id (claude-code, cursor, …) or the service (actor, vibe, know, person).
  • minLength 1
  • maxLength 100
source_refobject | nullThe path relative to the scanned root and the heading, when the item came from a file.
statusenumyes
  • one of "active", "suggested", "archived", "conflict"
confidencenumberyes
  • minimum 0
  • maximum 1
seen_atstring
  • format date-time
created_atstringyes
  • format date-time
updated_atstringyes
  • format date-time
machinestring | nullThe Link machine id it came from, when it came from one.
  • maxLength 100
no_looksbooleanTrue when the item was produced by an AI: the server ran noLooks on it (Memory M2 rule 5).

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: item
{
  "id": "mem_01JZ0000000000000000000001",
  "owner": "user:usr_01JZ0000000000000000000AAA",
  "scope": "project:openvibe-link",
  "kind": "project_rule",
  "text": "Run the Go tests with go test ./... before a commit.",
  "source": "claude-code",
  "source_ref": {
    "path": ".claude/CLAUDE.md",
    "heading": "Testing"
  },
  "status": "active",
  "confidence": 1,
  "seen_at": "2026-10-30T09:00:00.000Z",
  "created_at": "2026-10-30T09:00:00.000Z",
  "updated_at": "2026-10-30T09:00:00.000Z",
  "machine": "dev_01JZ0000000000000000000N01",
  "no_looks": false
}
Rejected: absolute-path
{
  "id": "mem_01JZ0000000000000000000001",
  "owner": "user:usr_01JZ0000000000000000000AAA",
  "scope": "/home/ada/projects/openvibe",
  "kind": "project_rule",
  "text": "Run the Go tests with go test ./... before a commit.",
  "source": "claude-code",
  "status": "active",
  "confidence": 1,
  "created_at": "2026-10-30T09:00:00.000Z",
  "updated_at": "2026-10-30T09:00:00.000Z"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('ai.memory-item@1', value);   // { valid, errors: [{ path, message }] }