diff --git a/src/agent.py b/src/agent.py index 04d785a..dc92757 100644 --- a/src/agent.py +++ b/src/agent.py @@ -75,6 +75,7 @@ If the user asks to scrape utility data, run the utility scraper, or fetch utili If they ask for a reminder, use the `set_reminder` tool and pass {target_jid} as the target_jid! """ - agent = create_react_agent(llm, tools, state_modifier=system_prompt) + # Use state_modifier or prompt depending on langgraph version, falling back to older syntax if needed. + agent = create_react_agent(llm, tools, messages_modifier=system_prompt) result = agent.invoke({"messages": [("user", user_request)]}) return result["messages"][-1].content