curl -LsSf https://raw.githubusercontent.com/langchain-ai/deepagents/main/scripts/install.sh | bash
# With model provider extras (OpenAI is included by default)
DEEPAGENTS_EXTRAS="anthropic,groq" curl -LsSf https://raw.githubusercontent.com/langchain-ai/deepagents/main/scripts/install.sh | bash
Or install directly with uv:
# Install with chosen model providers (OpenAI is included by default)
uv tool install 'deepagents-cli[anthropic,groq]'
Run the CLI:
deepagents
The fastest way to start using Deep Agents. deepagents-cli is a pre-built coding agent in your terminal — similar to Claude Code or Cursor — powered by any LLM that supports tool calling. One install command and you're up and running, no code required.
What the CLI adds on top of the SDK:
See our Releases and Versioning policies.
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
For detailed information on how to contribute, see the Contributing Guide.
This project was primarily inspired by Claude Code, and initially was largely an attempt to see what made Claude Code general purpose, and make it even more so.
Data used to render HITL previews.
Line and byte level metrics for a file operation.
Track a single filesystem tool call.
Collect file operation metrics during a CLI interaction.
Metadata for a single MCP tool.
Metadata for a connected MCP server and its tools.
Manages persistent MCP sessions for stateful stdio servers.
Token stats for a single model within a session.
Stats accumulated over a single agent turn (or full session).
Adapter for rendering agent output to Textual widgets.
State for local context middleware.
Inject local context (git state, project structure, etc.) into the system prompt.
Raised when the HITL interrupt loop exceeds _MAX_HITL_ITERATIONS rounds.
Mutable state accumulated while iterating over the agent stream.
Best-effort background LangSmith thread URL lookup state.
A single choice option for a multiple choice question.
A question to ask the user.
Request payload sent via interrupt when asking the user questions.
Widget result when the user submits answers.
Widget result when the user cancels the prompt.
Middleware that provides an ask_user tool for interactive questioning.
Unified parse result for dropped-path payload detection.
Track pasted images and videos in the current conversation.
Metadata for a custom subagent loaded from filesystem.
A dangerous Unicode character found in text.
Safety analysis output for a URL string.
Character set mode for TUI display.
Character glyphs for TUI display.
Global settings and environment detection for deepagents-cli.
Mutable session state shared across the app, adapter, and agent.
Result of creating a chat model, bundling the model with its metadata.
Represents a queued user message awaiting processing.
Token tracker that updates the status bar.
Session state for the Textual app.
Main Textual application for deepagents-cli.
Result from running the Textual application.
Thread metadata returned by list_threads.
Represents a pasted image with its base64 encoding.
Represents a pasted video with its base64 encoding.
Raised when model configuration or creation fails.
A model specification in provider:model format.
Profile data for a model with override tracking.
Configuration for a model provider.
Parsed model configuration from config.toml.
Result of formatting tool output for display.
Widget displaying a user message.
Widget displaying a queued (pending) user message in grey.
Widget displaying an assistant message with markdown support.
Widget displaying a tool call with collapsible output.
Widget displaying a diff with syntax highlighting.
Widget displaying an error message.
Widget displaying an app message.
Widget displaying a summarization completion notification.
A selectable tool item in the MCP viewer.
Modal viewer for active MCP servers and their tools.
Result of handling a key event in the completion system.
Protocol for views that can display completion suggestions.
Protocol for completion controllers.
Controller for / slash command completion.
Controller for @ file completion with fuzzy matching from project root.
Manages multiple completion controllers, delegating to the active one.
Widget for displaying a unified diff with syntax highlighting.
Animated spinner using charset-appropriate frames.
Animated loading indicator with status text and elapsed time.
Approval menu using standard Textual patterns.
Message sent when user makes a decision.
A label that displays a model name, right-aligned with smart truncation.
Status bar showing mode, auto-approve, cwd, git branch, tokens, and model.
A clickable model option in the selector.
Message sent when a model option is clicked.
Full-screen modal for model selection.
Manages command history with file persistence.
Interactive widget for asking the user questions.
Message sent when user submits all answers.
Message sent when user cancels the ask_user prompt.
Base class for tool approval widgets.
Generic approval widget for unknown tools.
Approval widget for write_file - shows file content with syntax highlighting.
Approval widget for edit_file - shows clean diff with colors.
A clickable thread option in the selector.
Message sent when a thread option is clicked.
Confirmation modal shown before deleting a thread.
Modal dialog for browsing and resuming threads.
Base renderer for tool approval widgets.
Renderer for write_file tool - shows full file content.
Renderer for edit_file tool - shows unified diff.
A clickable completion option in the autocomplete popup.
Message sent when a completion option is clicked.
Popup widget that displays completion suggestions as clickable options.
Message sent when a completion option is clicked.
TextArea subclass with custom key handling for chat input.
Message sent when text is submitted.
Request previous history entry.
Request next history entry.
Message sent when paste payload resolves to file paths.
Chat input widget with prompt, multi-line text, autocomplete, and history.
Message sent when input is submitted.
Message sent when input mode changes.
Types of messages in the chat.
Status of a tool call.
In-memory message data for virtualization.
Manages message data and widget window for virtualization.
Welcome banner displayed at startup.
Modal backend implementation conforming to SandboxBackendProtocol.
Modal sandbox provider implementation.
LangSmith backend implementation conforming to SandboxBackendProtocol.
LangSmith sandbox provider implementation.
Base error for sandbox provider operations.
Raised when the requested sandbox cannot be found.
Interface for creating and deleting sandbox backends.
Backend that operates on files in a Runloop devbox.
Runloop sandbox provider implementation.
Daytona backend implementation conforming to SandboxBackendProtocol.
Daytona sandbox provider implementation.
Extended skill metadata for CLI display, adds source tracking.
Fire matching hook commands with payload serialized as JSON on stdin.
Schedule dispatch_hook as a background task with a strong reference.
Find the project root by looking for .git directory.
Find project-specific AGENTS.md file(s).
Compute a unified diff between before and after content.
Convert a virtual/relative path to a physical filesystem path.
Format a path for display.
Collect summary info and diff for HITL approvals.
Load and validate MCP configuration from JSON file.
Find MCP config files from standard locations.
Split discovered config paths into user-level and project-level.
Extract stdio server entries from a parsed MCP config.
Merge multiple MCP config dicts by server name.
Load an MCP config file, returning None on any error.
Load MCP tools from configuration file with stateful sessions.
Resolve MCP config and load tools.
Format a token count into a human-readable short string.
Print a model-usage stats table to a Rich console.
Execute a task with output directed to Textual UI.
Concatenate all section functions into the full detection script.
Check if CLI optional dependencies are installed.
Check for recommended external tools and return missing tool names.
Format a missing-tool warning for the TUI toast.
Format a missing-tool warning for non-interactive Rich console output.
Parse command line arguments.
Run the Textual CLI interface (async version).
Read piped stdin and merge it into the parsed CLI arguments.
Entry point for console script.
Run a single task non-interactively and exit.
Extract @file mentions and return the text with resolved file paths.
Parse a paste payload that may contain dragged-and-dropped file paths.
Parse dropped-path payload variants through one entrypoint.
Parse and resolve a single pasted path payload.
Extract and resolve a leading pasted path token from input text.
Normalize pasted text that may represent a single filesystem path.
Build a parent parser whose -h invokes help_fn.
Show top-level help information for the deepagents CLI.
Show help information for the list subcommand.
Show help information for the reset subcommand.
Show help information for the skills subcommand.
Show help information for the skills list subcommand.
Show help information for the skills create subcommand.
Show help information for the skills info subcommand.
Show help information for the skills delete subcommand.
Show help information for the threads subcommand.
Show help information for the threads delete subcommand.
Show help information for the threads list subcommand.
List subagents from user and/or project directories.
Detect deceptive or hidden Unicode code points in text.
Remove known dangerous/invisible Unicode characters from text.
Render hidden Unicode characters as explicit markers.
Summarize Unicode issues for warning messages.
Join safety warnings into a display string with overflow indicator.
Check a URL for suspicious Unicode and domain spoofing patterns.
Flatten nested dict/list structures into key-path/string pairs.
Return whether a key path suggests URL-like content.
Get the glyph set for the current charset mode.
Reset the glyphs cache (for testing).
Return the platform-native label for the newline keyboard shortcut.
Get the appropriate banner for the current charset mode.
Parse shell allow-list from string.
Check if a command contains dangerous shell patterns.
Check if a shell command is in the allow-list.
Resolve the LangSmith project name if tracing is configured.
Fetch the LangSmith project URL via the LangSmith client.
Build a full LangSmith thread URL if tracing is configured.
Reset the LangSmith URL cache (for testing).
Get the default coding agent instructions.
Auto-detect provider from model name.
Create a chat model.
Validate that the model has required capabilities for deepagents.
Run the Textual application.
Format ISO timestamp for display (e.g., 'Dec 30, 6:10pm').
Format ISO timestamp as relative time (e.g., '5m ago', '2h ago').
Format a filesystem path for display.
Get path to global database.
Generate a new 8-char hex thread ID.
List threads from checkpoints table.
Populate message_count for an existing thread list.
Populate checkpoint-derived fields for an existing thread list.
Prewarm thread selector cache for faster /threads open.
Get cached recent threads, if available.
Apply cached message counts onto thread rows when freshness matches.
Apply cached initial prompts onto thread rows when freshness matches.
Populate initial_prompt for thread rows in the background.
Get most recent thread_id, optionally filtered by agent.
Get agent_name for a thread.
Check if a thread exists in checkpoints.
Find threads whose IDs start with the given prefix.
Delete thread checkpoints.
Get AsyncSqliteSaver for the global database.
Read the thread listing limit from DA_CLI_RECENT_THREADS.
CLI handler for deepagents threads list.
CLI handler for: deepagents threads delete.
Compute a SHA-256 fingerprint over sorted, concatenated config contents.
Check whether a project's MCP config is trusted with the given fingerprint.
Persist trust for a project's MCP config.
Remove trust for a project's MCP config.
Attempt to read an image from the system clipboard.
Read and encode an image file from disk.
Read and encode a video file from disk.
Try to load a file as an image first, then as a video.
Encode raw bytes to a base64 string.
Create multimodal message content with text, images, and videos.
List all available agents.
Reset an agent to default or copy from another agent.
Get the base system prompt for the agent.
Create a CLI-configured agent with flexible options.
Reset module-level caches so the next call recomputes from scratch.
Get available models dynamically from installed LangChain provider packages.
Load upstream profiles merged with config.toml overrides.
Check if credentials are available for a provider.
Return the env var name that holds credentials for a provider.
Update the default model in config file.
Remove the default model from the config file.
Check if a warning key is suppressed in the config file.
Add a warning key to the suppression list in the config file.
Load thread column visibility from config file.
Save thread column visibility to config file.
Load the relative-time display preference for thread timestamps.
Save the relative-time display preference for thread timestamps.
Load the sort order preference for the thread selector.
Save the sort order preference for the thread selector.
Update the recently used model in config file.
Make HTTP requests to APIs and web services.
Search the web using Tavily for current information and documentation.
Fetch content from a URL and convert HTML to markdown format.