Session commands¶
Klea’s frontends accept session commands: type / at the start of the
input for a menu of the available commands, then press Enter. A command is
invoked by the user (not chosen by the model) and acts on the session itself
– for example changing the agent’s operating mode – instead of being a
normal query. Some commands use a model internally; the distinction is who
invokes them, not whether they use an LLM.
The frontend fetches the backend’s server-side command catalogue
(GET /commands) and merges it with the commands it handles itself. A
client command runs in the frontend; a server command is sent to the
graph, where a command node runs it. An unknown command is reported in the
frontend and never sent, and a command’s output is shown as a system block in
the chat.
Only the implemented commands are listed here (and offered in the /
menu); more are planned in both groups.
Note
Client commands are shared by the web UI and the TUI. Server commands
depend on the app’s graph: the agent registers /mode, /access,
/cwd, /init and /compact, while the RAG graphs register none
yet.
UI commands (client)¶
These run in the frontend.
Command |
Usage |
Where |
Description |
|---|---|---|---|
|
|
web, TUI |
List the available commands, or show one command’s usage. |
|
|
web, TUI |
Start a new session. |
|
|
web |
Rename the current session. |
|
|
web, TUI |
Open the model and API-key configuration. |
|
|
web |
Download the session transcript as Markdown. |
|
|
web, TUI |
List the sessions (pinned first), switch the active session by number or id, or delete a session (with confirmation). The TUI opens a picker that does all of this. |
|
|
web, TUI |
Stop the frontend. In the web UI this stops the server it launched and
closes any active runs; in the TUI it stops any active run and quits.
The web header’s exit button and the TUI’s Ctrl+Q ask to confirm
first; the |
A command may define subcommands (verbs); /help <command> lists them,
and the / menu autocompletes them.
Graph commands (server)¶
These are sent to the graph and run there.
Command |
Usage |
Description |
|---|---|---|
|
|
Show or set the agent’s operating mode (see Klea Agent); with no argument it reports the current mode. |
|
|
Show or set the tool access level; with no argument it reports the current level. |
|
|
Show or set the session project root – the directory the file tools operate in and the default permission boundary. The path must be an existing directory; with no argument it reports the current root. This changes the path root for file tools and discovery; it does not change the tool server’s environment or Python interpreter (the TUI client context controls those). |
|
|
Show or manage the session’s path approvals. A bare |
|
|
Summarise and shorten the conversation memory now (Agent, when conversation memory is enabled). The outcome is shown in the inspection pane. |
|
|
Generate project guidance ( |
/init writes AGENTS.md in the project directory, so its file-write
needs the full tool access level; /compact is offered only when
conversation memory is enabled (see Klea Agent). /paths edits
thread-scoped approvals only; use the permission prompt for a new sensitive
file, and /cwd to change the project root.
Disabling commands¶
A deployment can disable commands with general.commands.disabled (a list
of command names) in the agent config; a disabled command is neither offered
nor runnable.
See also
Web interface – the web interface, including the command menu
Terminal interface – the terminal interface, including the command menu
Klea Agent – the agent and its operating modes
Installation – configuration