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
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.
Adapter for rendering agent output to Textual widgets.
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.
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.
Middleware that provides an ask_user tool for interactive questioning.
A persisted API key credential.
A persisted OAuth subscription credential.
Result of a credential write that may have warnings to surface.
A dangerous Unicode character found in text.
Safety analysis output for a URL string.
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.
Full configuration payload passed from the app to the server subprocess.
User-facing OAuth interaction surface shared by CLI and TUI.
Default OAuthInteraction that drives the flow via stdin/stdout.
Discriminator for ConfigResolutionError reasons.
Structured error returned when a login target cannot be resolved.
Successful resolution of a merged MCP config for login.
Resolved server config plus enough context for error messages.
Explicit user/project path context for project-sensitive behavior.
Complete set of semantic colors for one theme variant.
Metadata for a registered theme.
Metadata for a custom subagent loaded from filesystem.
Extends agent state with per-checkpoint facts restored on resume.
Persists per-checkpoint resume facts after each model call.
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.
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.
State for local context middleware.
Inject local context (git state, project structure, etc.) into the system prompt.
Runtime context passed via context= to the LangGraph graph.
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.
Swap the model or per-call settings from runtime.context.
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.
Base class for typed LangSmith project URL lookup failures.
The langsmith package is not installed.
The LangSmith project URL lookup exceeded its hard timeout.
The LangSmith SDK call raised — auth, 404, network, etc.
Result of creating a chat model, bundling the model with its metadata.
Deterministic chat model for integration tests.
Install status for one optional dependency extra.
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.
Parsed MCP server config entry.
File-backed TokenStorage under ~/.deepagents/.state/mcp-tokens/.
Raised when an MCP server needs interactive re-authentication.
Manages a langgraph dev server subprocess.
Unified parse result for dropped-path payload detection.
Track pasted images and videos in the current conversation.
Successful offload result.
Offload was a no-op — conversation is within the retention budget.
Raised when the model cannot be created for offloading.
Represents a pasted image with its base64 encoding.
Represents a pasted video with its base64 encoding.
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.
OSC 9;4 progress states.
Client that talks to a LangGraph server over HTTP+SSE.
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.
Raised when a provider is selected but its LangChain package is not installed.
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.
Validate shell commands against an allow-list without HITL interrupts.
Token stats for a single model within a session.
Stats accumulated over a single agent turn (or full session).
Thread metadata returned by list_threads.
Base error for sandbox provider operations.
Raised when the requested sandbox cannot be found.
Interface for creating and deleting sandbox backends.
Structured prompt and checkpoint metadata for a skill invocation.
Extended skill metadata for CLI display, adds source tracking.
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.
Slack-hosted MCP: loopback Authorization Code with a public client.
Welcome banner displayed at startup.
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.
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.
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.
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.
Animated spinner using charset-appropriate frames.
Animated loading indicator with status text and elapsed time.
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.
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.
A selectable tool item in the MCP viewer.
A selectable server-header row in the MCP viewer.
Modal viewer for active MCP servers and their tools.
Approval menu using standard Textual patterns.
Message sent when user makes a decision.
Posted when the changelog row is clicked with the mouse.
Modal dedicated to the update-available notification.
Raised by MCPLoginScreen.action_cancel when the user cancels the flow.
Modal that renders the OAuth login flow and collects user input.
Widget for displaying a unified diff with syntax highlighting.
Modal dialog for managing startup warning preferences.
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.
Modal dialog for theme selection with live preview.
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.
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.
A label that displays a model name, right-aligned with smart truncation.
Status bar showing mode, auto-approve, cwd, git branch, tokens, and model.
First-step onboarding screen that asks for the user's name.
Onboarding screen that summarizes installed optional integrations.
Modal asking whether to restart the server after an MCP login.
Confirmation overlay for /mcp reconnect --force with no pending login.
Manages command history with file persistence.
Posted when an _ActionOption is clicked with the mouse.
Modal displaying a single notification's title, body, and actions.
A clickable model option in the selector.
Message sent when a model option is clicked.
Full-screen modal for model selection.
Modal that shows self-update progress and a bounded log tail.
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.
Print a model-usage stats table to a Rich console.
Execute a task with output directed to Textual UI.
Persist theme preference to ~/.deepagents/config.toml.
Persist a [ui.terminal_themes][term_program] = name entry.
Run the Textual application.
Return " (released Nd ago)" for version, or "" when unknown.
Return a human-readable age for SDK version (e.g., 'released 3d ago').
Fetch the LangSmith project URL, raising on any failure.
Validate that the model has required capabilities for deepagents.
Check that langchain-quickjs is installed for the --interpreter flag.