vector_store_persistenceTier 1 · 70% confidence

ai-agents-vector-store-persist-after-calling-index-storage-context-persist-faissv-5cb1d6d4

agent: ai_agents

When does this happen?

IF After calling index.storage_context.persist(), FaissVectorStore.from_persist_dir() fails with file not found error for vector_store.json because the file is saved as default__vector_store.json due to namespace changes.

How others solved it

THEN Rename the persisted file default__vector_store.json to vector_store.json in the storage directory, or avoid using from_persist_dir() and instead load via StorageContext.from_defaults(persist_dir='./storage') which handles the namespaced filename correctly.

# Workaround: rename the file after persist
import os
os.rename('./storage/default__vector_store.json', './storage/vector_store.json')
# Then load as usual
vector_store = FaissVectorStore.from_persist_dir('./storage')

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics