Importance scoring patterns — teaching your agent what matters
Not all memories are equal. Your agent knowing your name matters more than it remembering a random API response from last Tuesday. But most memory systems treat every piece of information the same way, stuffing it all into a flat file or database with no sense of priority.
MemoClaw lets you assign importance scores (0 to 1) to every memory. This changes how recall works, what surfaces first, and ultimately how useful your agent’s memory becomes over time.
Why importance matters
Think about how your own memory works. You remember your birthday, your partner’s name, that one time you deleted production. You don’t remember what you had for lunch three Wednesdays ago. Your brain assigns weight to experiences based on emotional impact, repetition, and relevance.
Agents don’t have that instinct. Without explicit scoring, every memory gets equal weight. When your agent recalls “what does the user prefer for deployment,” it might surface a throwaway comment about Docker from six months ago instead of last week’s explicit instruction to use Railway.
Importance scoring fixes that ranking problem.
How it works in MemoClaw
Every store call accepts an importance parameter between 0 and 1:
# High importance: user correction (these should stick)
memoclaw store "User corrected: always use pnpm, never npm" --importance 0.95 --tags corrections
# Medium importance: project context
memoclaw store "Project X deadline is March 15" --importance 0.6 --tags project-x
# Low importance: nice to know
memoclaw store "User mentioned they like dark mode" --importance 0.3 --tags preferences
When you recall memories, the results are ranked by a combination of semantic similarity to your query and importance score. A memory with high importance and decent similarity will outrank a memory with perfect similarity but low importance.
Building an importance framework
I’ve found it helpful to define bands rather than picking arbitrary numbers each time:
0.9-1.0: Corrections and hard rules Things the user explicitly told you to always or never do. “Never commit directly to main.” “Always use TypeScript.” These are the memories your agent should never forget or override.
memoclaw store "NEVER deploy on Fridays - user was very clear about this" \
--importance 1.0 --tags rules --immutable
0.7-0.8: Active project context Current deadlines, tech stack decisions, ongoing work. Important right now, might deprecate later.
memoclaw store "Currently refactoring auth module to use wallet-based auth" \
--importance 0.75 --tags project-x,auth
0.5-0.6: Preferences and patterns User likes and dislikes, workflow habits, tool preferences. Useful background knowledge.
memoclaw store "User prefers concise responses, gets annoyed by verbose explanations" \
--importance 0.55 --tags preferences,communication
0.2-0.4: Contextual details Session-specific information, temporary notes, things that might be useful but won’t matter next week.
memoclaw store "Discussed switching to Bun but decided to stick with Node for now" \
--importance 0.3 --tags decisions,runtime
0.0-0.1: Ephemeral Stuff you’re storing just in case. Log entries, one-off observations.
Teaching your agent to self-score
Here’s where it gets interesting. You don’t need to manually assign importance to every memory. You can teach your OpenClaw agent to score memories on its own.
Add guidance to your agent’s workspace (in TOOLS.md or a memory config file):
### Memory importance scoring
When storing memories, assign importance based on:
- User corrections or explicit instructions: 0.9-1.0
- Active project details: 0.7-0.8
- Preferences and habits: 0.5-0.6
- General context: 0.2-0.4
- Ephemeral notes: 0.0-0.1
Bump importance +0.1 if the user repeated something.
Bump importance +0.2 if the user seemed frustrated when correcting you.
Your agent reads this guidance and applies it when deciding what to store and at what level. Over time, the memory store becomes well-stratified: the important stuff floats to the top during recalls.
Importance and recall in practice
Let’s say your agent has stored 200 memories over a few weeks. You ask it to set up a new project. It runs a recall:
memoclaw recall "project setup preferences and requirements"
Without importance scoring, you might get a random mix of results. With it, the top results are: your preferred tech stack (importance 0.9), your deployment rules (importance 1.0), your code style preferences (importance 0.7). The fact that you once mentioned liking Vim sits at the bottom where it belongs.
Updating importance over time
Priorities change. A project deadline that was importance 0.8 last month might be irrelevant after launch. MemoClaw lets you update importance scores:
memoclaw update <memory-id> --importance 0.1
You can build this into your agent’s workflow. After a project ships, have it lower the importance of project-specific memories. Or flag memories that haven’t been recalled in 30 days for review.
The consolidate endpoint can also help here. It uses GPT-4o-mini to identify redundant or outdated memories and suggest merges or deletions.
Common mistakes
Scoring everything high. If everything is importance 0.9, nothing is. Be honest about what actually matters. Most memories are 0.3-0.6 range.
Never updating scores. Stale high-importance memories create noise. Build a habit of periodic review, either manually or through your agent’s consolidation routine.
Ignoring importance entirely. If you don’t pass an importance score, MemoClaw defaults to 0.5. That’s fine for testing, but you’re leaving value on the table. Even rough scoring (high/medium/low mapped to 0.8/0.5/0.2) is better than nothing.
Getting started
If you’re already using MemoClaw, start adding importance scores to your store calls today. You don’t need to go back and score existing memories right away. Just start with new ones.
If you’re not using MemoClaw yet, install the OpenClaw skill:
clawhub install anajuliabit/memoclaw
Or if you prefer the standalone CLI:
npm install -g memoclaw
Either way, you get 100 free API calls — enough to build out your importance framework and see how ranked recall changes your agent’s behavior.
Check the full docs for the complete API reference, including batch storage, namespaces, and the consolidation endpoint mentioned above.
Your agent’s memory is only as good as its ability to find the right thing at the right time. Importance scoring is how you make that happen.