MemoryBlock

Properties

Name

Type

Description

Notes

id

str

Unique identifier of the memory block.

name

str

Name of the memory block.

content

str

Text content of the memory block.

system_prompt_amendment

str

System prompt amendment for agent mode.

injection_mode

str

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

str

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

user_id

str

ID of the user who owns the memory block.

username

str

Username of the owner.

[optional]

created_at

datetime

When the memory block was created.

updated_at

datetime

When the memory block was last updated.

is_public

bool

Whether the memory block is publicly accessible.

[optional]

is_owner

bool

Whether the current user is the owner.

[optional]

max_content_length

int

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

[optional]

is_auto

bool

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

[optional]

user_count

int

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

[optional]

group_count

int

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

[optional]

Example

from h2ogpte.rest_sync.models.memory_block import MemoryBlock

# TODO update the JSON string below
json = "{}"
# create an instance of MemoryBlock from a JSON string
memory_block_instance = MemoryBlock.from_json(json)
# print the JSON string representation of the object
print(MemoryBlock.to_json())

# convert the object into a dict
memory_block_dict = memory_block_instance.to_dict()
# create an instance of MemoryBlock from a dict
memory_block_from_dict = MemoryBlock.from_dict(memory_block_dict)