Skip to content

Commit 10e2e80

Browse files
committed
Add custom_tools_prompt
1 parent 691d7ae commit 10e2e80

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/open_deep_research/configuration.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,19 @@ class Configuration(BaseModel):
231231
}
232232
}
233233
)
234-
235-
# Custom tools configuration
236234
custom_tools: Optional[List[Any]] = Field(
237235
default=None
238236
)
239-
237+
custom_tools_prompt: Optional[str] = Field(
238+
default=None,
239+
optional=True,
240+
metadata={
241+
"x_oap_ui_config": {
242+
"type": "text",
243+
"description": "Any additional instructions to pass along to the Agent regarding the custom tools that are available to it."
244+
}
245+
}
246+
)
240247

241248
@classmethod
242249
def from_runnable_config(

src/open_deep_research/deep_researcher.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ async def researcher(state: ResearcherState, config: RunnableConfig) -> Command[
398398

399399
# Prepare system prompt with MCP context if available
400400
researcher_prompt = research_system_prompt.format(
401+
custom_tools_prompt=configurable.custom_tools_prompt or "",
401402
mcp_prompt=configurable.mcp_prompt or "",
402403
date=get_today_str()
403404
)

src/open_deep_research/prompts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
You have access to two main tools:
147147
1. **tavily_search**: For conducting web searches to gather information
148148
2. **think_tool**: For reflection and strategic planning during research
149+
{custom_tools_prompt}
149150
{mcp_prompt}
150151
151152
**CRITICAL: Use think_tool after each search to reflect on results and plan next steps. Do not call think_tool with the tavily_search or any other tools. It should be to reflect on the results of the search.**

0 commit comments

Comments
 (0)