---
title: "ai.memory-item@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/ai.memory-item"
updated: null
---

# ai.memory-item@1 · OpenVibe.Services

HTML: [ai.memory-item@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/ai.memory-item)

# AiMemoryItem `ai.memory-item@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/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`](/docs/contracts/ai.memory-item.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

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `id` | string | yes |  | - `pattern ^mem_[0-9A-HJKMNP-TV-Z]{26}$` |
| `owner` | string | yes |  | - `pattern ^user:usr_[0-9A-HJKMNP-TV-Z]{26}$` |
| `scope` | string | yes | \`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})$` |
| `kind` | enum | yes |  | - `one of "preference", "fact", "project_rule", "procedure", "decision", "lesson"` |
| `text` | string | yes | The item text after the server-side redaction. Only the person's own routes and a granted agent search see it. | - `minLength 1`<br>- `maxLength 8000` |
| `source` | string | yes | The adapter id (claude-code, cursor, …) or the service (actor, vibe, know, person). | - `minLength 1`<br>- `maxLength 100` |
| `source_ref` | object \| null |  | The path relative to the scanned root and the heading, when the item came from a file. |  |
| `status` | enum | yes |  | - `one of "active", "suggested", "archived", "conflict"` |
| `confidence` | number | yes |  | - `minimum 0`<br>- `maximum 1` |
| `seen_at` | string |  |  | - `format date-time` |
| `created_at` | string | yes |  | - `format date-time` |
| `updated_at` | string | yes |  | - `format date-time` |
| `machine` | string \| null |  | The Link machine id it came from, when it came from one. | - `maxLength 100` |
| `no_looks` | boolean |  | True 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 }] }
~~~~
