Step 17: Memory
Remember me!
Prerequisites
Same as Step 09 - copy the config file and add your API key:
cp default_workspace/config.example.yaml default_workspace/config.user.yaml
# Edit config.user.yaml to add your API keyWhat We Will Build
pickle: @cookie Do you know <topic> about user?
cookie: Yes, <content>.
Key Components
- Memory agent - Specialized agent for memory management
- default_workspace/agents/cookie/AGENT.md
Try it out
cd 17-memory
uv run my-bot chat
# You: Remember that I my name is Zane
# Pickle: Got it! I've saved that preference.
uv run my-bot chat
# User: What's my name?
# Pickle: Based on your memory, you name is Zane! Hi Zane! šøNote
This implementation uses Specialized Agent approach. Alternatives include:
| Approach | Description |
|---|---|
| Specialized Agent (this) | Dedicated memory agent accessed via dispatch |
| Direct Tools | Memory tools in main agent |
| Skill-Based | Using CLI tools like grep |
| Vector Database | Semantic search over embeddings |
Memory Directory Structure (Pickle Bot)
memories/
āāā topics/
ā āāā preferences.md # User preferences
ā āāā identity.md # User info
āāā projects/
ā āāā my-project.md # Project-specific notes
āāā daily-notes/
āāā 2024-01-15.md # Daily journal
What's Next
Deploy, extend, and customize!