Skip to content

[agentbricks] Refuse :langgraph actors in SessionStores add/fork - #836

Closed
pshekhar2308 wants to merge 2 commits into
databricks:mainfrom
pshekhar2308:pooja/langgraph-store-actor-guard
Closed

pshekhar2308 wants to merge 2 commits into
databricks:mainfrom
pshekhar2308:pooja/langgraph-store-actor-guard

Conversation

@pshekhar2308

Copy link
Copy Markdown

Summary

  • Guard SessionStores add/fork against :langgraph actor IDs, which are reserved by the LangGraph store adapter and would corrupt managed-memory sessions if passed through directly.
  • Adds unit tests covering the refusal behavior in session_store_test.py.

Test plan

  • Unit tests added for add/fork rejection of :langgraph actors
  • Integration tests (optional — let me know if you want them triggered)

Generated with Devin

Tagar and others added 2 commits October 26, 2026 12:26
…d memory

memory_store() returns DatabricksMemoryStore, a LangGraph BaseStore over the
managed memory API, so LangGraph and LangMem code that takes store= gets
cross-conversation memory with no Postgres connection to run. The user comes
from each run's config (thread_config), so one store serves every user of an
app; entries are kept under the storage actor "<actor>:langgraph", and the
session and memory helpers refuse actors with that suffix. Values are kept in
a small JSON envelope, with optional client-side TTL and a per-user sweep.

Includes unit tests over a wire-level fake of the memory API, a gated live
suite, a README section, and a migration page from DatabricksStore.

Co-authored-by: Isaac <no-reply@databricks.com>
thread_config, memory_tools and the session helpers reject actors
ending in ':langgraph' so automatic memory pipelines never see the
LangGraph store's storage actor, but the typed session SDK still let
callers create a session under that id directly. A session for
<actor>:langgraph makes it discoverable to pipelines, which can
rewrite the store's JSON envelopes.

Apply check_actor in _add_session and _fork_session so the SDK
enforces the same rule, and cover both paths with unit tests.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@pshekhar2308

Copy link
Copy Markdown
Author

Opened against the wrong base — closing and reopening on the intended fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants