Open
Conversation
…nt into feat/browser_external_cdp
…nt into feat/browser_external_cdp
…implementation with lifecycle logging
…nt into feat/browser_external_cdp
…nt into feat/browser_external_cdp
…nt into feat/browser_external_cdp
Collaborator
Author
|
Need this camel pr https://github.com/camel-ai/camel/pull/3666/files |
…-ai/eigent into feat/browser_external_cdp
a7m-1st
reviewed
Jan 15, 2026
Collaborator
a7m-1st
left a comment
There was a problem hiding this comment.
Thanks @nitpicker55555 for the PR, I have added some enhancements in #849, I figured ListenerAgent.clone is the main focus (btw according to the callstack its mostly triggered when workforce.reset() is called :) ) but generally can't find logic issues.
I analyzed if the cdp clone operation was only happening for search agents only as it should be and bcz of the _cdp_acquire_callback it seems search_agent is the only one that has it 👍
Collaborator
Clone Operation Overview%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor':'#ffffff', 'primaryBorderColor':'#cccccc', 'background':'#ffffff', 'mainBkg':'#ffffff', 'secondBkg':'#ffffff', 'tertiaryColor':'#ffffff'}}}%%
sequenceDiagram
participant P as Parent Agent (ListenChatAgent)
participant M as CDP Manager (_cdp_pool_manager)
participant TK as Toolkit (HybridBrowserToolkit)
participant A as New Agent (Cloned)
Note over P: clone(with_memory=True/False)
P->>P: Generate Clone ID & unique Session ID
rect rgb(230, 240, 255)
Note right of P: CDP Pre-acquisition (If callback exists)
P->>M: acquire_browser(cdp_browsers, new_session_id)
M-->>P: Return Port (e.g., 9223)
P->>TK: Temporarily change CDP URL to localhost:9223
end
P->>P: _clone_tools() (Deep copy of tool definitions)
rect rgb(255, 240, 230)
Note right of P: Restore Parent State
P->>TK: Restore original CDP URL (e.g., localhost:9222)
end
P->>A: Instantiate ListenChatAgent with cloned tools
P->>A: Copy Metadata (task_id, callbacks, options)
Note over A: Post-Init Configuration
A->>A: find HybridBrowserToolkit in cloned tools
A->>A: Set _browser_toolkit & _cleanup_callback
alt with_memory is True
P->>P: memory.retrieve() (Get all records)
P->>A: memory.write_record() (Populate history)
end
P-->>User: Return New Agent
|
…-ai/eigent into feat/browser_external_cdp
# Conflicts: # backend/app/service/chat_service.py # backend/app/utils/agent.py # backend/app/utils/single_agent_worker.py # backend/app/utils/toolkit/hybrid_browser_toolkit.py # electron/main/index.ts # electron/preload/index.ts # src/pages/Dashboard/Browser.tsx # src/store/chatStore.ts
…nt into feat/browser_external_cdp # Conflicts: # backend/app/agent/toolkit/hybrid_browser_toolkit.py # backend/app/service/chat_service.py # backend/app/utils/agent.py # backend/app/utils/listen/toolkit_listen.py
- listen_chat_agent.py: keep lock-protected clone with try/except/finally - workforce.py: adopt release_by_task instead of clear_all for precise cleanup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
What is the purpose of this pull request?