File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
sgr_deep_research/core/agents Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change 77from sgr_deep_research .core .tools_registry import ToolsRegistry
88from sgr_deep_research .settings import get_config
99from sgr_deep_research .tools import (
10+ AgentCompletionTool ,
11+ ClarificationTool ,
12+ CreateReportTool ,
1013 NextStepToolsBuilder ,
1114 NextStepToolStub ,
15+ ReasoningTool ,
16+ WebSearchTool ,
1217)
1318
1419logging .basicConfig (
@@ -42,24 +47,26 @@ def __init__(
4247
4348 self .id = f"sgr_agent_{ uuid .uuid4 ()} "
4449
45- # We use our own reasoning scheme
46- ToolsRegistry .disable_tool ("ReasoningTool" )
47-
4850 self .toolkit = [* ToolsRegistry .get_tools (), * (toolkit or [])]
51+ self .toolkit .remove (ReasoningTool ) # we use our own reasoning scheme
4952 self .max_searches = max_searches
5053
5154 async def _prepare_tools (self ) -> Type [NextStepToolStub ]:
5255 """Prepare tool classes with current context limits."""
5356 tools = set (self .toolkit )
5457 if self ._context .iteration >= self .max_iterations :
5558 tools = [
56- ToolsRegistry . get_tool ( " CreateReportTool" ) ,
57- ToolsRegistry . get_tool ( " AgentCompletionTool" ) ,
59+ CreateReportTool ,
60+ AgentCompletionTool ,
5861 ]
5962 if self ._context .clarifications_used >= self .max_clarifications :
60- ToolsRegistry .disable_tool ("ClarificationTool" )
63+ tools -= {
64+ ClarificationTool ,
65+ }
6166 if self ._context .searches_used >= self .max_searches :
62- ToolsRegistry .disable_tool ("WebSearchTool" )
67+ tools -= {
68+ WebSearchTool ,
69+ }
6370 return NextStepToolsBuilder .build_NextStepTools (list (tools ))
6471
6572 async def _reasoning_phase (self ) -> NextStepToolStub :
You can’t perform that action at this time.
0 commit comments