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 key

What We Will Build

pickle: @cookie Do you know <topic> about user? cookie: Yes, <content>.

Key Components

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:

ApproachDescription
Specialized Agent (this)Dedicated memory agent accessed via dispatch
Direct ToolsMemory tools in main agent
Skill-BasedUsing CLI tools like grep
Vector DatabaseSemantic 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!