feat: add cross-bank querying — multi-bank recall and reflect#578
Open
bjornslib wants to merge 1 commit intovectorize-io:mainfrom
Open
feat: add cross-bank querying — multi-bank recall and reflect#578bjornslib wants to merge 1 commit intovectorize-io:mainfrom
bjornslib wants to merge 1 commit intovectorize-io:mainfrom
Conversation
Add CrossBankOrchestrator for querying across multiple memory banks:
- BudgetAllocator with equal/proportional/custom strategies
- Reciprocal Rank Fusion (k=60) for merging results
- Disposition reconciliation for multi-bank reflect
- HTTP endpoints: POST /v1/{tenant}/cross-bank/recall and /reflect
- MCP tools: cross_bank_recall, cross_bank_reflect
- Comprehensive unit tests (1400+ lines)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
Thought that supporting multiple banks when querying was important, as some questions will stretch across banks. I hope that this works fine with the new instances concept you introduced, likely for the Hindsight Cloud version. |
nicoloboschi
requested changes
Mar 16, 2026
Collaborator
nicoloboschi
left a comment
There was a problem hiding this comment.
I think cross-bank operations are really off of the current model in terms of security, quality, performance and general understanding of the project.
have you tried using tags to isolate data inside a single bank?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /v1/{tenant}/cross-bank/recalland/v1/{tenant}/cross-bank/reflectcross_bank_recall,cross_bank_reflectMotivation
Currently each bank is an isolated memory store with no way to query across banks. Many use cases (multi-agent systems, federated knowledge) need to search and reason across multiple banks simultaneously while respecting per-bank dispositions and access controls.
New files
hindsight-api-slim/hindsight_api/engine/cross_bank.py— Orchestrator, allocator, fusionhindsight-api-slim/hindsight_api/api/cross_bank_models.py— Pydantic request/response modelshindsight-api-slim/tests/test_cross_bank.py— Unit testshindsight-api-slim/tests/test_mcp_tools.py— MCP tool testsModified files
api/http.py— Two new cross-bank endpointsapi/mcp.py— Register cross-bank toolsengine/memory_engine.py— CrossBankOrchestrator property + initializationmcp_tools.py— Cross-bank tool implementationsTest plan
uv run pytest tests/test_cross_bank.py tests/test_mcp_tools.py -v🤖 Generated with Claude Code