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.
pip install deepagentsVerified import paths — ran on the pinned version, not inferred.
Minimal deepagents agent with OpenAI model.
Pass model= explicitly: create_deep_agent(model=init_chat_model('openai:gpt-4o')) to use OpenAI.agent.invoke({'messages': [{'role': 'user', 'content': 'your prompt'}]})result['messages'][-1].content for text output. result.get('files', {}) for any files created.Use agent.stream() for streaming. Pass checkpointer= for persistence. Set LANGSMITH_TRACING=true for tracing.
Always use create_deep_agent() from deepagents — not langchain's create_react_agent or create_tool_calling_agent.
Upgrade your Python environment to 3.11 or newer to install `deepagents`.
Set the OPENAI_API_KEY environment variable or pass `api_key` to `init_chat_model` (e.g., `init_chat_model('openai:gpt-4o', api_key='your_key')`).