Embedded multi-session terminal panel for Agent Zero.
This plugin adds a terminal button to the chat input area and opens a docked terminal panel directly inside the Agent Zero UI. It supports multiple PTY-backed sessions, tab switching, live resize, persistent sessions while hidden, and a configurable startup directory across both Docker and local development runtimes.
- Open a terminal panel directly from the Agent Zero chat UI
- Automatically create the first session when the panel opens
- Run multiple terminal sessions with tab switching
- Copy selected terminal text and paste clipboard content from dedicated panel controls
- Resize the panel vertically from the UI
- Keep sessions alive while the panel is hidden, or close them on hide
- Configure startup directory, font size, cursor blink, and default panel height
- Resolve
/a0/...startup directories correctly in both Docker and local development - Works from
usr/plugins/docker_terminalwithout any symlink or install script
Plugin settings are available under the Developer settings section.
After the plugin is enabled:
- Open Agent Zero in the browser.
- Click the
Terminalbutton near the chat input. - The panel opens and creates a session automatically if none exist yet.
- Use the
+tab button to create additional sessions. - Use the copy and paste buttons in the tab bar for clipboard operations (
Ctrl+Shift+CandCtrl+Shift+Vare also supported). - Use the close button on a tab to close a session.
- Collapse the panel with the arrow button when you want to hide it.
The plugin exposes the following settings:
startup_directory: absolute native path or/a0/...path used for new sessionspreserve_sessions_on_hide: keep sessions running when the panel is hiddenfont_size: terminal font size in pixelscursor_blink: enable or disable the blinking cursordefault_panel_height_vh: initial panel height as viewport percentage
Default configuration:
startup_directory: ""
preserve_sessions_on_hide: true
font_size: 14
cursor_blink: true
default_panel_height_vh: 40- The terminal runs inside the Agent Zero runtime environment, so it has access to the same filesystem and tools available to that runtime.
- In Docker,
/a0/...paths are used directly. In local development,/a0/...paths are resolved to the matching local checkout path for execution while still being shown as/a0/...in the UI when applicable. - Plugin installs and updates close existing terminal sessions, remove stale loaded plugin modules, and clean local bytecode caches so websocket reconnects can recover without an app restart.
- The frontend loads
xterm.jsandxterm-addon-fitfrom jsDelivr CDN at runtime. - This plugin is designed for the Agent Zero plugin system and should live at the repository root when published as a standalone plugin repository.
docker_terminal/
├── plugin.yaml
├── default_config.yaml
├── api/
├── extensions/
├── helpers/
└── webui/
Plugin-local Python imports should use the fully qualified usr.plugins...
package path:
import usr.plugins.docker_terminal.helpers.session_store as session_store
from usr.plugins.docker_terminal.helpers.session_runtime import create_terminal_sessionThis avoids sys.path hacks, avoids persistent symlinks into /a0/plugins/,
and keeps plugin imports reversible: when the plugin is removed, no global
import wiring should remain behind.
MIT