jkkkkyuedtrt/deepagents-quickstarts
๐ Deep Research
๐ Quickstart
Prerequisites: Install uv package manager:
curl -LsSf https://astral.sh/uv/install.sh | shEnsure you are in the deep_research directory:
cd deep_researchInstall packages:
uv syncSet your API keys in your environment:
export ANTHROPIC_API_KEY=your_anthropic_api_key_here # Required for Claude model
export GOOGLE_API_KEY=your_google_api_key_here # Required for Gemini model ([get one here](https://ai.google.dev/gemini-api/docs))
export TAVILY_API_KEY=your_tavily_api_key_here # Required for web search ([get one here](https://www.tavily.com/)) with a generous free tier
export LANGSMITH_API_KEY=your_langsmith_api_key_here # [LangSmith API key](https://smith.langchain.com/settings) (free to sign up)Usage Options
You can run this quickstart in two ways:
Option 1: Jupyter Notebook
Run the interactive notebook to step through the research agent:
uv run jupyter notebook research_agent.ipynbOption 2: LangGraph Server
Run a local LangGraph server with a web interface:
langgraph devLangGraph server will open a new browser window with the Studio interface, which you can submit your search query to:
<img width="2869" height="1512" alt="Screenshot 2025-11-17 at 11 42 59โฏAM" src="https://github.com/user-attachments/assets/03090057-c199-42fe-a0f7-769704c2124b" />
You can also connect the LangGraph server to a UI specifically designed for deepagents:
$ git clone https://github.com/langchain-ai/deep-agents-ui.git
$ cd deep-agents-ui
$ yarn install
$ yarn devThen follow the instructions in the deep-agents-ui README to connect the UI to the running LangGraph server.
This provides a user-friendly chat interface and visualization of files in state.
<img width="2039" height="1495" alt="Screenshot 2025-11-17 at 1 11 27โฏPM" src="https://github.com/user-attachments/assets/d559876b-4c90-46fb-8e70-c16c93793fa8" />
๐ Resources
- [Deep Research Course](https://academy.langchain.com/courses/deep-research-with-langgraph) - Full course on deep research with LangGraph
Custom Model
By default, deepagents uses "claude-sonnet-4-5-20250929". You can customize this by passing any LangChain model object. See the Deepagents package README for more details.
from langchain.chat_models import init_chat_model
from deepagents import create_deep_agent
# Using Claude
model = init_chat_model(model="anthropic:claude-sonnet-4-5-20250929", temperature=0.0)
# Using Gemini
from langchain_google_genai import ChatGoogleGenerativeAI
model = ChatGoogleGenerativeAI(model="gemini-3-pro-preview")
agent = create_deep_agent(
model=model,
)Custom Instructions
The deep research agent uses custom instructions defined in deep_research/research_agent/prompts.py that complement (rather than duplicate) the default middleware instructions. You can modify these in any way you want.
Custom Tools
The deep research agent adds the following custom tools beyond the built-in deepagent tools. You can also use your own tools, including via MCP servers. See the Deepagents package README for more details.
