Brain vs Redis Vector

By Arc Labs Research7 min read

Overview

Redis Vector (formerly RediSearch) is an in-memory vector index extension for Redis. Brain is a memory layer for agents. Both prioritize speed, but solve different problems.

Redis Vector is a fast, in-memory vector store. You push vectors to Redis and query them with sub-millisecond latency. It's ideal for caching and high-throughput search.

Brain is a memory layer that lives inside agent loops. It stores agent context (decisions, outcomes, failed attempts) and retrieves it to inform the next step.

Feature comparison

FeatureRedis VectorBrain
Latency< 5ms (in-memory)< 50ms P99
DeploymentIn-memory cacheSelf-hosted or managed
Primary useFast semantic searchAgent context & decisions
PersistenceOptional (RDB/AOF)Always persistent
Update costFast (in-memory write)Amortized (may batch writes)
ScalingVertical (single machine memory limit)Horizontal (sharding per agent)
Data typesVectors + metadataAgent context (tuples)
Query interfaceCommand-line / client libraryAgent SDK
EvictionLRU / TTL supportedCausal consistency

When to use Redis Vector

  • You need < 5ms query latency
  • Your data fits in memory on a single machine
  • You're caching semantic search results (e.g., embedding cache)
  • You want to reduce latency to a remote vector DB (Pinecone, etc.)
  • You need very high QPS (thousands of queries/sec)

Example: Cache layer in front of a document search service.

import redis

r = redis.Redis(host="localhost")

# Index vectors
r.ft("docs").create_index([
    ("embedding", "VECTOR", {"algorithm": "HNSW"}),
])

# Query with < 5ms latency
results = r.ft("docs").search(
    f"@embedding:[VECTOR_RANGE 0.1 {query_vector}]",
    {"LIMIT": [0, 10]}
)

When to use Brain

  • You're building multi-turn agent loops
  • You need memory of past decisions and outcomes
  • You want semantic + keyword search (hybrid)
  • You need agent-scoped context (per-user, per-conversation)
  • You want persistent memory (not cache)

Example: Agent that remembers conversation context.

const memory = new Brain();

// Store context from last turn
await memory.store({
  agentId: "conv-123",
  content: "User asked about pricing, we discussed enterprise plan",
  type: "decision",
});

// Retrieve on next turn
const context = await memory.retrieve({
  agentId: "conv-123",
  query: "What did we discuss about pricing?",
});

Integration patterns

Redis Vector as cache for Brain: Use Redis Vector to cache hot agent memories. On cache miss, fetch from Brain. Fast path for recent conversations.

Brain + Redis Vector for search: Use Redis Vector for semantic search on a corpus, Brain for agent memory that tracks which corpus results informed which decisions.

// Fast search (Redis)
const documents = await redis.search({
  embedding: queryEmbedding,
  limit: 5,
});

// Agent memory (Brain)
await memory.store({
  agentId,
  content: { documents, decision: "use_first_doc" },
  type: "reasoning",
});

Persistence & durability

Redis Vector: In-memory by default. Optional persistence via RDB (snapshots) or AOF (append-only). Loss of data if Redis crashes and no snapshot exists.

Brain: Always persistent. Cloud version uses durable storage. Guarantees data survives failures.

Operational overhead

Redis Vector: Requires Redis ops (memory limits, clustering for HA). All data must fit in RAM. Scaling beyond single machine needs Redis Cluster (complex).

Brain: Managed Cloud handles ops. Horizontal scaling is built-in.

Pricing & use cases

Redis Vector: Redis hosting (Redis Cloud, self-hosted). Pay per GB of memory. For 1M 1536-dim vectors (~6GB), Redis Cloud Standard: ~$100/month.

Brain: Pay per vector stored + queries. At <1M vectors, typically $1–10/month.

Redis Vector is cheaper if you already use Redis and can share memory with other data. Brain is cheaper if Redis is dedicated to vectors.

Summary

  • Redis Vector: Fast cache for semantic search. Good for high-throughput, latency-sensitive workloads. Volatile (may lose data).
  • Brain: Agent memory for decision-making. Always persistent. Optimized for context that shapes behavior.

Many agents use both: Redis Vector caches recent search results, Brain stores the decisions those results informed.

Related reading

Updates from the lab.

Engineering notes, research drops, occasional product updates. Roughly monthly.