From bc7c5009f9e312bf32128d331106064fe0b702d1 Mon Sep 17 00:00:00 2001 From: Eric Phillips Date: Thu, 12 Feb 2026 22:28:44 -0700 Subject: [PATCH] basic ephemeral history --- agent/history.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 agent/history.py diff --git a/agent/history.py b/agent/history.py new file mode 100644 index 0000000..c9ef133 --- /dev/null +++ b/agent/history.py @@ -0,0 +1,13 @@ +# agent/history.py +class ConversationHistory: + def __init__(self): + self.messages: list[dict] = [] + + def add_message(self, role: str, content: str): + self.messages.append({"role": role, "content": content}) + + def get_all(self) -> list[dict]: + return self.messages + + def clear(self): + self.messages = []