Deep Agents (deepagents)

0.4.12 · active · verified Tue Mar 24

Agent harness by LangChain built on LangGraph. Implements planning (write_todos tool), filesystem backends, and subagent delegation — the architecture behind Claude Code, Manus, and Deep Research. Returns a compiled LangGraph StateGraph. Released mid-2025. Current version: 0.4.12 (Mar 2026). Default model is Claude Sonnet (not GPT-4o). Requires LangChain core libraries.

Warnings

Install

Imports

Quickstart

Minimal deepagents agent with OpenAI model.

# pip install deepagents langchain-openai
from deepagents import create_deep_agent
from langchain.chat_models import init_chat_model

model = init_chat_model('openai:gpt-4o')

agent = create_deep_agent(
    model=model,
    system_prompt='You are a helpful research assistant.'
)

result = agent.invoke({
    'messages': [{
        'role': 'user',
        'content': 'Write a short summary of what LangGraph is'
    }]
})

print(result['messages'][-1].content)

view raw JSON →