curl -LsSf https://raw.githubusercontent.com/langchain-ai/deepagents/main/libs/cli/scripts/install.sh | bash
# With model provider extras
DEEPAGENTS_EXTRAS="nvidia,ollama" curl -LsSf https://raw.githubusercontent.com/langchain-ai/deepagents/main/libs/cli/scripts/install.sh | bash
Or install directly with uv:
# Install with chosen model providers
uv tool install 'deepagents-cli[nvidia,ollama]'
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.
Explicit user/project path context for project-sensitive behavior.
Swap the model or per-call settings from runtime.context.
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.
Full configuration payload passed from the CLI to the server subprocess.
Adapter for rendering agent output to Textual widgets.
Classification that controls whether a command can skip the message queue.
A single slash-command definition.
State for local context middleware.
Inject local context (git state, project structure, etc.) into the system prompt.
Deterministic chat model for CLI integration tests.
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.
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.
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.
Token stats for a single model within a session.
Stats accumulated over a single agent turn (or full session).
Runtime context passed via context= to the LangGraph graph.
Metadata for a custom subagent loaded from filesystem.
Successful offload result.
Offload was a no-op — conversation is within the retention budget.
Raised when the model cannot be created for offloading.
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.
An action deferred until the current busy state resolves.
Token tracker that updates the status bar.
Session state for the Textual app.
Main Textual application for deepagents-cli.
Posted by the background server-startup worker on success.
Posted by the background server-startup worker on failure.
Result from running the Textual application.
Manages a langgraph dev server subprocess.
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.
Coalesced thread-selector configuration read from a single TOML parse.
Client that talks to a LangGraph server over HTTP+SSE.
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.
Posted when the user presses a printable key or backspace.
Chat input widget with prompt, multi-line text, autocomplete, and history.
Message sent when input is submitted.
Message sent when input mode changes.
Posted when the user presses a printable key or backspace in the input.
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.
Base error for sandbox provider operations.
Raised when the requested sandbox cannot be found.
Interface for creating and deleting sandbox backends.
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.
Read the server project context from environment transport data.
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.
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.
Start a LangGraph server and return a connected remote agent client.
Async context manager that starts a server and guarantees cleanup.
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 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.
Create the CLI agent graph from environment-based configuration.
Format a token count into a human-readable short string.
Resolve editor command from environment.
Open current_text in an external editor.
Attach a file handler to target when DEEPAGENTS_DEBUG is set.
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.
Format offload retention settings into a human-readable limit string.
Write messages to backend storage before offloading.
Execute the offload workflow: summarize old messages and free context.
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).
Check whether the terminal is in ASCII charset mode.
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.
Build the server base URL.
Generate a langgraph.json config file for langgraph dev.
Poll a LangGraph server health endpoint until it responds.
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 thread ID as a full UUID7 string.
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.