Memory Blocks

Create a Memory Block

Creates a new memory block for persistent agent memory. Memory blocks are cross-collection and per-user.

post/memory_blocks

Request

Request body

namestring required

Name of the memory block.

contentstring

Initial content of the memory block.

system_prompt_amendmentstring

System prompt amendment for agent mode that drives changes to the memory block.

injection_mode'system_prompt' | 'user_instruction' | 'agent_file' | 'agent_tool'

Where memory content is injected. 'system_prompt' (default) adds it to the LLM system prompt; 'user_instruction' prepends it to the user message; 'agent_file' makes it only available as AGENTS.md in agent mode; 'agent_tool' exposes content lazily via the read_memory_block / update_memory_block tools (no pre-injection).

access_mode'read' | 'write' | 'read_write'

Controls whether the LLM/agent can read the memory, write to it, or both.

max_content_lengthinteger

Maximum number of characters allowed in memory content. Set to 0 for unlimited. In LLM mode, new memories are appended and oldest content is trimmed when this limit is exceeded.

Response

Successful operation

idstring required

Unique identifier of the memory block.

namestring required

Name of the memory block.

contentstring required

Text content of the memory block.

system_prompt_amendmentstring required

System prompt amendment for agent mode.

injection_mode'system_prompt' | 'user_instruction' | 'agent_file' | 'agent_tool' required

Where memory content is injected. 'system_prompt' adds it to the LLM system prompt; 'user_instruction' prepends it to the user message; 'agent_file' makes it only available as AGENTS.md in agent mode; 'agent_tool' exposes content lazily via the read_memory_block / update_memory_block tools (no pre-injection).

access_mode'read' | 'write' | 'read_write' required

Controls whether the LLM/agent can read the memory, write to it, or both.

user_idstring required

ID of the user who owns the memory block.

usernamestring

Username of the owner.

created_atstring date-time required

When the memory block was created.

updated_atstring date-time required

When the memory block was last updated.

is_publicboolean

Whether the memory block is publicly accessible.

is_ownerboolean

Whether the current user is the owner.

max_content_lengthinteger

Maximum number of characters allowed in memory content. 0 means unlimited.

is_autoboolean

Whether this memory block was auto-created by the system for an AI assistant or chat session.

user_countinteger

The number of users the memory block has been directly shared with (excludes the owner).

group_countinteger

The number of groups the memory block has been shared with.

Changes

No recorded changes to this operation across all 1 revision of this API.