Skip to main content
The Web terminal plugin provides browser-based terminal access to agent sessions using xterm.js. Unlike iTerm2, it doesn’t directly open terminals but generates URLs for the web dashboard to render terminal interfaces.

Overview

The Web terminal plugin provides:
  • Cross-platform terminal access (any OS)
  • Browser-based xterm.js interface
  • URL generation for dashboard terminal pages
  • Session open state tracking
  • No external dependencies
  • Remote access capability
The Web terminal plugin is platform-agnostic and works on any operating system with a web browser.

How It Works

The Web terminal plugin is passive compared to iTerm2:
  1. URL Generation: Creates dashboard URLs for terminal access
  2. State Tracking: Tracks which sessions have been “opened”
  3. Console Logging: Outputs URLs for manual access
  4. Dashboard Integration: Web dashboard uses session runtime info for actual terminal connection
The plugin doesn’t open browser windows automatically. It logs URLs that you can open manually or that the dashboard can detect.

Configuration

Add the Web terminal plugin to your agent-orchestrator.yaml:

Configuration Options

string
default:"http://localhost:3000"
Base URL for the web dashboard. Used to generate terminal page URLs.Examples:
  • Local development: http://localhost:3000
  • Remote server: https://orchestrator.example.com
  • Custom port: http://localhost:8080

URL Format

The plugin generates two types of URLs:

Single Session Terminal

Example:

All Sessions Page

Example:

Dashboard Integration

The Web terminal plugin works with the Agent Orchestrator web dashboard: Dashboard Setup:
  1. Start the web server:
  2. Navigate to session page:
  3. Dashboard uses xterm.js to connect to the session’s runtime
Connection Flow:
  1. Dashboard reads session metadata
  2. Extracts runtimeHandle attachment info
  3. Creates xterm.js terminal instance
  4. Connects to runtime (e.g., tmux session via WebSocket proxy)
The dashboard handles the actual terminal connection. The plugin only tracks session open state and generates URLs.

Usage Examples

Local Development

Usage:

Remote Server

Usage:

Custom Port

Multi-Environment

Session State Tracking

The plugin tracks which sessions have been “opened”:
State tracking is in-memory only. Restarting the orchestrator clears the open state.

Browser-Based Terminal

The web dashboard uses xterm.js for terminal rendering: Features:
  • Full ANSI color support
  • Copy/paste (browser-dependent)
  • Resizable terminal
  • Mouse support
  • Keyboard shortcuts
  • UTF-8 character support
Keyboard Shortcuts (default xterm.js):
  • Copy: Ctrl+Shift+C (or Cmd+C on macOS)
  • Paste: Ctrl+Shift+V (or Cmd+V on macOS)
  • Clear: Ctrl+L
  • Search: Ctrl+Shift+F
Keyboard shortcuts may vary based on browser and xterm.js addons. Check the dashboard documentation for the full list.

Remote Access

The Web terminal plugin enables remote access to agent sessions: Scenario: Agent runs on server, you access from laptop
  1. Deploy orchestrator on server:
  2. Configure plugin:
  3. Access from anywhere:
Security Considerations:
  • Use HTTPS for remote dashboards
  • Implement authentication (not included in base dashboard)
  • Use VPN or SSH tunneling for sensitive sessions
  • Restrict dashboard port access with firewall rules

Troubleshooting

Check dashboard is running:
Verify session exists:
Check browser console:
  • Open DevTools (F12)
  • Look for xterm.js errors
  • Verify WebSocket connection
Check runtime attachment info:
Verify runtime is accessible:
  • For tmux: tmux ls should show session
  • For docker: container should be running
Check dashboard logs:
Update config:
Verify environment:
Browser focus issues:
  • Click inside terminal area
  • Check browser doesn’t have conflicting shortcuts
  • Try different browser
xterm.js not initialized:
  • Refresh page
  • Check browser console for errors
  • Verify xterm.js loaded successfully
Browser security restrictions:
  • Use keyboard shortcuts: Ctrl+Shift+C/V
  • Some browsers require HTTPS for clipboard access
  • Check browser clipboard permissions
Alternative: Use iTerm2 plugin for native copy/paste if on macOS.

Comparison with iTerm2

Use Cases

Perfect for:
  • CI/CD server with orchestrator
  • Shared development server
  • Team collaboration on agent sessions
  • Accessing sessions from any device
Perfect for:
  • Linux development machine
  • Windows + WSL
  • Docker-based workflows
  • Any non-macOS environment
Perfect for:
  • Screen sharing agent sessions
  • Client demonstrations
  • Training sessions
  • Recording terminal sessions
Perfect for:
  • Chromebook or thin client access
  • Tablet/mobile access (with caveats)
  • Kiosk mode displays
  • Embedded terminal in other web apps

Source Code

View the plugin source:
  • Package: @composio/ao-plugin-terminal-web
  • Location: packages/plugins/terminal-web/src/index.ts
  • Dashboard: packages/web/app/sessions/[id]/terminal/page.tsx