Skip to main content
The chat command starts an interactive chat session with an AI agent.

Usage

praisonai chat [OPTIONS] [PROMPT]

Arguments

ArgumentDescription
PROMPTInitial prompt for the chat session

Options

OptionShortDescriptionDefault
--model-mLLM model to usegpt-4o-mini
--verbose-vVerbose outputfalse
--memoryEnable memory persistencefalse
--tools-tTools file path
--user-idUser ID for memory isolation
--session-sSession ID to resume
--workspace-wWorkspace directorycurrent dir
--debugEnable debug logging to ~/.praisonai/async_tui_debug.logfalse
--safeSafe mode: require approval for file writes and commandsfalse
--autonomy/--no-autonomyEnable agent autonomy for complex taskstrue
--ui-backendUI backend: auto, plain, rich, mgauto
--jsonOutput JSON (forces plain backend)false
--no-colorDisable colorsfalse
--themeUI theme: default, dark, light, minimaldefault
--compactCompact output modefalse

Examples

Start a chat session

praisonai chat

Chat with initial prompt

praisonai chat "Hello, how can you help me today?"

Chat with specific model

praisonai chat --model gpt-4o "Explain machine learning"

Chat with memory enabled

praisonai chat --memory "Remember my name is Alice"

Resume a previous session

praisonai chat --session abc123

Use plain text output (no colors)

praisonai chat --ui-backend plain "What is 2+2?"

Output as JSON

praisonai chat --json "Summarize this text"

Use middle-ground UI (enhanced streaming)

praisonai chat --ui-backend mg

UI Backends

The --ui-backend flag controls how output is rendered:
BackendDescription
autoAuto-select best available (default)
plainPlain text, no colors, works everywhere
richRich formatting with colors and panels
mgMiddle-ground: enhanced streaming with no flicker
Environment variable: Set PRAISONAI_UI_SAFE=1 to force plain backend.

Interactive Commands

During a chat session, you can use these commands:
CommandDescription
/helpShow available commands
/exit, /quitExit the chat session
/clearClear conversation history
/newStart new conversation
/sessionShow current session info
/sessionsList all saved sessions
/continueContinue most recent session
/model [name]Show or change model
/costShow token usage and cost
/historyShow conversation history
/export [file]Export conversation to file
/import <file>Import conversation from file
/statusShow ACP/LSP runtime status
/autoToggle autonomy mode (auto-delegate complex tasks)
/debugToggle debug logging to ~/.praisonai/async_tui_debug.log
/plan <task>Create a step-by-step plan for a task
/handoff <type> <task>Delegate to specialized agent (code/research/review/docs)
/compactToggle compact output mode
/multilineToggle multiline input mode
/filesList workspace files for @ mentions
/queueShow pending prompts in queue

Quick Start

Running praisonai with no arguments starts interactive mode:
praisonai
This is equivalent to praisonai chat.

Features

The interactive chat mode includes:
  • ASCII Art Logo - Beautiful PraisonAI branding on startup
  • Status Bar - Shows model, session info, and keyboard shortcuts
  • Auto-completion - Tab completion for commands and file paths
  • Command History - Navigate previous commands with arrow keys
  • Markdown Rendering - Rich formatted responses with syntax highlighting
  • Streaming Output - Real-time response streaming

See Also