# alucek/agentic-memory architecture

> Architecture diagram of the GitHub repository alucek/agentic-memory, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alucek/agentic-memory
- Repository: https://github.com/alucek/agentic-memory

## Overview

Key Components to Include in the System Design:

##### Core Memory Architecture
- Working Memory Module
- Episodic Memory Module
- Semantic Memory Module
- Procedural Memory Module

##### LLM Integration Layer
- Bidirectional connections to all memory modules
- RAG (Retrieval-Augmented Generation) component as an intermediary

##### Data Flow and Processing
- Input Layer: Show how external inputs enter the system
- Memory Processing: Illustrate how information flows between memory modules
- Output Generation: Display how responses are formulated

Specific Implementation Details:

##### Working Memory Component
- Temporary storage for current conversation
- Context window representation
- Connections to immediate processing units

##### Episodic Memory Component
- Vector database or storage system
- Experience indexing mechanism
- Retrieval pathways

##### Semantic Memory Component
- Knowledge base integration
- Fact verification pathways
- Knowledge graph representation

##### Procedural Memory Component
- Rule-based system
- Skill execution pathways
- Decision-making logic

Technical Elements to Include:

##### Infrastructure Layer
- Docker container (referenced by docker-compose.yml)
- Jupyter notebook integration (shown by .ipynb files)
- LangGraph framework integration

##### Integration Points
- How langgraph components interface with memory systems
- Data persistence mechanisms
- API endpoints if applicable

##### Use Standard Symbols
- Rectangles for processing components
- Clouds for external services/LLMs

##### Layering
- Core memory architecture (innermost)
- Processing layer (middle)
- Infrastructure layer (outer)

##### Additional Elements
- Version information
- Technology stack references
- External dependencies

Remember to include:
- Clear boundaries between memory systems
- Data flow directions
- Processing steps
- Integration points with LangGraph
- Storage mechanisms
- Input/Output pathways

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Infrastructure
        Docker[Docker Container]
        Jupyter[Jupyter Environment]
        LangGraph[LangGraph Framework]
    end

    subgraph "Core Memory System"
        LLM((Language Learning Model))
        RAG{RAG System}
    end

    subgraph "Memory Modules"
        direction TB
        WM[Working Memory]:::working
        EM[Episodic Memory]:::episodic
        SM[Semantic Memory]:::semantic
        PM[Procedural Memory]:::procedural
    end

    subgraph "Processing Layer"
        Input[Input Processing]
        Output[Output Generation]
        Context[Context Management]
        VDB[(Vector Database)]
        KB[(Knowledge Base)]
    end

    %% Connections
    Input --> RAG
    RAG <--> LLM
    LLM <--> WM
    LLM <--> EM
    LLM <--> SM
    LLM <--> PM
    
    WM <--> Context
    EM <--> VDB
    SM <--> KB
    PM --> Output
    
    %% Infrastructure connections
    LangGraph --> LLM
    Docker --> LangGraph
    Jupyter --> LangGraph

    %% Click events
    click PM "https://github.com/ALucek/agentic-memory/blob/main//procedural_memory.txt"
    click Docker "https://github.com/ALucek/agentic-memory/blob/main//docker-compose.yml"
    click LangGraph "https://github.com/ALucek/agentic-memory/blob/main//langgraph/agentic_memory_langgraph.ipynb"
    click LLM "https://github.com/ALucek/agentic-memory/blob/main//agentic_memory.ipynb"

    %% Styling
    classDef working fill:#6495ED
    classDef episodic fill:#98FB98
    classDef semantic fill:#FFD700
    classDef procedural fill:#FF6B6B
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    
    %% Legend
    subgraph Legend
        WM_L[Working Memory]:::working
        EM_L[Episodic Memory]:::episodic
        SM_L[Semantic Memory]:::semantic
        PM_L[Procedural Memory]:::procedural
    end
```
