9 tháng trước, Mitchell Hashimoto công bố libghostty. Hôm nay, 25+ project AI agent đã xây dựng trên nó.
Không phải ngẫu nhiên. AI coding agents (Claude Code, OpenCode, Codex) cần terminal — và libghostty là cách embed terminal đúng đắn nhất hiện tại.
AI Agent Ecosystem 2026
┌─────────────────┐
Claude Code ────────────→│ │
OpenCode ────────────→│ libghostty │
Codex ────────────→│ terminal core │
Cline ────────────→│ (C API, WASM) │
└─────────────────┘
↓
Workspace app UI (SwiftUI/GPUI/Tauri)plaintextTại Sao AI Agent Cần Terminal?#
AI coding agents hoạt động theo vòng lặp:
Read code → Plan → Write code → Run command → Read output → Repeat
↓
Cần terminalplaintextKhông phải terminal “gõ lệnh xem output” đơn giản. Agent cần:
- Nhiều terminal song song — chạy test, build, dev server cùng lúc
- Theo dõi trạng thái — agent nào đang chạy, output gì
- Session persistence — không mất context khi restart
- Programmatic access — đọc/write terminal programmatically
- Isolation — mỗi agent một sandbox riêng
Workspace app cho AI agents là thể loại app mới — và libghostty là terminal engine được chọn.
The Big Players#
Mux (coder.com)#
# Desktop + browser app cho isolated, parallel agentic development
- Multiple agent sessions side-by-side
- Terminal rendering via libghostty
- Web version dùng ghostty-web (xterm.js API compatible)bashTác giả coder.com cũng tạo ghostty-web và libghostty-vt-node — đầu tư sâu vào ecosystem.
Ghostree#
Ghostty fork thêm:
- Native git worktree support
- AI agent integration
- Mỗi worktree = môi trường riêng cho agent
AiyuTerm#
macOS native:
├── Multi-repo sidebar
├── Persistent split layouts
├── SSH + tmux support
├── Real-time AI agent status dashboard
└── libghostty terminal coreplaintextSupacode#
Open-source macOS “command center” cho coding agents:
# Chạy nhiều agents song song
supacode run --agent claude --task "Fix bug in auth"
supacode run --agent opencode --task "Add tests"
supacode ps # Xem trạng thái tất cả agentsbashParallel Agent Workflow#
Xu hướng mới: chạy nhiều agents song song trên cùng workspace.
Workspace App
├── Agent 1: Claude Code → refactor API layer [running]
│ └── terminal: npm test -- --watch
├── Agent 2: OpenCode → implement user authentication [idle]
│ └── terminal: waiting for review
├── Agent 3: Codex → write documentation [done]
│ └── terminal: output archived
└── Agent 4: Cline → database migration [error]
└── terminal: schema conflict detectedplaintextCác app như Mux0, cmux, moss, Factory Floor đều theo pattern này. libghostty cho phép mỗi agent có terminal riêng, mỗi terminal chạy trong process riêng, render độc lập.
Agent-Aware Features#
Status Tracking#
// libghostty-vt cho phép đọc terminal state real-time
// App dùng để hiển thị trạng thái agent
interface AgentSession {
terminal: VirtualTerminal
status: 'running' | 'idle' | 'error' | 'done'
command: string
output: string // Từ libghostty get_text()
exitCode?: number
}typescriptApp như AiyuTerm, in0, Zentty hiển thị trạng thái agent bên cạnh terminal — màu xanh/đỏ/vàng, thời gian chạy, lệnh hiện tại.
Notification on Completion#
// cmux — macOS notifications cho AI agents
// Khi agent chạy xong hoặc lỗi → notification
// libghostty cho biết terminal đã có output mớiswiftSession Persistence#
// Zmx — dùng libghostty-vt để save/restore terminal state
// Agent chạy dở → restart → restore nguyên trạng tháigoAgent Sandbox#
Agent sandbox (codelima)
├── VM cô lập
├── libghostty terminal
├── Filesystem riêng
└── Network policy riêngplaintextWorkspace App Categories#
Terminal Multiplexer cho Agents#
| App | Platform | Đặc điểm |
|---|---|---|
| Mux0 | macOS | Workspaces, tabs, split panes. Live status cho Claude Code, OpenCode, Codex |
| cmux | macOS | Vertical tabs, notifications cho AI agents |
| Forge | macOS | Multiplexer cho parallel CLI agents + long-running tasks |
| Muxy | macOS | SwiftUI multiplexer |
| Mori | macOS | Workspace tổ chức theo project + worktree, tmux + libghostty |
AI-Native Terminal#
| App | Platform | Đặc điểm |
|---|---|---|
| blink | macOS | AI terminal hiện đại |
| limpid | macOS | macOS-native cho AI coding agent era |
| witty | Cross-platform | Python + Qt6 + Rust, AI-powered |
| frep | macOS | Agentic terminal emulator |
| con-terminal | macOS | Built-in AI harness |
Multi-Agent Workspace#
| App | Platform | Đặc điểm |
|---|---|---|
| Supacode | macOS | Command center chạy agents song song, open-source |
| moss | macOS | Multi-terminal canvas, agent status tracking, file preview |
| AiyuTerm | macOS | Multi-repo sidebar, SSH, tmux, real-time agent status |
| Factory Floor | macOS | Parallel development + git worktrees + Claude Code agents |
| paulatty | macOS | AI agent team workspace |
| taskers | macOS | Agent-first terminal workspace, Rust shell, Niri-like tiling |
| Zentty | macOS | Vertical tabs, worklanes, notifications, agent-aware sidebar |
| in0 | macOS | Multiplexer với live AI agent status |
| agtmux-term | macOS | AI-agent-aware terminal, SwiftUI sidebar |
Agent IDE#
| App | Platform | Đặc điểm |
|---|---|---|
| moai-studio | Cross-platform | Rust + GPUI, SPEC-first development, MoAI-ADK |
| YEN | macOS | Terminal-first IDE, speech-to-text, themes, notifications |
| TheCommander | macOS | Diff review, git workflow, worktree management |
| ADHDev | Cross-platform | Self-hosted control plane cho AI coding agents |
Agent Infrastructure#
| App | Platform | Đặc điểm |
|---|---|---|
| codelima | macOS | Chạy agents trong VM sandbox cô lập |
| wispterm | Cross-platform | Terminal workspace cho remote development + AI agents |
| Ghostree | macOS | Ghostty fork + git worktree + AI agents |
| Aizen | macOS | Workspace cho parallel development |
Tại Sao libghostty Thắng Thế Này?#
So sánh với các lựa chọn khác cho AI agent terminal:
| Tiêu chí | xterm.js | libvte | Tự viết | libghostty |
|---|---|---|---|---|
| Native perf | ❌ (JS) | ✅ | ⚠️ | ✅ (Zig) |
| Embed C API | ❌ | ✅ | ✅ | ✅ |
| Zero dependency | ❌ | ❌ | ✅ | ✅ |
| WASM | ✅ | ❌ | ❌ | ✅ |
| Kitty protocol | ❌ | ❌ | ❌ | ✅ |
| Tmux control | ❌ | ❌ | ❌ | ✅ |
| Programmatic read | ⚠️ | ✅ | ✅ | ✅ |
| macOS native | ❌ | ❌ | ⚠️ | ✅ |
xterm.js là lựa chọn cũ (VS Code dùng). Nhưng cho native macOS app, xterm.js nghĩa là nhúng cả Chromium/WebView — nặng, chậm.
libghostty native, nhẹ (~14KB), C API = gọi từ Swift/Rust/Go dễ dàng.
Tương Lai: Terminal Cho AI Agents#
Xu hướng đang hình thành:
- Từ terminal app → agent workspace: Không chỉ gõ lệnh, mà quản lý agents
- Multi-agent parallel: Nhiều agents chạy cùng lúc, mỗi agent terminal riêng
- Programmatic terminal: AI đọc/write terminal trực tiếp, không qua UI
- Session persistence: Terminal state sống qua restart
- Remote agents: Agents chạy trên server, terminal render local (libghostty + WASM)
// Tương lai: AI agent workspace API
const workspace = new AgentWorkspace()
const agent = workspace.createAgent({
name: 'refactor-auth',
model: 'claude-code',
terminal: { rows: 40, cols: 120 },
sandbox: { type: 'vm', image: 'ubuntu:24.04' },
})
// Agent chạy, terminal render real-time
agent.onOutput((text) => console.log(text))
// Human take over khi cần
agent.onBlocked(async (reason) => {
const input = await askUser(`Agent stuck: ${reason}`)
agent.continue(input)
})typescriptlibghostty là nền tảng cho tầm nhìn này. Terminal không còn là app — terminal là component.
Tổng Kết#
25+ AI agent project trên libghostty trong 9 tháng không phải ngẫu nhiên.
# 2025: libghostty ra mắt
# 2026: 25+ AI agent apps built on libghostty
# Next: terminal là component, workspace cho agents là appbashlibghostty cung cấp terminal engine đúng cho kỷ nguyên AI coding agents: native, nhẹ, C API, WASM, programmatic access. Còn lại là workspace UX do cộng đồng xây.