Using an LLM to call tools in a loop is the simplest form of an agent. This architecture, however, can yield agents that are “shallow” and fail to plan and act over longer, more complex tasks. Applications like “Deep Research”, “Manus”, and “Claude Code” have gotten around this limitation by implementing a combination of four things: a planning tool, sub agents, access to a file system, and a detailed prompt. Deep Agents implements these components in a general purpose way so that you can easily create sophisticated agents for your application, available in both Python and JavaScript/TypeScript.

Key features

  • Planning Tool: Built-in planning capabilities to break down complex tasks and enable long-term planning.
  • Persistent state: Memory between tool calls beyond conversation history.
  • Sub-agents: Specialized agents for specific tasks with context quarantine.
  • Virtual File System: Mock file system for persistent state without conflicts.
  • Detailed System Prompt: Prompts, heavily inspired by Claude Code, leverage proven patterns.
Deep Agents implements the architectural patterns that make sophisticated agents like Claude Code effective.

Installation

pip install deepagents

Implementations

Deep Agents is available in both Python and JavaScript.

Acknowledgements

This project was primarily inspired by Claude Code and is an attempt to better understand Claude Code and extend it.