An agent can have thousands of memories stored. Injecting all of them into context on every message would be impossible and counterproductive. Semantic selection solves this problem.

When a new message arrives, the selection system analyzes its content and identifies the most relevant memories. Selection combines multiple signals: semantic proximity, recency, recall frequency, and importance.

The result is context enriched with exactly the right memories. The agent appears to remember relevant information naturally, like a human colleague who knows the project well.

1

Message analysis

The incoming message is transformed into a semantic vector and analyzed to extract key themes and entities.

2

Vector search

Semantically close memories are identified via a search in the vector database (Qdrant, pgvector).

3

Multi-criteria scoring

Each candidate memory receives a combined score: semantic relevance (40%), recency (20%), recall frequency (20%), importance (20%).

4

Selection

The top N scored memories are selected (N is configurable, typically 5-15).

5

Injection

Selected memories are injected into the agent's context, in a dedicated section, before the agent formulates its response.

Project continuity

A user resumes a project after a 2-week absence. On their first message mentioning the project name, the agent automatically recalls the latest technical choices.

Implicit preferences

A user mentions they're working on a React component. The agent remembers that this user prefers strict TypeScript and hooks over classes.

Multi-user

Each user has their own set of memories. When Alice mentions the dashboard, the agent remembers the EasyBoard dashboard. When Bob mentions it, it remembers the Monitoring dashboard.

featurePages.memorySelection.config
  • Active by default on all EasyClaw v2 agents
  • Requires a vector backend (Qdrant, pgvector, or Cognee)
  • Works in synergy with Extract-Memories and Auto-Dream
Semantic Memory Selection -- EasyClaw v2