如何使用 Google 的 ADK 构建用于潜在客户开发的深度研究代理
Solution Acceleration Architect
Solution Acceleration Architect
Solution Acceleration Architect
Solution Acceleration Architect
Our most intelligent model is now available on Vertex AI
我们最智能的模型现已上线 Vertex AI
Traditional lead generation often relies on brittle scrapers and static scripts that lack the ability to adapt or reason. What if we could architect an agent that doesn't just fetch data, but emulates the analytical process of a market research team? An agent that can discover patterns, validate information, and generate qualified leads based on a dynamic understanding of success.
传统的潜在客户获取往往依赖脆弱的爬虫和静态脚本,缺乏适应或推理能力。如果我们能构建一个不仅能获取数据,还能模拟市场研究团队分析流程的代理会怎样?这个代理可以发现模式、验证信息,并根据对成功的动态理解生成合格的潜在客户。
This guide details the architecture of such an agent, built using the Agent Development Kit (ADK). We will explore how to structure a complex task into a hierarchy of cooperative agents, manage state across interactions, and design for parallelism to create a system that is both powerful and efficient.
本指南详细介绍了使用 Agent Development Kit (ADK) 构建的此类智能体的架构。我们将探讨如何将复杂任务结构化为协作智能体的层级体系、在交互中管理状态,并设计并行机制,以创建一个既强大又高效的系统。
Step 1: Find the root agent
步骤 1:找到根代理
At the core of any complex agentic system is what we call a “primary orchestrator”. In this architecture, the InteractiveLeadGenerator serves as this central hub. Its purpose is not to perform the low-level tasks itself, but to manage the workflow, delegate to specialized sub-agents, and interact with the user. Here’s the Python script:
任何复杂智能体系统的核心是我们所称的“主 orchestrator”。在此架构中,InteractiveLeadGenerator 充当这一中心枢纽。其目的并非亲自执行底层任务,而是管理工作流、委派给专门的子智能体,并与用户交互。以下是 Python 脚本:
# From: LeadGenerationResearch/LeadGenerationResearch/agent.py root_agent = Agent( name="InteractiveLeadGenerator", model=os.getenv("GEN_ADVANCED_MODEL", "gemini-2.5-pro"), instruction=ROOT_AGENT_INSTRUCTION, # The agent's core directive tools=[ get_user_choice, *agent_tools, ], before_agent_callback=[before_agent_run], after_tool_callback=[after_tool_run], )
# From: LeadGenerationResearch/LeadGenerationResearch/...