ReACT agent save and resume #27255
Unanswered
HasnainKhanNiazi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I am working on a single ReACT agent which is a chatbot with three different tools and I want to save the agent state with all the user_questions, agent_answers with scrathpad and reasoning steps so that I can resume the chat later. I found
save
method in the agents but I am getting this error:NotImplementedError: Agent runnable=RunnableAssign(mapper={ agent_scratchpad: RunnableLambda(lambda x: format_log_to_str(x['intermediate_steps'])) }) | PromptTemplate(input_variables=['agent_scratchpad', 'user_query'], input_types={}, partial_variables={'tools': 'ask_user(message: str) - This tool can be used to ask a question to a user', 'tool_names': 'ask_user'}, template='\nYou are bot ......) | RunnableBinding(bound=ChatAnthropic(callbacks=[<__main__.LoggingHandler object at 0x168333250>], model='claude-3-5-sonnet-20240620', temperature=0.6, anthropic_api_url='https://api.anthropic.com', anthropic_api_key=SecretStr('**********'), model_kwargs={}), kwargs={'stop': ['\nObservation']}, config={}, config_factories=[]) | ReActSingleInputOutputParser() input_keys_arg=[] return_keys_arg=[] stream_runnable=True does not support saving
Is there any way to save the agent as a file to resume it later?
System Info
platform: macOS
python version: 3.10.14
langchain==0.3.0
langchain-anthropic==0.2.1
langchain-community==0.3.0
langchain-core==0.3.0
langchain-experimental==0.3.0
langchain-openai==0.2.1
langchain-text-splitters==0.3.0
langchainhub==0.1.20
Beta Was this translation helpful? Give feedback.
All reactions