core/conversation/¶
Overview¶
The conversation/ submodule manages conversation history and persistent memory.
Files¶
- conversation.py: Contains the
ConversationManagerclass for managing the conversation history and message flow. - memory.py: Implements the
MemoryManagerclass for saving, loading, and updating persistent memory (conversations, files created/modified).
Key Classes¶
- ConversationManager: Handles the conversation history, message addition, and system message updates.
- MemoryManager: Manages persistent memory, including conversations and file tracking.
How Conversation & Memory Work¶
- Every message (user, agent, tool) is added to the conversation history.
- System messages are updated to keep the agent on track.
- MemoryManager saves conversations and file changes to disk.
- On startup, memory is loaded so the agent can pick up where it left off.
Example: Remembering a File¶
- The agent creates a file. The path is added to memory.
- On the next run, the agent can see what files it created or modified before.
In Plain English¶
- This part of the agent is like a notebook: it remembers every conversation and every file it touches, so it never loses track of what it's done.
Responsibilities¶
- Track and manage all agent conversations
- Persist memory across runs
- Support context-aware and stateful agent behavior