Persistent learning from routing decisions and user preferences
The Memory System enables switchAILocal to learn from every routing decision, building a persistent knowledge base of user preferences, provider quirks, and performance patterns.
The Memory System provides a comprehensive CLI for management:
Status
History
Preferences
Export
Reset
Check memory system health and disk usage:
Copy
Ask AI
switchAILocal memory status
Example Output:
Copy
Ask AI
switchAILocal Memory System Status==================================Status: ✓ HealthyBase Directory: /Users/user/.switchailocal/memoryEnabled: trueStatistics: Total Routing Decisions: 15,234 Total Users: 12 Total Provider Quirks: 8 Disk Usage: 45.2 MB Newest Decision: 2026-03-09T14:23:45Z Oldest Decision: 2025-12-09T09:15:30ZConfiguration: Retention Days: 90 Compression Enabled: true Last Cleanup: 2026-03-09T00:00:00ZDaily Logs: Total Files: 90 Total Entries: 15,234 Disk Usage: 42.1 MB
View recent routing decisions:
Copy
Ask AI
# View last 100 decisionsswitchAILocal memory history# View last 50 decisionsswitchAILocal memory history --limit 50# View decisions for specific API keyswitchAILocal memory history --api-key-hash sha256:abc123...
# View preferences for API keyswitchAILocal memory preferences --api-key sk-test-123# Or use the hash directlyswitchAILocal memory preferences --api-key-hash sha256:abc123...
Exporting memory data to: switchailocal-memory-20260309-142345.tar.gz✓ Export completed successfully Archive size: 45.2 MB Contains all memory data from: /Users/user/.switchailocal/memory
Creating automatic backup before reset...Backup file: memory-backup-before-reset-20260309-142345.tar.gz✓ Backup created successfullyProceeding with reset...✓ Memory system reset successfully Removed directory: /Users/user/.switchailocal/memory Backup available: memory-backup-before-reset-20260309-142345.tar.gz💡 Run 'switchAILocal memory init' to reinitialize the memory system.💡 To restore from backup: tar -xzf memory-backup-before-reset-20260309-142345.tar.gz -C ~/
intelligence: feedback: enabled: true hash-api-keys: true # Never store raw API keys redact-content: true # Never store content anonymize-stats: true # Aggregate stats without user tracking
# Check current disk usageswitchAILocal memory status# Export before cleanupswitchAILocal memory export --output backup-before-cleanup.tar.gz# Reset to free all spaceswitchAILocal memory reset --confirm# ReinitializeswitchAILocal memory init