You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.
Example Code
def_prep_messages(state, config, store):
# For store usage_prompt=NoneifstoreisnotNone:
namespace= (config['configurable'][configurable_by],)
result=store.get(namespace, "info")
if"data"inresult:
_prompt=result["data"]
if_promptisNone:
_prompt=system_prompt_system_message=SystemMessage(content=_prompt)
return [_system_message] +state["messages"]
Error Message and Stack Trace (if applicable)
asyncio.exceptions.InvalidStateError: Synchronous calls to BatchedStore detected in the main event loop. This can lead to deadlocks or performance issues. Please use the asynchronous interface for main thread operations. Specifically, replace `store.get(...)` with `await store.aget(...)
Description
I'm trying to use store with create_react_agent. But it wont let me pass in a function that uses store in sync manner. and if i change to async function, create_react_agent doesn't accept it
OS: Darwin
OS Version: Darwin Kernel Version 22.3.0: Thu Jan 5 20:50:36 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6020
Python Version: 3.11.7 (main, Nov 16 2024, 15:15:25) [Clang 14.0.0 (clang-1400.0.29.202)]
Package Information
langchain_core: 0.3.28
langchain: 0.3.8
langchain_community: 0.3.8
langsmith: 0.1.146
langchain_anthropic: 0.3.0
langchain_openai: 0.2.9
langchain_text_splitters: 0.3.2
langgraph_api: 0.0.14
langgraph_cli: 0.1.65
langgraph_license: Installed. No version info available.
langgraph_sdk: 0.1.48
langgraph_storage: Installed. No version info available.
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
I'm trying to use store with create_react_agent. But it wont let me pass in a function that uses store in sync manner. and if i change to async function, create_react_agent doesn't accept it
System Info
(multi-agent-testing) ➜ multi-agent-testing git:(main) ✗ python -m
langchain_core.sys_info
System Information
Package Information
Optional packages not installed
Other Dependencies
The text was updated successfully, but these errors were encountered: