v2.7.3

July 14, 2026

Search knowledge in Valkey with vectors and keywords

Valkey also lands as a vector store, and it runs both vector and keyword search from the same backend. You can do semantic and lexical retrieval over one in-memory store.

from agno.knowledge.knowledge import Knowledge
from agno.vectordb.valkey import ValkeyDB
from agno.vectordb.search import SearchType

vector_db = ValkeyDB(
    index_name="agno_docs",
    host="localhost",
    port=6379,
    search_type=SearchType.vector,  # or SearchType.keyword
)

knowledge = Knowledge(vector_db=vector_db)


Standing up a vector store usually means running one more service alongside your cache. If Valkey is already in your stack for sessions, your knowledge base can live in the same instance, and because it's in memory the lookups stay quick as it grows.

See the Valkey vector store docs for setup.