<pre><code>research_agent_config = AgentConfig(
framework=AgentFramework.DEEP_RESEARCH,
model_id=os.environ.get("AZURE_DEPLOYMENT_NAME"),
name="research_assistant",
description="A helpful research assistant that conducts deep research on topics" )</code></pre>
创建主智能体,并管理研究子智能体
<pre><code>main_agent = await MinionAgent.create(
AgentFramework.SMOLAGENTS,
main_agent_config,
managed_agents=[research_agent_config])
research_query = """Research The evolution of Indo-European languages, and save a markdown out of it. """
result = agent.run(research_query)</code></pre>
系统在短短8分钟内自动收集了35篇相关文章,并生成了6页的详细分析报告,这一过程如果由人工完成,预计需要2天时间。
价格比较:自动化市场调研
针对AI模型价格的自动比较任务,minion-agent展示了其在浏览器自动化方面的能力:
<pre><code>config = AgentConfig(name="browser-agent",
model_type="langchain_openai.AzureChatOpenAI",
model_id=azure_deployment,
model_args={
"azure_deployment": azure_deployment,
"api_version": api_version},
instructions="Compare the price of gpt-4o and DeepSeek-V3",)agent = await MinionAgent.create(AgentFramework.BROWSER_USE, config)result = agent.run("Compare the price of gpt-4o and DeepSeek-V3 and create a detailed comparison table")</code></pre>
系统能够自动访问相关网站,提取定价信息,并生成结构化的比较表格,大幅提高了市场调研的效率。