Importance scoring: teaching your agent what to remember


Every memory your agent stores is not equally useful. “User’s name is Ana” matters a lot. “The weather was nice during our chat” does not. If your agent treats both the same, recall gets noisy fast. You burn context window tokens on trivia while the information that actually matters gets buried.

MemoClaw’s importance scoring fixes this. Every memory gets a score from 0 to 1, and that score influences what comes back when your agent recalls. Higher importance memories surface first. It’s a simple mechanism with a big effect on agent quality.

How importance scoring works

When you store a memory, you pass an importance value between 0 and 1:

memoclaw store "Ana's deployment pipeline uses GitHub Actions with manual approval" \
  --importance 0.8 --tags infrastructure

When your agent later calls memoclaw recall, the results are ranked by a combination of semantic similarity and importance. A memory with 0.9 importance that’s somewhat relevant will rank above a 0.3 memory that’s slightly more similar in embedding space.

This means your agent’s recall is biased toward information you’ve flagged as worth remembering. Which is exactly what you want.

A scoring heuristic that works

After running MemoClaw across several OpenClaw agents, here’s the scoring framework I keep coming back to:

0.9–1.0: Corrections and hard rules. When a user corrects your agent, that correction should almost always surface in future recalls. Same for explicit rules (“never deploy on Fridays”, “always use UTC”).

memoclaw store "CORRECTION: Do not suggest Vercel for deployments. Ana uses Railway exclusively." \
  --importance 0.95 --tags corrections,infrastructure

0.7–0.8: Preferences and processes. How the user likes things done. Communication style, tool preferences, workflow patterns. These matter, but they’re less urgent than corrections.

memoclaw store "Ana prefers concise answers. Skip the preamble." \
  --importance 0.8 --tags preferences,communication

0.5–0.6: Context and session summaries. Useful background that helps your agent understand the bigger picture, but not something that needs to surface in every recall.

memoclaw store "Session summary: discussed migrating from Postgres to Neon. Decision pending." \
  --importance 0.6 --tags sessions,database

0.2–0.4: Nice-to-know. Observations, casual mentions, things that might be relevant someday but aren’t urgent. Low importance means they only surface when the recall query is very specifically about them.

memoclaw store "Ana mentioned she is attending ETHDenver next month" \
  --importance 0.3 --tags personal,events

Below 0.2: Probably not worth storing at all. If you’re scoring something that low, ask whether it needs to be a memory in the first place.

Auto-scoring patterns for OpenClaw agents

You don’t want to manually assign importance scores for every memory. In practice, your agent’s AGENTS.md or SOUL.md should include heuristics for auto-scoring. Here are patterns that work:

User corrects the agent: importance 0.95. This is the highest-signal information you can get. The user took time to tell you that you were wrong. Always store corrections at near-maximum importance.

User states a preference: importance 0.7–0.8. “I like X” or “don’t do Y” are preference signals. Not as urgent as corrections, but they should consistently surface.

Agent makes a decision: importance 0.7. When your agent chooses an approach and it works (or doesn’t), recording the decision and outcome helps future sessions.

Session ends normally: importance 0.5–0.6. A brief summary of what happened is useful context but shouldn’t dominate recall results.

Casual observation: importance 0.2–0.4. Background information that adds color but isn’t actionable.

Here’s what this looks like in an OpenClaw AGENTS.md:

## Memory rules

When storing memories via MemoClaw:
- User corrections → importance 0.95, tag: correction
- Explicit preferences → importance 0.8, tag: preference  
- Decisions with outcomes → importance 0.7, tag: decision
- Session summaries → importance 0.6, tag: session
- Casual context → importance 0.3, tag: context

Your agent reads this at session start and applies the heuristics automatically. No manual scoring needed.

What happens without importance scoring

If you store everything at the same importance (or don’t set it at all, which defaults to 0.5), recall becomes a pure similarity search. That sounds fine until you realize what it means in practice.

Your agent asks: “How should I respond to Ana?” Recall returns:

  1. A session summary mentioning a conversation about response styles (similarity: high, but it’s a summary, not a directive)
  2. A casual mention that Ana was in a hurry last Tuesday (similarity: medium)
  3. The actual correction where Ana said “be more direct, stop hedging” (similarity: medium-high)

Without importance scoring, result #3 might rank below #1 because the session summary happens to have more overlapping terms. With importance scoring, result #3 (stored at 0.95) jumps to the top where it belongs.

The difference between a good agent and an annoying one is often just this: does it remember what matters?

Adjusting scores over time

Importance isn’t static. Something that was critical six months ago might be irrelevant now. MemoClaw lets you update memories, including their importance scores.

If a process changes:

memoclaw store "Deployment approval now happens in Slack #releases, not #platform" \
  --importance 0.85 --tags process,deployment

And the old memory? You can delete it outright or lower its importance so it stops surfacing:

memoclaw delete MEMORY_ID

Periodic cleanup matters. Every few weeks, have your agent (or yourself) review stored memories and prune the ones that are outdated. High-importance memories that are no longer accurate are worse than no memories at all, because your agent will confidently act on stale information.

Combining importance with tags and namespaces

Importance scoring works best alongside MemoClaw’s other filtering mechanisms. Tags let you categorize memories, namespaces let you isolate them per project.

# Store with full context
memoclaw store "API rate limit is 100 req/min per key" \
  --importance 0.8 --tags api,limits --namespace work-project

# Recall within scope
memoclaw recall "rate limits" --namespace work-project

A well-organized memory store uses all three: namespaces for project isolation, tags for categorization, and importance for ranking. The combination means your agent’s recall returns fewer, more relevant results with the most useful information at the top.

Getting started

If you’re already using MemoClaw without importance scores, start by storing your next few corrections and preferences with explicit scores. You’ll notice the difference in recall quality within a few sessions.

If you’re new to MemoClaw:

clawhub install anajuliabit/memoclaw

Store your first memory with an importance score:

memoclaw store "your first important fact here" --importance 0.8

Then recall it:

memoclaw recall "that fact"

The API reference at https://docs.memoclaw.com covers the full scoring behavior. Free tier gives you 100 calls to experiment with.