class MemoryAgent: def __init__(self): self.data = [] def save(self, key, value): self.data.append((key, value)) def retrieve(self, query): return [v for k, v in self.data if query.lower() in k.lower()]