deepagents-python-quickstart
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDeep Agents Python quickstart
Deep Agents Python快速入门
Follow the live docs — do not invent an alternate API from memory:
Fetch that page (Docs MCP or HTTP) and implement the research-agent shape it shows (, research system prompt, invoke with a research question like “What is LangGraph?”).
create_deep_agent请遵循在线文档操作——不要凭记忆自行设计替代API:
获取该页面内容(通过Docs MCP或HTTP)并实现其中展示的research-agent结构(、研究系统提示词、传入研究问题如“What is LangGraph?”进行调用)。
create_deep_agentLocal setup constraints
本地设置约束
Apply these on top of the quickstart (they keep setup minimal and model-agnostic):
-
Ask which provider/model to use. Showcase that Deep Agents are model-agnostic. Suggested prompt:Which model should this agent use? Pass astring — e.g.
provider:model,openai:gpt-5.5,anthropic:claude-sonnet-5. Default if you're unsure:google_genai:gemini-3.5-flash.anthropic:claude-sonnet-5
We'll use that provider's built-in web search (no separate search API key). -
Create a new directory (e.g.) and do all work there — do not pollute the open project.
deep-agent/ -
Do not use Tavily (or any second search vendor). Replace the quickstart's/ Tavily tool with the chosen provider's built-in web search. Look up the current tool shape on that provider's LangChain chat docs (examples as of writing — re-check if needed):
internet_searchProvider Built-in search tool Anthropic {"type": "web_search_20260209", "name": "web_search", "max_uses": 5}OpenAI {"type": "web_search"}Google {"google_search": {}}Prefer Anthropic / OpenAI / Google so provider search is available. Only secret: that provider's API key in(gitignored). Skip LangSmith tracing unless they ask..env -
Install(+
deepagents) and the provider package for their model — notpython-dotenv.tavily-python -
Run the research example, show output, then stop. Point to/ customization / Managed Deep Agents for next steps.
deep-agents-core
在快速入门基础上应用以下约束(这些约束可保持设置极简且与模型无关):
-
询问要使用的提供商/模型。展示Deep Agents的模型无关特性。建议提示词:该代理应使用哪个模型?请传入格式的字符串——例如
provider:model、openai:gpt-5.5、anthropic:claude-sonnet-5。若不确定,默认使用:google_genai:gemini-3.5-flash。anthropic:claude-sonnet-5
我们将使用该提供商的内置网页搜索功能(无需单独的搜索API密钥)。 -
创建一个新目录(例如)并在其中完成所有操作——不要污染现有项目。
deep-agent/ -
不要使用Tavily(或任何其他第三方搜索供应商)。将快速入门中的/Tavily工具替换为所选提供商的内置网页搜索。请查阅该提供商LangChain聊天文档中的当前工具结构(撰写本文时的示例——如有需要请重新核对):
internet_search提供商 内置搜索工具 Anthropic {"type": "web_search_20260209", "name": "web_search", "max_uses": 5}OpenAI {"type": "web_search"}Google {"google_search": {}}优先选择Anthropic/OpenAI/Google,因为这些提供商支持内置搜索功能。唯一需要的密钥是该提供商的API密钥,需存储在文件中(已添加到git忽略列表)。除非用户要求,否则跳过LangSmith追踪。.env -
安装(以及
deepagents)和对应模型的提供商包——不要安装python-dotenv。tavily-python -
运行研究示例,展示输出结果,然后停止。后续步骤可参考/自定义/托管Deep Agents。
deep-agents-core