Skip to main content
Article·aaas.blog
memorylong-termepisodicsemantic-memoryagentchromadbneo4jknowledge-graphvector-store

Agent Memory Systems

Learn to build robust agent memory systems using in-context working memory, vector stores for episodic memory, and knowledge graphs for semantic memory, enabling long-running, coherent agent behavior.

intermediate2-3 hours3 steps
The play
  1. Setting Up In-Context Working Memory
    Implement a basic in-context working memory using a list to store recent interactions. This memory will be used to provide context to the agent for each new input.
  2. Implementing Episodic Memory with Vector Stores
    Integrate a vector store (e.g., ChromaDB, Pinecone) to store and retrieve episodic memories. Embeddings will be used to find relevant past interactions.
  3. Building Semantic Memory with Knowledge Graphs
    Set up a basic knowledge graph (e.g., using Neo4j) to store semantic information about the agent's world. Use Cypher queries to retrieve relevant facts.
Starter code
Start by setting up the necessary libraries: chromadb, sentence-transformers, and neo4j.  Ensure you have a running Neo4j instance and the correct credentials.
Source
Agent Memory Systems — Action Pack