Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@priyansh4320
Copy link
Collaborator

Why are these changes needed?

fix for memory overwrite with conflicting context variable with CoversableAgent

Related issue number

#2067

Checks

@joggrbot
Copy link

joggrbot bot commented Sep 2, 2025

📝 Documentation Analysis

Joggr found 10 outdated docs in the pull request.

Autofix

Joggr opened 1 pull request(s) to fix the outdated docs.

Outdated

file reason confidence
website/docs/user-guide/reference-agents/docagent.mdx The code change in document_agent.py removes the explicit initialization of the 'context_variables' attribute, but the documentation only mentions 'context variables' within illustrative logs and workflow description, not in a way that would mislead users about usage or API details. The role and concept of context variables remain accurate for the reader's understanding. 27.5%
website/docs/user-guide/reference-tools/index.mdx The code changes involve an internal refactor to parameters/class names in the web search preview tool and the removal of unused context variables from the document agent, but the documentation only provides an overview of available reference tools without listing implementation specifics. The intent and utility of the documentation remain intact. 20.5%
website/docs/user-guide/reference-agents/index.mdx The document provides overviews and descriptions of various reference agents (including DocAgent and WebSurferAgent), but does not mention low-level implementation details or specific class APIs, so the code changes do not affect the intent or accuracy of this documentation. 15.4%
website/docs/user-guide/reference-agents/deepresearchagent.mdx The provided code changes relate to internal variable removal in a DocumentAgent class and parameter updates in a web search tool, but there is no clear indication that these changes directly affect the DeepResearchAgent documentation or its described workflow and concepts. 14.2%
website/docs/user-guide/advanced-concepts/pattern-cookbook/triage_with_tasks.mdx The code changes do not impact the pattern, workflow, concepts, APIs, or implementation described in this document. The removed context variables in document_agent.py are internal to the document agent class and do not affect the Triage with Tasks pattern or its implementation; the other change relates to a web search tool unrelated to this doc. 12.8%
website/docs/user-guide/reference-agents/websurferagent.mdx The documented WebSurferAgent focuses on high-level usage and supported tools and was not affected by changes to web_search_preview or document agent context management. Both code changes were minor refactorings or targeted other internal tools, leaving the documented interfaces and intent intact. 12.5%
website/docs/user-guide/reference-tools/browser-use.mdx The code changes involve internal refactoring and parameter renaming for a web search tool and context variable handling, but the documentation is about Browser Use, which is unrelated to these code sections. Thus, it's very unlikely the document is outdated. 12.5%
website/docs/_blogs/2025-02-13-DeepResearchAgent/index.mdx The code changes involve internal refactoring and renaming of parameters related to context variables and web search tooling, but the DeepResearchAgent blog document provides high-level conceptual information and usage, not specific implementation or parameter detail. The documentation intent is unaffected. 12.4%
website/docs/_blogs/2025-01-31-WebSurferAgent/index.mdx The code changes are limited to refactoring or renaming context variables in the DocumentAgent and updating an internal import/type for the WebSearchPreview tool. The blog post solely covers the use of WebSurferAgent, BrowserUseTool, and Crawl4AITool, which are unrelated to these code changes, so there is very low likelihood the document is outdated. 11.7%
website/docs/user-guide/reference-tools/crawl4ai.mdx The code changes involve internal class attribute removal and a refactor in web search tool parameter naming, neither of which are directly relevant to the Crawl4AI documentation, which only introduces the tool integration at a high level. 11.2%

✅ Latest commit analyzed: f03eba5 | Powered by Joggr

@marklysze
Copy link
Collaborator

Hey @priyansh4320, thanks for this - just confirming you've run DocAgent with the updated code and it's working?

Also, the web search change, is that because of a change to OpenAI's Responses API?

@priyansh4320
Copy link
Collaborator Author

Hey @priyansh4320, thanks for this - just confirming you've run DocAgent with the updated code and it's working?

Also, the web search change, is that because of a change to OpenAI's Responses API?

updated , web_search, according to https://platform.openai.com/docs/guides/tools-web-search?api-mode=responses,
docagent working with changes.

@marklysze
Copy link
Collaborator

Hey @priyansh4320, I've run through a code example in group chat, and I have a feeling that the DocAgent's context_variables isn't actually used, it has an internal group chat that has a set of context variables it's using instead. I think we can remove the context variables declaration on DocAgent's init.

Can you confirm?

@priyansh4320
Copy link
Collaborator Author

Hey @priyansh4320, I've run through a code example in group chat, and I have a feeling that the DocAgent's context_variables isn't actually used, it has an internal group chat that has a set of context variables it's using instead. I think we can remove the context variables declaration on DocAgent's init.

Can you confirm?

yes we can remove it , did not remove that in first try cause I just wanted a second opinion, i will remove it now.

@marklysze
Copy link
Collaborator

Hey @priyansh4320, I've run through a code example in group chat, and I have a feeling that the DocAgent's context_variables isn't actually used, it has an internal group chat that has a set of context variables it's using instead. I think we can remove the context variables declaration on DocAgent's init.
Can you confirm?

yes we can remove it , did not remove that in first try cause I just wanted a second opinion, i will remove it now.

Yep, let's remove it!

@priyansh4320 priyansh4320 force-pushed the Bugfix-memory-overwrite-on-context-variable branch from 66ab29a to 46c87db Compare September 5, 2025 13:27
Copy link
Collaborator

@marklysze marklysze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @priyansh4320!

@marklysze marklysze added this pull request to the merge queue Sep 5, 2025
Merged via the queue into main with commit f001ad6 Sep 5, 2025
17 of 18 checks passed
@marklysze marklysze deleted the Bugfix-memory-overwrite-on-context-variable branch September 5, 2025 19:27
@codecov
Copy link

codecov bot commented Sep 5, 2025

Codecov Report

❌ Patch coverage is 75.93985% with 32 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
autogen/mcp/mcp_proxy/operation_grouping.py 0.00% 24 Missing ⚠️
autogen/interop/pydantic_ai/pydantic_ai.py 0.00% 6 Missing ⚠️
autogen/llm_config/config.py 95.65% 1 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
autogen/agentchat/conversable_agent.py 63.69% <100.00%> (-1.69%) ⬇️
...ents/experimental/document_agent/document_agent.py 21.07% <ø> (+0.10%) ⬆️
autogen/llm_config/entry.py 89.79% <100.00%> (-1.96%) ⬇️
autogen/llm_config/utils.py 100.00% <100.00%> (ø)
autogen/oai/client.py 56.56% <100.00%> (-3.83%) ⬇️
autogen/oai/openai_utils.py 62.97% <100.00%> (-2.91%) ⬇️
...erimental/web_search_preview/web_search_preview.py 34.00% <ø> (ø)
autogen/llm_config/config.py 91.93% <95.65%> (+3.84%) ⬆️
autogen/interop/pydantic_ai/pydantic_ai.py 41.79% <0.00%> (-1.29%) ⬇️
autogen/mcp/mcp_proxy/operation_grouping.py 35.21% <0.00%> (+1.42%) ⬆️

... and 34 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@priyansh4320 priyansh4320 self-assigned this Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants