To create a research agent that can conduct thorough investigations:
from tavily import TavilyClient
from deepagents import create_deep_agent
import os

def internet_search(query):
    tavily_client = TavilyClient(api_key=os.environ["TAVILY_API_KEY"])
    return tavily_client.search(query)

research_instructions = """You are an expert researcher. 
Your job is to conduct thorough research, and then write a polished report.

You have access to tools for internet search and file operations.
"""

agent = create_deep_agent(
    tools=[internet_search],
    instructions=research_instructions
)

result = agent.invoke({
    "messages": [{"role": "user", "content": "what is langgraph?"}]
})
The agent created with createDeepAgent is a LangGraph graph, so you can interact with it (streaming, human-in-the-loop, memory, studio) the same way you would any LangGraph agent.