Skip to content

Commit e4f4be7

Browse files
Typo fixed
1 parent 6c013fe commit e4f4be7

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

sgr_deep_research/core/agents/sgr_agent.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
from sgr_deep_research.core.tools_registry import ToolsRegistry
88
from sgr_deep_research.settings import get_config
99
from sgr_deep_research.tools import (
10+
AgentCompletionTool,
11+
ClarificationTool,
12+
CreateReportTool,
1013
NextStepToolsBuilder,
1114
NextStepToolStub,
15+
ReasoningTool,
16+
WebSearchTool,
1217
)
1318

1419
logging.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:

0 commit comments

Comments
 (0)