CAIN-42 CAIN Studio

API reference · schema

SetMemoryRequest

4 fields · used by 0 operations

Last reviewed 2026-10-02

Fields

FieldTypeMeaning
memory_type requiredstringpattern ^(agent|user|workspace)$
key requiredstringmin length 1 · max length 255
valuestringdefault ""
expires_atstring or null

Smallest valid example

{
  "memory_type": "memory-type",
  "key": "key",
  "value": ""
}

JSON Schema

Show the raw definition
{
  "properties": {
    "memory_type": {
      "type": "string",
      "pattern": "^(agent|user|workspace)$",
      "title": "Memory Type"
    },
    "key": {
      "type": "string",
      "maxLength": 255,
      "minLength": 1,
      "title": "Key"
    },
    "value": {
      "type": "string",
      "title": "Value",
      "default": ""
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expires At"
    }
  },
  "type": "object",
  "required": [
    "memory_type",
    "key"
  ],
  "title": "SetMemoryRequest"
}

Try CAIN-42 on your own agents

Create a free account and every new account starts with a 7-day trial of the full platform. Or try the sandbox first, with no account at all.

Create a free account →  ·  Try the sandbox  ·  See the whole ecosystem