QuickResearchTool
autogen.tools.experimental.QuickResearchTool #
Bases: Tool
Performs parallel web research across multiple queries.
For each query, the tool: 1. Searches the web using Tavily to get top results 2. Crawls each result URL using crawl4ai 3. Summarizes page content via LLM (any provider supported by AG2)
This is a lightweight alternative to DeepResearchTool for quick fact-finding across multiple topics in parallel.
| ATTRIBUTE | DESCRIPTION |
|---|---|
tavily_api_key | The Tavily API key for web search.
|
llm_config | LLM configuration for summarization.
|
Initialize the QuickResearchTool.
| PARAMETER | DESCRIPTION |
|---|---|
llm_config | LLM configuration for summarization. Supports any AG2-compatible provider. TYPE: |
tavily_api_key | Tavily API key. Falls back to TAVILY_API_KEY env var. TYPE: |
num_results_per_query | Number of search results to crawl per query. Defaults to 3. TYPE: |
| RAISES | DESCRIPTION |
|---|---|
ValueError | If tavily_api_key is not provided or set in env vars. |
Source code in autogen/tools/experimental/quick_research/quick_research.py
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | |
tool_schema property #
Get the schema for the tool.
This is the preferred way of handling function calls with OpeaAI and compatible frameworks.
function_schema property #
Get the schema for the function.
This is the old way of handling function calls with OpenAI and compatible frameworks. It is provided for backward compatibility.
realtime_tool_schema property #
Get the schema for the tool.
This is the preferred way of handling function calls with OpeaAI and compatible frameworks.
register_for_llm #
Registers the tool for use with a ConversableAgent's language model (LLM).
This method registers the tool so that it can be invoked by the agent during interactions with the language model.
| PARAMETER | DESCRIPTION |
|---|---|
agent | The agent to which the tool will be registered. TYPE: |
Source code in autogen/tools/tool.py
register_for_execution #
Registers the tool for direct execution by a ConversableAgent.
This method registers the tool so that it can be executed by the agent, typically outside of the context of an LLM interaction.
| PARAMETER | DESCRIPTION |
|---|---|
agent | The agent to which the tool will be registered. TYPE: |
Source code in autogen/tools/tool.py
register_tool #
Register a tool to be both proposed and executed by an agent.
Equivalent to calling both register_for_llm and register_for_execution with the same agent.
Note: This will not make the agent recommend and execute the call in the one step. If the agent recommends the tool, it will need to be the next agent to speak in order to execute the tool.
| PARAMETER | DESCRIPTION |
|---|---|
agent | The agent to which the tool will be registered. TYPE: |