curl -LsSf https://langch.in/dcode | bash
# With model provider extras
# OpenAI, Anthropic, and Gemini are included by default
DEEPAGENTS_EXTRAS="nvidia,ollama" curl -LsSf https://langch.in/dcode | bash
Or install directly with uv:
# Install with chosen model providers
uv tool install 'deepagents-code[nvidia,ollama]'
Run:
dcode
The fastest way to start using Deep Agents. deepagents-code 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 deepagents-code 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.
Represents a queued user message awaiting processing.
Textual message carrying an external prompt or command.
An action deferred until the current busy state resolves.
Session state for the Textual app.
Main Textual application for deepagents-code.
Posted by the background server-startup worker on success.
Posted by the background server-startup worker on failure.
Result from running the Textual application.
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.
Parsed MCP server config entry.
File-backed TokenStorage under ~/.deepagents/.state/mcp-tokens/.
Raised when an MCP server needs interactive re-authentication.
Successful offload result.
Offload was a no-op — conversation is within the retention budget.
Raised when the model cannot be created for offloading.
Classification that controls whether a command can skip the message queue.
A single slash-command definition.
A single autocomplete entry for the slash-command controller.
Client that talks to a LangGraph server over HTTP+SSE.
State for local context middleware.
Inject local context (git state, project structure, etc.) into the system prompt.
Explicit user/project path context for project-sensitive behavior.
Metadata for a single MCP tool.
Metadata for a configured MCP server and its tools.
An MCP configuration file is malformed or structurally invalid.
Lazy, per-server cache of persistent MCP sessions.
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.
Deterministic chat model for integration tests.
Swap the model or per-call settings from runtime.context.
Token stats for a single model within a session.
Stats accumulated over a single agent turn (or full session).
A transport-independent event delivered from outside the TUI.
Source of external events for the Textual app.
Line-delimited JSON event source over a local Unix domain socket.
Extends agent state with a persisted context-token counter.
Schema-only middleware that registers _context_tokens in the state schema.
Metadata for a custom subagent loaded from filesystem.
Manages a langgraph dev server subprocess.
Runtime context passed via context= to the LangGraph graph.
Represents a pasted image with its base64 encoding.
Represents a pasted video with its base64 encoding.
Full configuration payload passed from the app to the server subprocess.
Complete set of semantic colors for one theme variant.
Metadata for a registered theme.
Stable identifiers for notification actions dispatched by the app.
One button/action row in the notification modal.
Typed payload for a missing-dependency notification.
Typed payload for an update-available notification.
A single notice waiting for user action.
In-memory store of pending notifications.
OSC 9;4 progress states.
A persisted API key credential.
A persisted OAuth subscription credential.
Result of a credential write that may have warnings to surface.
Raised when model configuration or creation fails.
Raised when no credentials are configured for any default-resolvable provider.
Raised when neither the app nor init_chat_model can infer a provider.
Raised when a provider is selected but its API key env var is unset.
Credential readiness state for a model provider.
Origin of a CONFIGURED credential, used to discriminate display.
Credential readiness information for a provider.
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.
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-code.
Mutable session state shared across the app, adapter, and agent.
Result of creating a chat model, bundling the model with its metadata.
Adapter for rendering agent output to Textual widgets.
Middleware that provides an ask_user tool for interactive questioning.
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 an interaction.
Install status for one optional dependency extra.
Unified parse result for dropped-path payload detection.
Track pasted images and videos in the current conversation.
Validate shell commands against an allow-list without HITL interrupts.
Thread metadata returned by list_threads.
Posted when the changelog row is clicked with the mouse.
Modal dedicated to the update-available notification.
Outcome of an AuthPromptScreen interaction.
Confirmation overlay shown before clearing a stored credential.
Modal that captures and persists an API key for one provider.
Modal that lists configured providers and lets the user manage keys.
First-step onboarding screen that asks for the user's name.
Onboarding screen that summarizes installed optional integrations.
Modal dialog for managing startup warning preferences.
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.
Modal dialog for switching between available agents.
Dismissal payload identifying which action the user picked.
Posted when a notification row is clicked with the mouse.
Posted when the user picks SUPPRESS from a notification's detail modal.
Modal listing pending notifications with drill-in details.
Welcome banner displayed at startup.
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.
Posted when an _ActionOption is clicked with the mouse.
Modal displaying a single notification's title, body, and actions.
Animated spinner using charset-appropriate frames.
Animated loading indicator with status text and elapsed time.
A selectable tool item in the MCP viewer.
Modal viewer for active MCP servers and their tools.
Modal that shows self-update progress and a bounded log tail.
A label that displays a model name, right-aligned with smart truncation.
Status bar showing mode, auto-approve, cwd, git branch, tokens, and model.
Widget for displaying a unified diff with syntax highlighting.
Modal dialog for theme selection with live preview.
Strategy for building a tool's HITL approval widget.
Renderer for write_file tool - shows full file content.
Renderer for task tool — interrupt description provides full context.
Renderer for edit_file tool - shows unified diff.
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.
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.
Soft-wrapping text input for free-form ask-user questions.
Posted when the user presses Enter to submit the answer.
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.
Emit scroll changes so the parent can refresh the overflow indicator.
Message sent when the controls pane scroll position changes.
Confirmation modal shown before deleting a thread.
Scope dropdown overlay that consumes option navigation while focused.
Scope dropdown that keeps focus contained while its menu is open.
Modal dialog for browsing and resuming threads.
Result of formatting tool output for display.
Widget displaying a user message.
Widget displaying a queued (pending) user message in grey.
Widget displaying a skill invocation with collapsible body.
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.
Approval menu using standard Textual patterns.
Message sent when user makes a decision.
Extended skill metadata for CLI display, adds source tracking.
Structured prompt and checkpoint metadata for a skill invocation.
Slack-hosted MCP: paste-back Authorization Code with a public client.
GitHub-hosted MCP: RFC 8628 Device Authorization Grant.
Outcome of a provider's pre-handshake run_login step.
Base class for provider-specific OAuth dispatch.
Fallback provider for spec-compliant MCP servers with no quirks.
Base error for sandbox provider operations.
Raised when the requested sandbox cannot be found.
Interface for creating and deleting sandbox backends.
Persist theme preference to ~/.deepagents/config.toml.
Persist a [ui.terminal_themes][term_program] = name entry.
Run the Textual application.
Run a single task non-interactively and exit.
Resolve ${VAR} env-var references in header values.
Construct an OAuthClientProvider for an MCP server.
Find an MCPReauthRequiredError anywhere inside exc's tree.
Drive OAuth login for server_name, persisting tokens on success.
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.
Check if optional dependencies are installed.
Check for recommended external tools and return missing tool names.
Build a PendingNotification for a missing optional tool.
Format a missing-tool warning for non-interactive console output.
Parse command line arguments.
Run the Textual TUI interface (async version).
Read piped stdin and merge it into the parsed CLI arguments.
Entry point for console script.
Extract skill name and args from a /skill:<name> command.
Build autocomplete entries for discovered skills.
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.
Concatenate all section functions into the full detection script.
Read the server project context from environment transport data.
Find the project root by looking for git metadata.
Find project-specific AGENTS.md file(s).
Load and validate MCP configuration from a JSON file.
Find MCP config files from standard locations.
Reset the terminal's dynamic default background color with OSC 111.
Return " (released Nd ago)" for version, or "" when unknown.
Return a human-readable age for SDK version (e.g., 'released 3d ago').