The --auto-memory flag enables automatic extraction and storage of important information from conversations.
Quick Start
praisonai "My name is John and I prefer Python" --auto-memory
Basic Auto Memory
praisonai "I work at Acme Corp as a software engineer" --auto-memory
Expected Output:
๐ง Auto Memory enabled
โญโ Agent Info โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ ๐ค Agent: DirectAgent โ
โ Role: Assistant โ
โ ๐ง Auto Memory: Enabled โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Response โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Nice to meet you! It's great to know you're a software engineer at Acme โ
โ Corp. How can I help you today? โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
๐พ Memories Extracted:
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Type โ Content โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Entity (Person) โ User works at Acme Corp โ
โ Entity (Role) โ Software Engineer โ
โ Long-term โ User's workplace: Acme Corpโ
โโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
With User Isolation
praisonai "Remember my preferences" --auto-memory --user-id user123
Expected Output:
๐ง Auto Memory enabled (user: user123)
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Response โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ I'll remember your preferences. What would you like me to remember? โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
๐พ Memory stored for user: user123
Combine with Other Features
# Auto memory with session
praisonai "Learn about my project" --auto-memory --session my-project
# Auto memory with planning
praisonai "Plan my learning path" --auto-memory --planning
# Auto memory with metrics
praisonai "Remember this" --auto-memory --metrics
How It Works
- Conversation Analysis: The system analyzes the conversation
- Information Extraction: Important information is identified
- Categorization: Information is categorized (entities, facts, preferences)
- Storage: Memories are stored for future retrieval
- Retrieval: Memories are automatically injected into future conversations
| Type | Description | Example |
|---|
| Entities | People, places, organizations | โUser works at Googleโ |
| Facts | Factual information | โProject deadline is Dec 31โ |
| Preferences | User preferences | โPrefers Python over JavaScriptโ |
| Context | Contextual information | โWorking on ML projectโ |
Use Cases
Personal Assistant
# First conversation
praisonai "I'm learning Rust and prefer hands-on examples" --auto-memory
# Later conversation (memories recalled)
praisonai "Give me a coding exercise" --auto-memory
Expected Output (second conversation):
๐ง Auto Memory enabled
๐ Recalled Memories:
โข User is learning Rust
โข User prefers hands-on examples
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Response โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Since you're learning Rust and prefer hands-on examples, here's a practical โ
โ exercise: โ
โ โ
โ **Exercise: Build a Simple CLI Calculator** โ
โ โ
โ ```rust โ
โ use std::io; โ
โ โ
โ fn main() { โ
โ // Your code here โ
โ } โ
โ ``` โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Project Context
# Share project details
praisonai "I'm building an e-commerce platform using Django and React" --auto-memory
# Ask for help (context remembered)
praisonai "How should I structure my API?" --auto-memory
Team Preferences
# Different team members
praisonai "I prefer detailed explanations" --auto-memory --user-id alice
praisonai "I prefer concise answers" --auto-memory --user-id bob
Viewing Stored Memories
Use the memory command to view whatโs been stored:
# Show memory statistics
praisonai memory show
# Search memories
praisonai memory search "Python"
Expected Output:
Memory Statistics
โโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Property โ Value โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ user_id โ default โ
โ short_term_count โ 5 โ
โ long_term_count โ 12 โ
โ entity_count โ 8 โ
โ storage_path โ .praison/memory/default โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโ
Recent Memories:
โข User prefers Python for backend
โข User works at Acme Corp
โข Project: E-commerce platform
โข Tech stack: Django + React
Memory Persistence
Memories are stored locally and persist across sessions:
.praison/
โโโ memory/
โโโ default/
โ โโโ short_term.json
โ โโโ long_term.json
โ โโโ entities.json
โโโ user123/
โโโ short_term.json
โโโ long_term.json
โโโ entities.json
Best Practices
Use --user-id to keep memories separate for different users or projects.
Auto memory increases token usage as memories are injected into prompts. Monitor with --metrics.
User Isolation
Use --user-id for multi-user scenarios
Regular Cleanup
Periodically clear old memories with praisonai memory clear
Combine with Sessions
Use with --session for project-specific memory
Monitor Usage
Use --metrics to track memory-related token costs
Privacy Considerations
Memories are stored locally on your machine. No data is sent to external servers for memory storage.
- Memories are stored in
.praison/memory/
- Use
praisonai memory clear all to delete all memories
- Each user ID has isolated memory storage