createWebSearchTool with createAskUserTool for interactive, source-cited research.
Create the tools
Define the agent
How it works
- The agent receives a research question
- If the question is ambiguous, it uses
ask_userto clarify — the workflow suspends until the user responds - The agent searches the web with
web_search(each search suspends for approval whenapproval: "always"is set) - It may perform multiple searches to gather comprehensive information
- The final answer includes source URLs from the search results
Run it
Open http://localhost:5173 to view your agents and workflows, run them from the UI, and see execution traces.
Python example on GitHub | TypeScript example on GitHub