feat(nodes): add background investigation node

Change-Id: I96e08e22fc7c52647edbf9be4f385a8fae9b449a
This commit is contained in:
Zhao Longjie
2025-04-27 20:15:42 +08:00
parent ada5e34eeb
commit 899438eca0
7 changed files with 90 additions and 8 deletions

View File

@@ -28,6 +28,7 @@ async def run_agent_workflow_async(
debug: bool = False,
max_plan_iterations: int = 1,
max_step_num: int = 3,
enable_background_investigation: bool = True,
):
"""Run the agent workflow asynchronously with the given user input.
@@ -36,6 +37,7 @@ async def run_agent_workflow_async(
debug: If True, enables debug level logging
max_plan_iterations: Maximum number of plan iterations
max_step_num: Maximum number of steps in a plan
enable_background_investigation: If True, performs web search before planning to enhance context
Returns:
The final state after the workflow completes
@@ -51,6 +53,7 @@ async def run_agent_workflow_async(
# Runtime Variables
"messages": [{"role": "user", "content": user_input}],
"auto_accepted_plan": True,
"enable_background_investigation": enable_background_investigation,
}
config = {
"configurable": {