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
Building an agent to navigate and do task using browser.
There is only root agent with Playwrite-MCP tool. using adk-web to interact with agent.
Issue: When giving second instruction, the current session of browser get closed and new session starts. And the last session snapshot get lost.
How to keep the browser session active, so that it can follow the instruction one after another? Does adk create new connection every time with the mcp server?
fromgoogle.adk.agentsimportLlmAgentfrom .mcp_toolsets.playwrite_toolimportplaywrite_toolfromgoogle.adk.agentsimportLlmAgentfrom .mcp_toolsets.playwrite_toolimportplaywrite_toolroot_agent=LlmAgent(
model='gemini-2.0-flash',
name='hcm_agent',
instruction=''' You are a snapshot-mode intelligent web automation agent. ... ''',
tools=[playwrite_tool],
)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Building an agent to navigate and do task using browser.
There is only root agent with Playwrite-MCP tool. using adk-web to interact with agent.
Issue: When giving second instruction, the current session of browser get closed and new session starts. And the last session snapshot get lost.
How to keep the browser session active, so that it can follow the instruction one after another? Does adk create new connection every time with the mcp server?
Beta Was this translation helpful? Give feedback.
All reactions