Episodic vs Semantic Memory
Agents utilize different kinds of memory to maintain context:
- Episodic Memory: A log of the specific sequence of actions and thoughts from the current session.
- Semantic Memory: Vector-based semantic database lookups containing general knowledge or past interactions.
Episodic Memory Buffer in Python
class EpisodicMemory:
def __init__(self):
self.log = []
def add_step(self, action, result):
self.log.append({"action": action, "result": result})