https://github.com/dito97/adamemory
adaptive memory layer for agentic AI
https://github.com/dito97/adamemory
agent embeddings hybrid-database long-term-memory memory memory-consolidation state-management
Last synced: about 1 year ago
JSON representation
adaptive memory layer for agentic AI
- Host: GitHub
- URL: https://github.com/dito97/adamemory
- Owner: DiTo97
- License: mit
- Created: 2024-08-22T21:39:52.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-26T08:38:48.000Z (over 1 year ago)
- Last Synced: 2025-06-09T15:57:05.303Z (about 1 year ago)
- Topics: agent, embeddings, hybrid-database, long-term-memory, memory, memory-consolidation, state-management
- Language: Python
- Homepage:
- Size: 152 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π§ adamemory
The adaptive memory layer for agentic AI β like mem0ai but inspired by human cognitive processes.
## π Overview
**adamemory** is a package that implements a dual-memory system combining **short-term memory (STM)** and **long-term memory (LTM)** to efficiently store, retrieve, and consolidate information over time. The architecture mimics natural memory processes, including the decay of unused memories and the consolidation of important information from short-term to long-term storage, keeping the layer flexible and bounded over long-horizon trajectories.
The package is ideal for developers and researchers building intelligent systems that require adaptive memory management, such as conversational agents, autonomous systems, or cognitive simulations.
## βοΈ Installation
To install **adamemory**, simply run:
```bash
python -m pip install adamemory
```
## β¨ Features
- **β‘ Short-Term Memory (STM)**:
- Fast access to recent memories.
- Automatic clearing after consolidation.
- Caching mechanism relative to the slower LTM.
- **πΎ Long-Term Memory (LTM)**:
- Persistent storage of memories with decay over time.
- Recency-weighted nodes and edges prioritizing frequently accessed memories.
- Pruning mechanism to remove outdated or irrelevant information.
- Bounded over long-horizon trajectories while ensuring memory efficacy.
- **π Memory Consolidation**:
- Periodic background consolidation of STM into LTM.
- Weight adjustment mechanism during consolidation to simulate memory strengthening.
- Decay of recency weights for memories not accessed during the consolidation cycle.
- **πΈοΈ Hybrid Storage**:
- Both STM and LTM are implemented using a graph structure.
- Nodes and edges are semantically enriched with contextual embeddings.
## π Usage
```python
# Example usage code will go here
```
## π€ Contributing
Contributions to **adamemory** are welcome! Feel free to submit pull requests or open issues on our repository.
Clone the repository and set up the development environment:
```bash
git clone https://github.com/DiTo97/adamemory.git && cd adamemory
```
Install development dependencies using ``poetry``:
```bash
python -m pip install poetry
poetry install
poetry shell
poetry run pre-commit install
```
## π οΈ Roadmap
- **π Telemetry**: Metrics and usage statistics.
- **ποΈ Hierarchical Architecture**: Community memories for weakly connected components (WCC).
- **π οΈ Memory Consolidation Enhancements**: Improving efficiency and scalability of long-term memory mechanisms and storage.
- **π¨ Multi-Modal Memory**: Audio, text, and vision all at once.
- **π§ Advanced Cognitive Architecture**: More sophisticated architectures that incorporate emotional and contextual factors into memory processes.
## π Telemetry Information
We collect anonymous usage metrics to enhance our package's quality and user experience. This includes data like feature usage frequency and system information, but never personal details. The data helps us prioritize improvements and ensure compatibility. If you wish to opt-out, set the environment variable ``ADAMEMORY_TELEMETRY_ENABLED=false``. For more information on how to disable telemetry, please refer to the documentation [here](adamemory/telemetry.py). We prioritize data security and do not share this data externally.
## π License
See the [LICENSE](LICENSE) file for licensing information.