v0.2.2 — Go + Bubble Tea

Autonomous AI agent TUI for CTF and pentesting.

z2e-terminal accepts natural-language missions, plans and executes multi-step CLI actions autonomously, observes output, reasons, and iterates until the objective is reached.

~4,000
Go LOC
250+
Models
30
Max Steps
2
Retries
64KB
Output Cap
60s
Timeout
Z2E Demo
YouTube

Features

Everything you need for autonomous security operations.

Agent Loop

Plan → Execute → Observe → Replan cycle with SSE streaming, doom-loop detection, and up to 30 autonomous steps.

250+ Models

Route through any AI Gateway provider. Switch models at runtime via /model. OpenAI, Anthropic, Google, DeepSeek, Meta, Mistral, xAI and more.

CTF System Prompt

Built-in CTF-oriented persona with crypto, web exploitation, and OSINT methodology. Tool-first approach with evidence-based iteration.

Tool Execution

Pure pass-through policy. bash / run_command with timeout enforcement, 64KB output capture, and doom-loop protection.

Session Debug

Live JSON snapshot at /tmp/z2e-terminal/session.json with per-step traces. Full conversation history and doom-loop monitoring.

Bubble Tea TUI

Vim-style modal input, markdown rendering via glamour, runtime model picker, and full mouse support.

Architecture

~4,000 LOC of Go across 5 clean layers.

TUI
Bubble Tea
internal/ui/
Agent
Runtime + Tools
internal/agent/
Gateway
SSE Client
internal/llm/gateway/
Executor
Shell Runner
internal/executor/
Config
Env Loader
internal/config/

Autonomous agent in action

Watch the agent plan, execute, and iterate on CTF challenges.

leon — Kitty

Get started

Clone the repo, set your API key, and run your first mission.

© 2026 Z2E-Agent Team. All rights reserved.