How rahrajlat/gentui works
Gentui is a terminal client for AG-UI agents. The main workflow starts with a user message in the TUI, sends it through either the HTTP AG-UI client or the optional AgentCore transport, then renders streamed events as chat and tool widgets; interrupt widgets let the user approve or reject and resume the run. Separate branches provide demo and recorded-session replay. The README documents features such as themes, event inspection, and plugins; some implementations are unsampled, so only documented or indexed relationships are shown.
Main entry points: app.py Chat application · cli.py CLI entry · plugins.py Plugin system · replay.py Session replay
Components 22
Entry and configuration
- CLI entry
src/gentui/cli.py - Config loading
src/gentui/config.py
Agent connections
- AG-UI HTTP client
src/gentui/tui/agui_client.py - AgentCore client
src/gentui/tui/agentcore_client.py
Terminal interface
- Chat application
src/gentui/tui/app.py - Chat transcript
src/gentui/tui/transcript.py - Slash commands
src/gentui/tui/commands.py - Themes and branding
src/gentui/tui/branding.py - Tool widget lifecycle
src/gentui/tui/widgets/base.py - Widget registry
src/gentui/tui/widgets/registry.py - Fallback widgets
src/gentui/tui/widgets/generic.py - Approval prompts
src/gentui/tui/widgets/interrupt.py - Command cards
src/gentui/tui/widgets/command.py - Plan checklist
src/gentui/tui/widgets/plan.py - Tables and charts
src/gentui/tui/widgets
Customization and replay
- Plugin system
src/gentui/plugins.py - Session recording
src/gentui/session.py - Session replay
src/gentui/tui/replay.py - Demo mode
src/gentui/tui/demo.py
Other components
- Terminal user
- AG-UI backend
- AgentCore Runtime
Connections 32
- Terminal user → CLI entry: starts
README.md - CLI entry → Config loading: loads settings
src/gentui/cli.py - CLI entry → Chat application: launches
src/gentui/cli.py - CLI entry → AG-UI HTTP client: selects HTTP
src/gentui/cli.py - CLI entry → AgentCore client: selects AgentCore
src/gentui/cli.py - CLI entry → Session replay: starts replay
src/gentui/cli.py - CLI entry → Demo mode: starts demo
src/gentui/cli.py - Terminal user → Chat application: chats
README.md - Chat application → AG-UI HTTP client: runs agent
src/gentui/tui/app.py - AG-UI HTTP client → AG-UI backend: streams events
README.md - AgentCore client → AgentCore Runtime: invokes runtime
README.md - AgentCore client → AG-UI HTTP client: shares event handling
src/gentui/tui/agentcore_client.py - Chat application → Chat transcript: updates transcript
src/gentui/tui/app.py - Chat application → Slash commands: dispatches commands
src/gentui/tui/app.py - Chat application → Themes and branding: uses themes
src/gentui/tui/app.py - Chat application → Tool widget lifecycle: drives lifecycle
src/gentui/tui/app.py - Chat application → Approval prompts: prompts decisions
src/gentui/tui/app.py - Chat application → Plan checklist: updates plan
src/gentui/tui/app.py - Chat application → Widget registry: selects widgets
src/gentui/tui/app.py - Widget registry → Fallback widgets: falls back to
src/gentui/tui/widgets/registry.py - Plugin system → Widget registry: registers widgets
src/gentui/plugins.py - Plugin system → Tool widget lifecycle: extends lifecycle
src/gentui/plugins.py - Chat application → Plugin system: loads plugins
src/gentui/tui/app.py - Slash commands → Plugin system: uses registrations
src/gentui/tui/commands.py - Chat application → Session recording: records session
src/gentui/tui/app.py - Session replay → Session recording: loads session
src/gentui/tui/replay.py - Session replay → Chat application: replays interface
src/gentui/tui/replay.py - Demo mode → Chat application: runs demo UI
src/gentui/tui/demo.py - Terminal user → Session replay: plays recording
README.md - Terminal user → Demo mode: starts tour
README.md - Chat application → Command cards: renders command calls
- Chat application → Tables and charts: renders data calls
src/gentui/tui/app.py