> ## Documentation Index
> Fetch the complete documentation index at: https://docs.camel-ai.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Camel.memories.records

<a id="camel.memories.records" />

<a id="camel.memories.records.MemoryRecord" />

## MemoryRecord

```python theme={"system"}
class MemoryRecord(BaseModel):
```

The basic message storing unit in the CAMEL memory system.

**Parameters:**

* **message** (BaseMessage): The main content of the record.
* **role\_at\_backend** (OpenAIBackendRole): An enumeration value representing the role this message played at the OpenAI backend. Note that this value is different from the :obj:`RoleType` used in the CAMEL role playing system.
* **uuid** (UUID, optional): A universally unique identifier for this record. This is used to uniquely identify this record in the memory system. If not given, it will be assigned with a random UUID.
* **extra\_info** (Dict\[str, str], optional): A dictionary of additional key-value pairs that provide more information. If not given, it will be an empty `Dict`.
* **timestamp** (float, optional): The timestamp when the record was created.
* **agent\_id** (str): The identifier of the agent associated with this memory.

<a id="camel.memories.records.MemoryRecord._get_constructor_params" />

### \_get\_constructor\_params

```python theme={"system"}
def _get_constructor_params(cls, message_cls):
```

Get constructor parameters for a message class with caching.

<a id="camel.memories.records.MemoryRecord.from_dict" />

### from\_dict

```python theme={"system"}
def from_dict(cls, record_dict: Dict[str, Any]):
```

Reconstruct a :obj:`MemoryRecord` from the input dict.

**Parameters:**

* **record\_dict** (Dict\[str, Any]): A dict generated by :meth:`to_dict`.

<a id="camel.memories.records.MemoryRecord.to_dict" />

### to\_dict

```python theme={"system"}
def to_dict(self):
```

Convert the :obj:`MemoryRecord` to a dict for serialization
purposes.

<a id="camel.memories.records.MemoryRecord.to_openai_message" />

### to\_openai\_message

```python theme={"system"}
def to_openai_message(self):
```

Converts the record to an :obj:`OpenAIMessage` object.

<a id="camel.memories.records.ContextRecord" />

## ContextRecord

```python theme={"system"}
class ContextRecord(BaseModel):
```

The result of memory retrieving.
