Skip to content

Persist chat history metadata in OpenSearch for multi-instance backends #1073#1111

Open
kowshik24 wants to merge 1 commit intolangflow-ai:mainfrom
kowshik24:feat/1073-persist-chat-history-db
Open

Persist chat history metadata in OpenSearch for multi-instance backends #1073#1111
kowshik24 wants to merge 1 commit intolangflow-ai:mainfrom
kowshik24:feat/1073-persist-chat-history-db

Conversation

@kowshik24
Copy link

Issue: #1073

Summary:

  • Reworked chat metadata persistence from local JSON-file storage to an OpenSearch-backed service, including a dedicated chat_conversation_metadata index schema and async CRUD operations, with in-memory fallback retained for resiliency when OpenSearch is unavailable.
  • Updated startup index initialization so the backend automatically creates the chat conversation metadata index during boot, enabling shared metadata across horizontally scaled instances.
  • Updated chat history paths to await async metadata retrieval and aligned agent helpers with async conversation metadata access so history reads/writes flow through centralized storage logic.
  • Added unit tests for OpenSearch-backed storage/retrieval behavior and fallback behavior when OpenSearch is unavailable.

Testing:
- ⚠️ pytest -q tests/unit/test_conversation_persistence_service.py (fails in this environment due to missing pytest_asyncio dependency).
- ✅ python -m compileall src tests/unit/test_conversation_persistence_service.py

@github-actions github-actions bot added community backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) tests labels Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) community tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant