π§ Memory Demo Agent
The Memory Demo Agent showcases multi-layered memory system capabilities in SuperOptiX. This demo focuses specifically on how to configure and use memory systems for context retention and knowledge persistence.
π― What This Demo Shows
This demo demonstrates:
- π§ Memory Integration: How to configure memory systems in SuperOptiX agents
- ποΈ Multi-Layered Memory: Short-term, long-term, and episodic memory
- π Context Retention: How agents remember and use past information
- βοΈ Playbook Configuration: How to set up memory in agent playbooks
π Setup Memory Demo
1. Install Ollama Model
2. Start Ollama Server
3. Pull and Run the Demo
Bash
# Pull the Memory demo agent
super agent pull memory_demo
# Compile the agent
super agent compile memory_demo
# Run the agent
super agent run memory_demo --goal "What memory systems are available and how do they work?"
π§ Memory Configuration in Playbook
The Memory demo showcases how to configure memory systems in the agent playbook:
Language Model Configuration
YAML
language_model:
location: local
provider: ollama
model: llama3.2:8b
api_base: http://localhost:11434
temperature: 0.7
max_tokens: 2048
Memory Configuration
YAML
memory:
enabled: true
short_term:
enabled: true
max_tokens: 1000
storage_type: in_memory
long_term:
enabled: true
storage_type: local
max_entries: 100
persistence_path: ./data/memory/long_term
episodic:
enabled: true
max_episodes: 50
storage_type: local
persistence_path: ./data/memory/episodic
Key Memory Configuration Points:
- β
enabled: true
: Enables memory functionality - β‘
short_term
: Immediate context retention (1000 tokens) - πΎ
long_term
: Persistent knowledge storage (100 entries) - π
episodic
: Conversation episode memory (50 episodes) - ποΈ
storage_type
: Local file storage for persistence - π
persistence_path
: Local storage directories
π§ Memory: Your AI's Brain
Memory systems give your AI agent the ability to learn, remember, and build relationships over time. It's like giving your AI a brain that grows smarter with each interaction:
ποΈ Three-Layer Memory Architecture
- β‘ Short-term Memory: Holds the current conversation context (like your working memory)
- πΎ Long-term Memory: Stores important facts and knowledge permanently (like your long-term memory)
- π Episodic Memory: Remembers past conversations and experiences (like your episodic memory)
π― Key Benefits
- π Context Continuity: Maintains conversation flow across multiple interactions
- π Learning Over Time: Builds knowledge and improves responses with experience
- π€ Personalization: Remembers user preferences and adapts accordingly
- π Relationship Building: Creates meaningful, ongoing relationships with users
π§ Customizing Memory Configuration
Adjust Memory Settings
Edit agents/memory_demo/playbook/memory_demo_playbook.yaml
:
YAML
memory:
short_term:
max_tokens: 2000 # More context
long_term:
max_entries: 200 # More persistent storage
episodic:
max_episodes: 100 # More episodes
Change Storage Type
YAML
memory:
long_term:
storage_type: database # Use database instead of local files
connection_string: "sqlite:///memory.db"
Disable Memory Types
YAML
memory:
short_term:
enabled: false # Disable short-term memory
long_term:
enabled: true
episodic:
enabled: true
π¨ Troubleshooting Memory
Common Issues
-
Ollama Server Not Running
-
Memory Not Working
-
Memory Storage Issues
Getting Help
Bash
# Check agent status
super agent inspect memory_demo
# View agent logs
super agent logs memory_demo
# Get memory help
super agent --help
π Related Documentation
- Agent Development - Building custom agents