
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.
root@z2e:~# export AI_GATEWAY_API_KEY="..."root@z2e:~# just run
Features
Everything you need for autonomous security operations.
Agent Loop
Plan, execute, observe, replan. SSE streaming, doom-loop detection, up to 30 autonomous steps per mission.
250+ Models
Route through any AI Gateway provider. Switch at runtime via /model. OpenAI, Anthropic, Google, DeepSeek, Meta, Mistral, xAI.
CTF System Prompt
Built-in CTF persona with crypto, web exploitation, OSINT methodology. Tool-first, evidence-based iteration.
Tool Execution
Pure pass-through policy. bash / run_command with timeout enforcement, 64KB output capture, doom-loop guard.
Session Debug
Live JSON snapshot at /tmp/z2e-terminal/session.json. Per-step traces, full history, doom-loop monitoring.
Bubble Tea TUI
Vim-style modal input, glamour markdown render, runtime model picker, full mouse support, alt-screen.
How it works
One mission, five stages, zero hand-holding.
Natural-language mission from operator.
Agent reasons, picks tools, sequences steps.
Runs shell commands, captures output live.
Parses results, validates, learns from output.
Replans until objective reached or cap hit.
Autonomous agent in action
Watch the agent plan, execute, and iterate on CTF challenges.