报告错误代码
复制
询问AI
import asyncio
from dedalus_labs import AsyncDedalus, DedalusRunner
from dotenv import load_dotenv
load_dotenv()
async def main():
client = AsyncDedalus()
runner = DedalusRunner(client)
result = await runner.run(
input="""I need to research the latest developments in AI agents for 2024.
Please help me:
1. Find recent news articles about AI agent breakthroughs
2. Search for academic papers on multi-agent systems
3. Look up startup companies working on AI agents
4. Find GitHub repositories with popular agent frameworks
5. Summarize the key trends and provide relevant links
Focus on developments from the past 6 months.""",
model="openai/gpt-4.1",
mcp_servers=[
"tsion/exa", # 语义搜索引擎
"windsor/brave-search-mcp" # 注重隐私的网页搜索
]
)
print(f"Web Search Results:\n{result.final_output}")
if __name__ == "__main__":
asyncio.run(main())
这个示例使用了多个搜索 MCP 服务器:
- Exa MCP (
tsion/exa):语义搜索,非常适合查找在概念层面相关的内容 - Brave Search MCP (
windsor/brave-search-mcp):面向当前事件和特定查询的、注重隐私的网页搜索