AiMemoryWriteRequest ai.memory-write-request@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-write-request.v1.json
ai.memory-write-request@1 (OpenVibe.AI; Memory M2): the body of POST /api/v1/memory/items:batch (up to 200 items), PATCH /api/v1/memory/items/{id} (text, kind, scope or status) and DELETE /api/v1/memory/items?source= (the source to delete). Secret shapes are redacted again on the server, and an item that is only a secret is refused. AI-produced items are suggestions until the person accepts them.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
items | array of object |
| ||
items[].id | string |
| ||
items[].text | string | yes |
| |
items[].kind | enum |
| ||
items[].scope | string |
| ||
items[].source | string |
| ||
items[].source_ref | object | null | |||
items[].status | enum |
| ||
items[].confidence | number |
| ||
items[].machine | string | null |
| ||
items[].no_looks | boolean | |||
items[].seen_at | string |
| ||
text | string |
| ||
kind | enum |
| ||
scope | string |
| ||
status | enum |
| ||
source | string |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: batch
{
"items": [
{
"text": "Use the repo's formatter before a commit.",
"kind": "procedure",
"scope": "project:openvibe-link",
"source": "claude-code",
"source_ref": {
"path": ".claude/CLAUDE.md",
"heading": "Style"
},
"confidence": 1
}
]
}Rejected: empty-batch
{
"items": []
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('ai.memory-write-request@1', value); // { valid, errors: [{ path, message }] }