Build procedural memory for agents that improves over time.
What Is CM?
CM (CASS Memory System) gives AI agents effective memory by extracting lessons from past sessions and making them retrievable for future work.
Think of it like how humans learn: you encounter a problem, solve it, and remember the solution. CM does this for your agents automatically.
Lesson Extraction
Automatically extract rules from past sessions
Context Retrieval
Get relevant rules before starting tasks
Anti-Patterns
Learn what NOT to do from past mistakes
Continuous Learning
Memory improves with every session
How It Works
Onboarding: Building Your Playbook
The cm onboard command guides you through analyzing past sessions and extracting valuable rules:
cm onboard statusCheck status and see recommendations
cm onboard sample --fill-gapsGet sessions filtered by playbook gaps
cm onboard read /path/session.jsonl --templateRead session with rich context
cm playbook add "rule" --category "category"Add extracted rules
cm onboard mark-done /path/session.jsonlMark session as processed
Essential Commands
Using Context Before Tasks
Before starting complex tasks, retrieve relevant context from your playbook:
$ cm context "implement user authentication" --json{"relevantBullets": [{"id": "b-8f3a2c","rule": "Always use bcrypt with cost factor ≥12 for password hashing","category": "security"},{"id": "b-2d4e1f","rule": "Store JWT secrets in environment variables, never in code","category": "security"}],"antiPatterns": [{"id": "ap-9c7b3d","pattern": "Using MD5 for password storage","consequence": "Trivially reversible, security vulnerability"}],"historySnippets": [{"session": "2025-01-10.jsonl","summary": "Implemented OAuth2 flow with refresh tokens"}],"suggestedCassQueries": ["authentication error handling","JWT refresh token"]}
The Memory Protocol
START
Run cm context "<task>" --json before non-trivial work
WORK
Reference rule IDs when following them (e.g., "Following b-8f3a2c...")
FEEDBACK
Leave inline comments when rules help or hurt
END
Just finish your work. Learning happens automatically.
// Feedback format in code:// [cass: helpful b-8f3a2c] - bcrypt recommendation prevented weak hashing// [cass: harmful b-xyz123] - this rule didn't apply to async context
Rule Categories
debuggingProblem-solving techniques
securitySecurity best practices
performanceOptimization patterns
architectureDesign decisions
testingTest strategies
toolingTool-specific knowledge
Best Practices
Run cm context before complex tasks
Don't reinvent the wheel—check what you've learned
Extract specific, actionable rules
'Use bcrypt cost ≥12' is better than 'be secure'
Include anti-patterns
What NOT to do is as valuable as what to do
Categorize rules properly
Makes retrieval more accurate
Provide feedback on rules
Helps the system learn which rules are actually useful
Try It Now
1# Check your playbook status2$ cm onboard status34# Get context for your current task5$ cm context "refactor database queries" --json67# See what sessions need analysis8$ cm onboard sample --fill-gaps