Skip to content

feat: implement powermem langchain middleware - #1162

Closed
ddding-z wants to merge 2 commits into
oceanbase:vldb_2026from
ddding-z:vldb_2026
Closed

ddding-z wants to merge 2 commits into
oceanbase:vldb_2026from
ddding-z:vldb_2026

Conversation

@ddding-z

Copy link
Copy Markdown

Summary

Implements PowerMem LangChain middleware with memory retrieval, context injection, and interaction write-back.

Solution Description

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


zyding seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@LINxiansheng

LINxiansheng commented Jul 13, 2026 •

Copy link
Copy Markdown
Member

LangChain Contract Score

LangChain Contract Score
========================
score: 100.00 / 100
suites: 2
rule: A weighted capability receives credit only when it passes on every configured Python suite and all declared prerequisite capabilities also receive credit. Gate tests are reported but do not add points.

Public import contract: PASS (gate)
  py311: passed
  py312: passed
Retrieve memory before model call: PASS (35/35)
  py311: passed
  py312: passed
Persist interaction after agent run: PASS (25/25)
  py311: passed
  py312: passed
Disable interaction persistence: PASS (10/10)
  py311: passed
  py312: passed
Fail-open on search error: PASS (15/15)
  py311: passed
  py312: passed
Async memory injection: PASS (15/15)
  py311: passed
  py312: passed

LangChain Contract Report

LangChain Contract Report
=========================
score: 100.00 / 100
rule: A weighted capability receives credit only when it passes on every configured Python suite and all declared prerequisite capabilities also receive credit. Gate tests are reported but do not add points.

Suite Summary
-------------
py311: passed=6/6, failures=0, errors=0, skipped=0
py312: passed=6/6, failures=0, errors=0, skipped=0

Gate Checks
-----------
Public import contract [gate] PASS
  - py311: passed
  - py312: passed

Weighted Breakdown
------------------
Retrieve memory before model call [35/35] PASS
  - py311: passed
  - py312: passed
Persist interaction after agent run [25/25] PASS
  - py311: passed
  - py312: passed
Disable interaction persistence [10/10] PASS
  - py311: passed
  - py312: passed
Fail-open on search error [15/15] PASS
  - py311: passed
  - py312: passed
Async memory injection [15/15] PASS
  - py311: passed
  - py312: passed

Workflow run

Copy link
Copy Markdown
Member

Thanks for the contribution. I do not think this is ready to merge yet.

Current blockers:

  • The CLA check is still pending for this PR.
  • Please avoid replacing the event loop's default executor from inside the middleware. That is process-wide behavior and can affect host applications. If the middleware needs to bridge sync PowerMem calls from async hooks, please keep it local to the call path, for example with asyncio.to_thread() / awaitable detection.
  • There are several overlapping LangChain middleware submissions open right now. After the CLA and executor issue are addressed, please coordinate with maintainers on which implementation should be kept.

@ddding-z

Copy link
Copy Markdown
Author

Thanks for the contribution. I do not think this is ready to merge yet.

Current blockers:

  • The CLA check is still pending for this PR.
  • Please avoid replacing the event loop's default executor from inside the middleware. That is process-wide behavior and can affect host applications. If the middleware needs to bridge sync PowerMem calls from async hooks, please keep it local to the call path, for example with asyncio.to_thread() / awaitable detection.
  • There are several overlapping LangChain middleware submissions open right now. After the CLA and executor issue are addressed, please coordinate with maintainers on which implementation should be kept.

Thanks for the review.

I will address the CLA check.

I removed the middleware-level replacement of the event loop default executor. The middleware no longer calls set_default_executor or touches the loop executor. The async hooks now keep memory integration logic local to the hook path and preserve awaitable detection.

After the CLA and CI checks are green, I am happy to coordinate on whether this implementation or another overlapping middleware submission should be kept.

@PsiACE PsiACE added the vldb 2026 VLDB 2026 contributions label Jul 14, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vldb 2026 VLDB 2026 contributions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants