Codemaster67 commited on
Commit
6f6ed4a
·
verified ·
1 Parent(s): f9a8b7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -11,7 +11,9 @@ from langchain_mcp_adapters.client import MultiServerMCPClient
11
  from langchain_google_genai import ChatGoogleGenerativeAI
12
  from langchain.agents import create_agent
13
  from langchain_core.messages import HumanMessage
 
14
 
 
15
 
16
 
17
  # --- GLOBAL STATE ---
@@ -82,7 +84,8 @@ async def initialize_agent(api_key: str = Form(...), model_name: str = Form(...)
82
  agent_executor = create_agent(
83
  llm,
84
  mcp_tools,
85
- system_prompt = system_prompt
 
86
  )
87
 
88
  return {"status": "Success", "message": f"Agent initialized with {model_name}"}
 
11
  from langchain_google_genai import ChatGoogleGenerativeAI
12
  from langchain.agents import create_agent
13
  from langchain_core.messages import HumanMessage
14
+ from langgraph.store.memory import InMemoryStore
15
 
16
+ my_store = InMemoryStore()
17
 
18
 
19
  # --- GLOBAL STATE ---
 
84
  agent_executor = create_agent(
85
  llm,
86
  mcp_tools,
87
+ system_prompt = system_prompt,
88
+ store=my_store
89
  )
90
 
91
  return {"status": "Success", "message": f"Agent initialized with {model_name}"}