# Short-term memory

**Short-term Memory** holds transient information that is relevant within a short period. This type of memory is time-sensitive and will naturally decay based on a **time-weighting mechanism**. Older or less relevant memories are eventually discarded or archived, but they are never fully erased unless explicitly instructed. Short-term memory is stored with timestamps in a general-purpose **database** and is indexed for efficient decay management.

**Short-term Memory Contents**

* User conversation context and chat history
* Recent tasks and activities performed by the system
* User preferences and interaction patterns
* Active jobs and ongoing processes
* Temporary system states and configurations

**Decay and Time-Weighted Memory** For **Short-Term Memory**, the decay mechanism ensures efficient management of recent user interactions and preferences. The time-weighting mechanism:

* Prioritizes recent interactions and preferences
* Gradually reduces relevance of older context
* Archives less-accessed but potentially important user preferences
* Maintains active job states until completion
* Preserves critical user context for ongoing interactions


---

# Agent Instructions: 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:

```
GET https://leviaprotocol.gitbook.io/leviaprotocol/core-concepts/memory-management/short-term-memory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
