The 3 main architectural patterns for implementing semantic memory in LLM agents are:
1) Vector store retrieval (RAG-based)
The most common pattern. When your agent needs context, it runs a similarity search against the current query and pulls the closest matches.
2) Knowledge graphs
Instead of a similarity search, memory is stored as entities and relationships. Your agent retrieves facts by traversing connections between nodes rather than matching embeddings.
3) Hierarchical memory with consolidation
Hermes uses this pattern. It divides memory into layers where facts are extracted from raw sessions and stored separately, so retrieval pulls what your agent actually learned rather than searching through full transcripts.