diff options
| author | batsumaru <> | 2026-09-11 17:39:50 +0900 |
|---|---|---|
| committer | batsumaru <> | 2026-09-11 17:39:50 +0900 |
| commit | d0bbd8aeea139ca4bf4ed37020c71c60a65f0a95 (patch) | |
| tree | a369d961de87df23359ad2e8931a04b5cbe6d40a /agent.py | |
| parent | c90a0f8ae6ad5d6e07927cd0dc53b345a77494ae (diff) | |
Added weather, file system, and memory
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(), ) |
