Redis for AI Agents
Temporal-associative memory that combines recency, intersection, and reinforcement to retrieve the right context at the right time.
$ pip install cuemap
$ npm install cuemap
$ docker run -p 8080:8080 cuemap/engine:latest
Best for: Semantic search, exploration
Best for: Key-value storage, caching
Best for: AI agent memory, state management
"Your brain doesn't do semantic search when you recall your password. It uses cues (server + password) to retrieve the most recent memory."
CueMap mimics this mechanism:
Memories matching multiple cues rank higher
Recent memories are more accessible
Frequently accessed memories stay "front of mind"
If this sounds right → pip install cuemap or npm install cuemap
Building a booking agent that needs to track the current destination
Semantic search may return "Paris" due to high similarity scores, even though "London" is the current intent.
Simple key-value overwrites lose history. You'd need manual versioning with ZSETs.
client.add("London", cues=["session_123", "destination"])
# Get current destination (0.3ms, deterministic)
current = client.recall(["session_123", "destination"])[0]
# → Returns "London" (latest state)
# History is preserved for context
history = client.recall(["session_123", "destination"], limit=10)
# → ["London", "Paris", ...]
Acts like a version-controlled variable store
Coding copilot needs exact documentation chunk, not 20 similar ones
May return multiple similar chunks (deprecated, advanced, basic versions), requiring post-processing.
Multi-dimensional filtering requires complex ZSET intersections and manual management.
# Surgical extraction at intersection of 4 dimensions
docs = client.recall([
"pandas",
"read_csv",
"v2.0",
"beginner_friendly"
])
# Returns EXACTLY the right chunk
# Sorted by latest documentation update
# Zero token waste
This isn't search. It's surgical extraction.
"What happened in Project X while I was sleeping?"
Embedding-based search adds latency. Not ideal for real-time, high-frequency queries.
LPUSH works for simple feeds, but filtering requires fetching all items or complex ZSET operations.
# User refreshes feed
feed = client.recall([
"project_x",
"urgent",
"user_mention_tom"
], limit=10)
# Intersection: Only items matching ALL tags
# Recency: Pre-sorted by time
# Speed: Renders in 1ms
CueMap is a personalized feed engine out of the box
CueMap excels at multi-dimensional, time-aware queries where explicit cue intersection matters more than semantic similarity.
pip install cuemap
from cuemap import CueMap
client = CueMap()
# Add with explicit cues
client.add(
"Server password is abc123",
cues=["server", "password", "credentials"]
)
# Recall by cues
results = client.recall(["server", "password"])
print(results[0].content)
# → "Server password is abc123"
npm install cuemap
import CueMap from 'cuemap';
const client = new CueMap();
// Add with explicit cues
await client.add(
"Server password is abc123",
["server", "password", "credentials"]
);
// Recall by cues
const results = await client.recall(["server", "password"]);
console.log(results[0].content);
// → "Server password is abc123"
docker run -p 8080:8080 cuemap/engine:latest
Or from source:
git clone https://github.com/cuemap-dev/engine
cd engine
cargo build --release
./target/release/cuemap-rust