报告错误代码
复制
询问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'm planning a trip to Paris, France from San Francisco, CA
for 3 days for Christmas in 2025. Can you help me find:
1. Flight options and prices, give me the best option for the cheapest flight
2. Hotel recommendations in central Paris
3. Weather forecast for my travel dates
4. Popular events during the Christmas season in Paris
5. Give a quick summary of the trip and the results
My budget is around $3000 total and I prefer mid-range accommodations. keep it succint in 300 words or less""",
model="anthropic/claude-opus-4-5",
mcp_servers=[
"windsor/brave-search-mcp", # 用于搜索旅行相关信息
"windsor/open-meteo-mcp", # 用于查询目的地天气
"windsor/ticketmaster-mcp" # 用于查询活动
]
)
print(f"Travel Planning Results:\n{result.final_output}")
if __name__ == "__main__":
asyncio.run(main())
这个旅行智能体示例使用了多个 MCP 服务器:
- Brave Search MCP (
windsor/brave-search-mcp):用于查找最新的旅行信息、航班选项、酒店评价和预订选项 - Open Meteo MCP (
windsor/open-meteo-mcp):用于获取目的地的天气预报 - Ticketmaster MCP (
windsor/ticketmaster-mcp):用于查找行程期间的音乐会和其他活动