Title: widgets | deepagents_code | LangChain Reference
Open Graph Title: widgets | deepagents_code
X Title: widgets | deepagents_code
Description: Python API reference for widgets in deepagents_code. Part of the LangChain ecosystem.
Open Graph Description: Python API reference for widgets in deepagents_code. Part of the LangChain ecosystem.
X Description: Python API reference for widgets in deepagents_code. Part of the LangChain ecosystem.
Opengraph URL: https://reference.langchain.com/python/deepagents-code/widgets
Domain: reference.langchain.com
| og:image | https://reference.langchain.com/og/python/deepagents-code/widgets |
| og:image:width | 1200 |
| og:image:height | 630 |
| og:image:alt | widgets | deepagents_code |
| og:type | article |
| twitter:card | summary_large_image |
| twitter:image | https://reference.langchain.com/og/python/deepagents-code/widgets |
Links:
| LangChain Reference home page | https://reference.langchain.com/ |
| GitHub | https://github.com/langchain-ai |
| Main Docs | https://docs.langchain.com/oss/python/deepagents |
| Deep Agents | https://reference.langchain.com/python/deepagents |
| LangChain | https://reference.langchain.com/python/langchain/overview |
| LangGraph | https://reference.langchain.com/python/langgraph/overview |
| Integrations | https://reference.langchain.com/python/integrations/overview |
| LangSmith | https://reference.langchain.com/python/langsmith |
| Deep Agents Code | https://reference.langchain.com/python/deepagents-code |
| Deep Agents Code | https://reference.langchain.com/python/deepagents-code |
| deepagents-code | https://reference.langchain.com/python/deepagents-code |
| modulecodex_authChatGPT OAuth sign-in screen, reachable via /auth -> openai_codex. Mirrors the MCP loopback flow in mcp_auth from the user's POV: a modal shows progress, surfaces the authorize URL inline (so headless / SSH users can copy it when the browser launch fails), and dismisses once the OAuth callback completes. The OAuth primitives themselves (PKCE, callback HTTP server, token exchange, refresh, atomic file write) are delegated to langchain_openai.chatgpt_oauth via the deepagents_code.integrations.openai_codex adapter. Security notes: The authorize URL displayed inline does not contain secrets — it carries only the PKCE challenge (the verifier never leaves this process). The success / error messages reported back via notify never include the access token, refresh token, or ID token. | https://reference.langchain.com/python/deepagents-code/widgets/codex_auth |
| modulemcp_reconnectConfirmation modal shown after a successful MCP login. Restarting the LangGraph server is required for newly minted MCP tokens to take effect, but auto-restarting interrupts users who want to authenticate against several MCP servers back-to-back. This modal lets the user choose between restarting now and deferring until later. | https://reference.langchain.com/python/deepagents-code/widgets/mcp_reconnect |
| modulesubagent_panelLive panel showing subagents fanned out from within js_eval calls. When the agent writes code that calls the top-level task() global, each dispatch runs as a subagent inside a single js_eval tool call which is invisible to the normal message stream. The QuickJS task bridge emits lifecycle events on the custom stream. This widget consumes them and renders a docked, live-updating fan-out panel. Trust note: description/subagent_type and error strings originate from LLM-authored JavaScript executed in the sandbox, so they are untrusted. We route every rendered string through sanitize_control_chars which strips control/escape/bidi characters and only ever render via Content.styled / markup=False Static updates, so embedded Textual markup and terminal escapes cannot influence rendering or panel state. | https://reference.langchain.com/python/deepagents-code/widgets/subagent_panel |
| moduleloadingLoading widget with animated spinner for agent activity. | https://reference.langchain.com/python/deepagents-code/widgets/loading |
| modulemessagesMessage widgets. | https://reference.langchain.com/python/deepagents-code/widgets/messages |
| moduleupdate_confirmConfirmation modals for /update dependency-refresh flows in the TUI. When deepagents-code itself is already on the latest release, /update can still re-resolve its dependencies to the newest versions allowed by the pinned ranges (e.g. a new langchain-openai). The already-current path dry-runs the resolution first, then asks for explicit confirmation only when dependencies can move. /update --deps skips that prompt, but asks before taking an available app update ahead of the dependency refresh for the current app version. | https://reference.langchain.com/python/deepagents-code/widgets/update_confirm |
| moduleagent_selectorInteractive agent selector screen for /agents command. | https://reference.langchain.com/python/deepagents-code/widgets/agent_selector |
| moduletool_renderersTool renderers for approval widgets - registry pattern. | https://reference.langchain.com/python/deepagents-code/widgets/tool_renderers |
| modulenotification_settingsNotification settings screen for /notifications command. | https://reference.langchain.com/python/deepagents-code/widgets/notification_settings |
| moduleautocompleteAutocomplete system for @ mentions and / commands. This is a custom implementation that handles trigger-based completion for slash commands (/) and file mentions (@). | https://reference.langchain.com/python/deepagents-code/widgets/autocomplete |
| modulehistoryCommand history manager for input persistence. | https://reference.langchain.com/python/deepagents-code/widgets/history |
| moduleupdate_progressProgress modal for app self-update installs. | https://reference.langchain.com/python/deepagents-code/widgets/update_progress |
| moduleupdate_availableDedicated modal for the update-available notification. Shown automatically at startup when a newer version of deepagents-code is available on PyPI. Surfaces the same actions the notification center would offer for the update entry but with a focused, single-purpose presentation instead of the generic notification list. | https://reference.langchain.com/python/deepagents-code/widgets/update_available |
| modulechat_inputChat input widget for deepagents-code with autocomplete and history support. | https://reference.langchain.com/python/deepagents-code/widgets/chat_input |
| modulecwd_switchPrompt for switching cwd when resuming threads. | https://reference.langchain.com/python/deepagents-code/widgets/cwd_switch |
| moduleask_userAsk user widget for interactive questions during agent execution. | https://reference.langchain.com/python/deepagents-code/widgets/ask_user |
| moduletheme_selectorInteractive theme selector screen for /theme command. | https://reference.langchain.com/python/deepagents-code/widgets/theme_selector |
| moduleauthTUI screens for managing stored model-provider credentials. AuthPromptScreen accepts an API key for a single provider, persists it via auth_store, and is the sole place that deletes existing credentials (after a DeleteCredentialConfirmScreen confirmation). AuthManagerScreen lists known providers and routes the user into the prompt; it does not delete directly. Both are reachable via the /auth slash command. Security notes: Inputs are rendered with password=True so the key is never echoed to the terminal. This module never logs the key value, never includes it in notify() payloads, and never round-trips it through Rich markup. Callers that introduce new logging here must do the same. | https://reference.langchain.com/python/deepagents-code/widgets/auth |
| moduleapprovalApproval widget for HITL - using standard Textual patterns. | https://reference.langchain.com/python/deepagents-code/widgets/approval |
| modulegoal_reviewGoal acceptance-criteria review widget. | https://reference.langchain.com/python/deepagents-code/widgets/goal_review |
| modulemcp_viewerRead-only MCP server and tool viewer modal. | https://reference.langchain.com/python/deepagents-code/widgets/mcp_viewer |
| modulelaunch_initOnboarding screens for the interactive TUI. | https://reference.langchain.com/python/deepagents-code/widgets/launch_init |
| modulethread_selectorInteractive thread selector screen for /threads command. | https://reference.langchain.com/python/deepagents-code/widgets/thread_selector |
| modulestatusStatus bar widget. | https://reference.langchain.com/python/deepagents-code/widgets/status |
| moduleeffort_selectorInteractive reasoning effort selector for /effort. | https://reference.langchain.com/python/deepagents-code/widgets/effort_selector |
| modulenotification_detailGeneric detail modal for a single pending notification. Used by NotificationCenterScreen when the user drills into an entry whose payload does not have a dedicated modal (e.g. missing-dependency notices). Update-available notifications continue to use UpdateAvailableScreen, which adds a changelog row on top of the action list. Dismisses with the selected ActionId, or None on Esc. | https://reference.langchain.com/python/deepagents-code/widgets/notification_detail |
| modulerestart_promptConfirmation modal offered after a restart-capable /install. Provider and sandbox extras (and --package installs) are imported by the app-owned LangGraph server subprocess, so a /restart loads them without exiting the TUI. Rather than make the user type /restart by hand, this modal offers to run that restart immediately while leaving deferral one keypress away. | https://reference.langchain.com/python/deepagents-code/widgets/restart_prompt |
| modulemessage_storeMessage store for virtualized chat history. This module provides data structures and management for message virtualization, allowing the TUI to handle large message histories efficiently by keeping only a sliding window of widgets in the DOM while storing all message data as lightweight dataclasses. The approach is inspired by Textual's Log widget, which only keeps N lines in the DOM and recreates older ones on demand. | https://reference.langchain.com/python/deepagents-code/widgets/message_store |
| modulenotification_centerNotification center modal for pending actionable notices. Surfaces a list of PendingNotification entries as single-line rows. Selecting a row drills into a dedicated detail modal (UpdateAvailableScreen for update entries, NotificationDetailScreen otherwise) stacked on top of the center. When the detail modal dismisses with any non-SUPPRESS action the center dismisses with a NotificationActionResult so the app layer can dispatch; SUPPRESS is handled in place via NotificationSuppressRequested so the remaining notifications stay reachable. When the detail cancels, the center stays open on the list. | https://reference.langchain.com/python/deepagents-code/widgets/notification_center |
| moduleskill_trustTrust prompt for skills that resolve outside trusted skill directories.
When a /skill: | https://reference.langchain.com/python/deepagents-code/widgets/skill_trust |
| moduleinstall_confirmConfirmation modal for /install | https://reference.langchain.com/python/deepagents-code/widgets/install_confirm |
| moduletool_widgetsTool-specific approval widgets for HITL display. | https://reference.langchain.com/python/deepagents-code/widgets/tool_widgets |
| modulewelcomeWelcome banner widget. | https://reference.langchain.com/python/deepagents-code/widgets/welcome |
| modulediffEnhanced diff widget for displaying unified diffs. | https://reference.langchain.com/python/deepagents-code/widgets/diff |
| modulemcp_loginIn-TUI MCP OAuth login modal. MCPLoginScreen is both a Textual ModalScreen and an implementation of OAuthInteraction. The login worker awaits its interaction methods while the user sees and acts on the modal's widgets — authorize URLs become clickable links, paste-back callback URLs go through an inline input row, device-code instructions render inline, and the modal closes itself on success. The screen runs on the Textual event loop (same loop as the worker), so methods called from the worker can await modal-bound futures directly without app.call_from_thread. | https://reference.langchain.com/python/deepagents-code/widgets/mcp_login |
| modulemodel_selectorInteractive model selector screen for /model command. | https://reference.langchain.com/python/deepagents-code/widgets/model_selector |
| View source on GitHub | https://github.com/langchain-ai/deepagents/blob/019900734024a7665fd65bd75235c6307d5da003/libs/code/deepagents_code/widgets/__init__.py |
Viewport: width=device-width, initial-scale=1