curl -LsSf https://langch.in/dcode | bash
# With model provider extras
# OpenAI, Anthropic, and Gemini are included by default
DEEPAGENTS_CODE_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:
By default, dcode trusts the directory you run it in. Human-in-the-loop approval gates model-requested tool calls, but project artifacts are read before any approval prompt.
Do not run dcode in a directory you do not trust without a sandbox backend. For untrusted repositories, use a remote sandbox so execution is isolated from your machine. Running dcode in a directory lets that directory's files shape execution. See THREAT_MODEL.md for details.
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.
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.
Complete set of semantic colors for one theme variant.
Metadata for a registered theme.
Classifier denial categories exposed to the agent and TUI.
One structured classifier decision for a proposed tool call.
Validated classifier response for one unresolved action batch.
Server-owned denial and availability counters for one thread.
Checkpoint-safe disposition for one gated call.
Private checkpoint record joining model output to after-model routing.
Server-owned provenance for one exclusively allocated scratch file.
Reducer update that creates or removes one exact artifact record.
Agent state carrying private Auto decisions and scratch provenance.
Trusted metadata attached by the Textual client to a user message.
Apply deterministic policy, classifier review, and HITL fallback.
Reject dynamically gated MCP calls when no approval UI exists.
Represents a pasted image with its base64 encoding.
Represents a pasted video with its base64 encoding.
Structured proposal returned by the criteria agent.
A new proposal or a rejection-based regeneration.
An amendment to an accepted goal; both extra fields are required.
Main-agent state carrying a criteria request until it is cleared.
Private per-invocation state for the nested criteria agent.
Run goal-criteria requests entirely inside the main server graph.
User-facing OAuth interaction surface shared by CLI and TUI.
Default OAuthInteraction that drives the flow via stdin/stdout.
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.
Posted whenever the chat's vertical scroll offset changes.
Posted whenever the bottom chrome's geometry changes.
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.
Middleware that provides an ask_user tool for interactive questioning.
Validate shell commands against an allow-list without HITL interrupts.
Stock HITL routing with an async live-mode read after model completion.
Raised when an external editor cannot be opened or read.
Path-safety and size limits for read-only repository inspection tools.
A different dcode entry point is winning on PATH than the one we upgraded.
A single package version change parsed from uv's environment-diff output.
Raised when uv tool requested requirements cannot be preserved.
Goal/rubric state channels shared by every schema that touches them.
Extends agent state with per-checkpoint facts restored on resume.
Persists per-checkpoint resume facts after each model call.
Read-only rubric view returned by the get_rubric tool to the model.
Read-only goal view returned by the get_goal tool to the model.
State fields used by goal tools.
Expose constrained goal tools and maintain the goal-state notice.
Unified parse result for dropped-path payload detection.
Track pasted images and videos in the current conversation.
Tool-approval policy selected for an interactive thread.
Stored approval-mode control payload.
Character set mode for TUI display.
Character glyphs for TUI display.
Global settings and environment detection for deepagents-code.
Why /trace found no LangSmith key, when an empty override is involved.
Offline snapshot of LangSmith tracing configuration for diagnostics.
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.
The LangSmith project does not exist yet (lookup returned 404).
Result of creating a chat model, bundling the model with its metadata.
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 project MCP server row shown to the user and gated for trust.
A persisted API key credential.
A persisted OAuth subscription credential.
Result of a credential write that may have warnings to surface.
Result of a credential delete that may have warnings to surface.
How an option's raw env/TOML value is coerced to a typed value.
One user-tunable configuration option and where it can be set.
Declared context_schema for the agent graph.
Client-facing builder for the per-run graph context payload.
Revert agent edits to the managed onboarding-name memory block.
Canonical goal/rubric fields used for notices and fingerprints.
Metadata extracted from a canonical goal-state notice.
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.
A project-scoped, definition-bound MCP server approval.
User-level allow/deny lists for project MCP servers.
Coalesced thread-selector configuration read from a single TOML parse.
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.
Structured log record retained by the in-memory debug buffer.
Logging handler retaining the most recent structured records in memory.
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.
Whether a probed path exists, is absent, or could not be read.
Swap the model or per-call settings from runtime.context.
Agent state extended with the cumulative thread-cost channel.
Own the thread's cumulative _session_cost_usd checkpoint value.
tool.use hook payload (schema documented in hooks).
tool.error hook payload (schema documented in hooks).
tool.result hook payload (schema documented in hooks).
In-progress state for a single streamed tool call.
Counts of buffered tool calls that never emitted a tool.use.
Deterministic chat model for integration tests.
Deterministic tool-calling model for auto-approve integration tests.
Exercise nested criteria generation with a repository read.
Parsed origin remote attribution for coding-agent-v1 traces.
OSC 9;4 progress states.
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.
Token stats for a single model within a session.
Token and cost stats for one UsageKind bucket.
Usage returned after recording one streamed model message.
Stats accumulated over a single agent turn (or full session).
What a stream consumer last recorded for one request.
Active model configuration read from a tool runtime.
Add hook-aware automatic and explicit forced compaction for dcode.
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.
Trusted same-turn authorization recorded after an ask_user response.
Widget result when the user submits answers.
Widget result when the user cancels the prompt.
Full configuration payload passed from the app to the server subprocess.
Raised when a downloaded archive fails SHA-256 verification.
Raised when no managed helper binary is available for this system.
Stored content for a collapsed paste.
A single labeled diagnostic fact.
A named group of related diagnostic items.
A single tool's display metadata.
A named group of tools sharing a source.
An MCP server that was discovered but currently exposes no tools.
Everything dcode tools list needs to render, in display order.
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.
Explicit user/project path context for project-sensitive behavior.
Nested-grader state used to scope verification-tool budgets.
Run a context-aware nested grader and retry transient transport failures.
Thread metadata returned by list_threads.
Metadata for a custom subagent loaded from filesystem.
Structured version facts for a single installed distribution.
Network-free snapshot of the version facts diagnostics need.
Raised when installed extras cannot be determined safely.
Install status for one optional dependency extra.
Resolved recovery action for a missing provider package.
A dangerous Unicode character found in text.
Safety analysis output for a URL string.
Parsed MCP server config entry.
File-backed TokenStorage under ~/.deepagents/.state/mcp-tokens/.
Raised when an MCP server needs interactive re-authentication.
State for local context middleware.
Inject local context (git state, project structure, etc.) into the system prompt.
Execute Hooks v2 invocations against one immutable snapshot.
Live client identity projected into every hook invocation.
Result of a lifecycle hook that may halt the caller.
Result of UserPromptSubmit, including its prompt rewrites.
Owns the Hooks v2 runtime, presenter, hook service, and transcripts.
One JSONL record in a materialized transcript projection.
Identity of a materialized transcript file.
Append-only JSONL transcript projections owned by the client process.
Collect completed stream messages into a Hooks transcript runtime.
Adapt hook invocations and handler output across the wire boundary.
Validated output and diagnostics from one command handler.
Persisted trust record for one canonical workspace root.
Versioned on-disk trust store for project-scoped hooks.
Decides whether project-scoped hooks may run in a given directory.
One ordered command handler in a configuration snapshot.
Matched handlers for one invocation.
Immutable, declaration-ordered Hooks v2 runtime configuration.
Supported hook handler executor kinds.
How non-JSON stdout is treated on a successful exit.
How exit code 2 is interpreted for an event.
How matching handler effects are combined.
Immutable capability description for one hook event.
Client-only materialization needed to build one hook wire envelope.
Client-owned session runtime around an immutable Hooks snapshot.
Deduplicate hook fulfillment for one client session.
LangGraph interrupt envelope for a server-owned hook invocation.
Callable that surfaces a user-visible hook notice.
Callable that updates hook-owned transient status text.
Lifecycle update for one running hook handler.
Present hook output consistently across interactive and headless clients.
Origin of the matcher groups contributed by one hooks document.
A project or user hooks file, which defines no variables.
Origin and environment for groups one enabled plugin contributed.
Validated configuration plus load diagnostics and source paths.
Raised when a client-owned hook stops lifecycle processing.
Client state required to create a domain hook invocation.
Execute client-owned events and apply their common side effects.
Client approval decision compatible with HITL resume payloads.
Normalized result shared by TUI and headless permission handling.
How one batch of gated tool calls was resolved by hooks.
Agent state extensions for server-owned hook middleware.
Emit server-owned lifecycle events over the hook interrupt transport.
Request sent for a server-owned hook invocation.
Response returned for a server-owned hook invocation.
Permission modes exposed by the compatible wire protocol.
Notification matcher values exposed on the wire.
Wire representation of model effort.
Permission rule returned by a hook.
Configuration scope targeted by a permission update.
Permission update that adds rules.
Permission update that replaces rules.
Permission update that removes rules.
Permission update that changes the active mode.
Permission update that adds allowed directories.
Permission update that removes allowed directories.
Background task snapshot exposed to hook handlers.
Scheduled session prompt exposed to hook handlers.
Fields common to every hook input.
Wire input for SessionStart.
Wire input for UserPromptSubmit.
Wire input for SessionEnd.
Wire input for PermissionRequest.
Wire input for Notification.
Wire input for PreToolUse.
Wire input for PostToolUse.
Wire input for PostToolUseFailure.
Wire input for PreCompact.
Wire input for Stop.
Wire input for SubagentStart.
Wire input for SubagentStop.
Event-specific output for SessionStart.
Event-specific output for UserPromptSubmit.
Event-specific output for PreToolUse.
Permission-request output that allows a tool call.
Permission-request output that denies a tool call.
Event-specific output for PermissionRequest.
Event-specific output for PostToolUse.
Event-specific output for PostToolUseFailure.
Event-specific output for Stop.
Event-specific output for SubagentStart.
Event-specific output for SubagentStop.
Compatible hook output with retained extension fields.
Configuration for a synchronous command hook.
A matcher and its ordered hook handlers.
Top-level configuration grouped by hook event.
Supported hook lifecycle events.
Process responsible for originating an event.
Reason a session-start event occurred.
Reason a session-end event occurred.
dcode lifecycle notifications with compatible wire mappings.
Reason context compaction was requested.
Native tool-call data used by hook lifecycle owners.
Resolved subagent identity.
A notification emitted by a dcode lifecycle owner.
Background task state captured for a hook invocation.
Scheduled session prompt captured for a hook invocation.
Context shared by every domain hook event.
Domain payload for SessionStart.
Domain payload for UserPromptSubmit.
Domain payload for SessionEnd.
Domain payload for PermissionRequest.
Domain payload for Notification.
Domain payload for PreToolUse.
Domain payload for PostToolUse.
Domain payload for PostToolUseFailure.
Domain payload for PreCompact.
Domain payload for Stop.
Domain payload for SubagentStart.
Domain payload for SubagentStop.
A domain hook event with its invocation context.
Structured diagnostic produced while processing a hook.
Normalized permission result from hook processing.
Fields common to every event-specific hook decision.
Decision returned for SessionStart.
Decision returned for UserPromptSubmit.
Decision returned for SessionEnd.
Decision returned for PermissionRequest.
Decision returned for Notification.
Decision returned for PreToolUse.
Decision returned for PostToolUse.
Decision returned for PostToolUseFailure.
Decision returned for PreCompact.
Decision returned for Stop.
Decision returned for SubagentStart.
Decision returned for SubagentStop.
Normalized effect produced by one hook handler.
Raised when a marketplace cannot be loaded.
Raised when a plugin manifest is malformed enough to skip the plugin.
Raised when existing plugin state cannot be safely modified.
Local directory or JSON file used as a marketplace source.
GitHub or Git repository used as a marketplace source.
Marketplace manifest downloaded from an HTTP URL.
Parsed plugin manifest.
Inventory of supported plugin components.
A discovered plugin ready to feed dcode adapters.
A plugin stored relative to its marketplace.
A plugin sourced from a GitHub repository.
A plugin sourced from a subdirectory in a Git repository.
A plugin sourced from a Git repository URL.
A catalog entry from a marketplace manifest.
A parsed marketplace manifest.
Persisted marketplace source record.
Install record for a plugin.
Result from plugin discovery.
Load namespaced plugin skills without extending the SDK source API.
Outcome of a revoke_skill_dir_trust call.
Extended skill metadata for CLI display, adds source tracking.
Structured prompt and checkpoint metadata for a skill invocation.
A tool.result payload held back until the authoritative result arrives.
A validated rubric_evaluation_end event forwarded to the caller.
Adapter for rendering agent output to Textual widgets.
Ask whether to compact a just-resumed thread before the next turn.
Arrow-key navigable plugin manager for /plugins.
Posted when a plugin manager tab label is clicked.
Mouse-clickable tab label in the plugin manager header.
Compact welcome banner shown at startup.
In-TUI first-run notice describing what Auto mode does.
Captured stdout printed during a js_eval evaluation.
A successful js_eval evaluation result.
An error raised during a js_eval evaluation.
Resolve an inline prompt result at most once.
Soft-wrapping text input shared by inline prompts.
Posted when the user presses Enter to submit text.
Render a selectable inline-prompt option with a cursor.
Modal dialog for managing 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.
Approval overlay for a skill resolving outside trusted directories.
Free-form answer input for ask-user questions.
Posted when the user presses Enter to submit an ask-user answer.
Interactive widget for asking the user questions.
Message sent when user submits all answers.
Message sent when user cancels the ask_user prompt.
A clickable model option in the selector.
Message sent when a model option is clicked.
Full-screen modal for model selection.
TextArea that detects paste-like keystroke bursts.
Paste-aware text area that collapses large pastes into placeholders.
Modal that shows self-update progress and a bounded log tail.
Result of formatting tool output for display.
Widget displaying a user message.
Posted when the collapsed-body expansion state changes.
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.
Collapsed one-line stand-in for an assistant step's tool calls.
Modal asking whether to switch cwd when resuming or switching to a thread.
Raised when the HITL interrupt loop exceeds _MAX_HITL_ITERATIONS rounds.
Build a safe agent/UI reason for a failed auto classifier call.
Return " (released Nd ago)" for version, or "" when unknown.
Return a human-readable age for SDK version (e.g., 'released 3d ago').
Read a live approval mode from the server-side LangGraph Store.
Resolve the model spec the Auto approval classifier should use.
Fetch the LangSmith project URL, raising on any failure.
Validate that the model has required capabilities for deepagents.
Load and validate project configs after resolving precedence.
Map a raw ToolMessage.status to the two-value hook domain, fail-closed.
Reset the terminal's dynamic default background color with OSC 111.
Collect version facts for the installed deepagents SDK distribution.
Neutralize control characters and deceptive Unicode in untrusted text.
Resolve or materialize a marketplace plugin entry to a plugin root.
Discover plugin skill sources, containment roots, and loaded ids.