Skip to content

UI Basics

The Agent UI provides an interactive terminal interface for conversing with NEX, invoking tools, and managing sessions. It is designed to be lightweight, discoverable, and consistent across all agents that support interactive mode.

This page describes the core elements of the UI and how they behave during a typical chat session.

Key Features

  • Context-Aware Prompt Line: Shows your working directory, Git repository and branch (when applicable), active model, and recent usage statistics.
  • Slash Command Control: Built-in commands for help, session management, clearing history, and exiting the UI.
  • File Attachments via @path: Attach local files directly into the model context for review or editing.
  • Tool Visibility: Compact, readable display of tool calls and tool results during agent execution.
  • Persistent Sessions: Automatically saves and restores chat history across runs.
  • Autocomplete Support: Fast completion for slash commands and file paths.

What You See on Launch

When you start NEX in interactive mode, the UI displays a welcome panel that includes:

  • The NEX logo and version string
  • Quick-start tips for slash commands and file attachments
  • License check status

After the panel, NEX enters the main prompt loop and waits for your inputs.

The Prompt Line

Before each input, NEX prints a status line containing:

  • Current directory (with ~ used to abbreviate your home directory)
  • Repository info (when inside a Git repository), formatted as repo@branch
  • Active model name
  • Usage stats for the last request (input/output tokens as a percentage of context length)

This line provides continuous feedback about where you are, what model is active, and how much context you are consuming.

Entering Messages

Type your message at the prompt and press Enter.

  • Empty input is ignored.
  • Ctrl+C cancels the current request and prints a reminder to use /quit or /exit to leave the UI.
  • Ctrl+D exits NEX immediately.

Slash Commands

Slash commands control the session lifecycle and UI behavior. The following commands are available:

  • /help — show available commands
  • /quit, /exit — exit the chat and print a session recap
  • /clear — clear conversation history and start a fresh session
  • /session — manage saved sessions

Session Management (/session)

Chat sessions are stored by default under ~/.nex/sessions and are automatically saved as you interact with NEX.

  • /session list (or /session ls) — list saved sessions
  • /session load <id> — load a prior session
  • /session rename <title> — rename the active session
  • /session remove <id> — delete a saved session (cannot delete the active one)

When you load a session, NEX replays the previous conversation, including tool calls and tool results, so you can resume work in context.

Autocomplete and Input Behavior

The Agent UI includes a line editor with built-in autocomplete:

  • Typing / offers slash command completions.
  • Typing @ offers file path completions.
  • If a completion menu is open and a completion is selected, pressing Enter accepts the completion first. Press Enter again to send the message.

This ensures that both commands and file mentions are quick and consistent to use.

Attaching Files with @path

You can attach local files to the model context by referencing them with @ in your prompt.

Example

Please review @src/foo.py

What happens:

  1. NEX resolves @... mentions relative to the current working directory.
  2. For each valid file, NEX prints a small 📎 Attached file notification.
  3. The file contents are appended to your prompt in a fenced code block.

Note

  • Only valid file paths are attached (directories are ignored).
  • Very large files are truncated to keep prompts manageable.

Tool Calls and Results

The Chat Agent can invoke tools for tasks such as running commands, reading or creating files, analyzing waveforms, and managing FPGA or ASIC flows.

When a tool is used, NEX displays:

  • A compact tool call line showing the tool name and a shortened argument preview
  • A compact tool result line showing a short preview of the returned content

This provides visibility into agent actions without overwhelming the terminal.

Exiting and the Session Recap

When you exit using /quit or /exit, NEX prints a Session Recap table that includes:

  • Total input tokens
  • Total output tokens
  • Tool calls
  • Successful tool calls

This summary helps you understand how resource-intensive the session was and how often tools were invoked.

Tips

  • Use /clear to reset the conversation without leaving the UI.
  • Use @path/to/file attachments for precise code reviews and targeted edits.
  • Use /session list and /session load to resume work across days or machines.