> For the complete documentation index, see [llms.txt](https://docs.groclake.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.groclake.ai/lakes/agent-management-and-deployment/memorylake/editor-1.md).

# Value Structure

Each stored value consists of the following fields:

* `query_text`: The user's input/query.
* `response_text`: The system's response.
* `entities`: A list containing metadata:
  * `time`: Timestamp when the memory was stored.
  * `memory_id`: Matches the memory ID in the key.
  * `context_id`: Matches the context ID in the key.
  * `memory_quality`: A rating representing the quality of the memory. Memory quality is stored as **1** by default, which means a "good" memory, while **0** indicates a "bad" memory.
* `metadata`: Additional information:
  * `context_entity_id`: Matches the context entity ID in the key.
  * `user_uuid`: Matches the user UUID in the key.

### **Default Value Structure**

```python
value = {
    "query_text": memory['query_text'],
    "response_text": memory['response_text'],
    "entities": [
        {
            "time": memory['time'],
            "memory_id": memory_context['memory_id'],
            "context_id": memory_context['context_id'],
            "memory_quality": 1  # Default memory quality
        }
    ],
    "metadata": {"context_entity_id": memory_context['context_entity_id'], "user_uuid": user_uuid}
}
```

### **Example of the Value Structure**

```python
memory = {
    "query_text": "Hello!",
    "response_text": "Hi there! How can I help you?",
    "time": "2025-02-05T12:00:00Z",
    "cache_ttl": 3600,  # Time-to-live in seconds
    "entities": [
        {
            "time": "2025-02-05T12:00:00Z",
            "memory_id": "msg001",
            "context_id": "session1",
            "memory_quality": 1,
        }
    ],
    "metadata": {
        "context_entity_id": "chatbot",
        "user_uuid": "user123",
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.groclake.ai/lakes/agent-management-and-deployment/memorylake/editor-1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
