diff options
Diffstat (limited to 'agent.py')
| -rw-r--r-- | agent.py | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -4,6 +4,7 @@ from context import ContextBuilder from identity import AgentIdentity, UserProfile from llm import LLM from tools import ToolRegistry +from memory import WorkingMemory class Agent: @@ -22,14 +23,16 @@ class Agent: user_profile, ) - self.messages: list[dict[str, object]] = [ - { - "role": "system", - "content": self.context.build_system_prompt(), - } - ] + self.working_memory = WorkingMemory( + objective="Testing working memory", + facts=["The user is testing the agent's working memory system."], + notes=["This is temporary test data."], + ) + + self.messages: list[dict[str, object]] = [] def chat(self, user_input: str) -> str: + self.messages.append( { "role": "user", @@ -39,7 +42,10 @@ class Agent: for _ in range(5): response = self.llm.chat( - self.messages, + self.context.build_messages( + self.messages, + self.working_memory, + ), tools=self.tools.schemas(), ) |
