Skip to main content
The PraisonAI CLI provides powerful commands and flags to interact with AI agents directly from your terminal.

Installation

pip install praisonai
export OPENAI_API_KEY=your_api_key

Quick Start

# Basic usage
praisonai "Your prompt here"

# With a specific model
praisonai "Your prompt" --llm openai/gpt-4o

# Run agents from YAML
praisonai agents.yaml

CLI Features Overview

Command Categories

Flags (Used with prompts)

FlagDescriptionExample
--guardrailValidate outputpraisonai "task" --guardrail "criteria"
--metricsShow token usagepraisonai "task" --metrics
--imageProcess imagepraisonai "describe" --image photo.png
--telemetryEnable monitoringpraisonai "task" --telemetry
--mcpUse MCP serverpraisonai "task" --mcp "npx server"
--fast-contextAdd code contextpraisonai "task" --fast-context ./src
--handoffAgent delegationpraisonai "task" --handoff "a1,a2"
--auto-memoryAuto extract memoriespraisonai "task" --auto-memory
--todoGenerate todo listpraisonai "plan" --todo
--routerSmart model selectionpraisonai "task" --router
--flow-displayVisual workflowpraisonai agents.yaml --flow-display

Commands (Standalone)

CommandDescriptionExample
knowledgeManage knowledge basepraisonai knowledge add doc.pdf
sessionManage sessionspraisonai session list
toolsManage toolspraisonai tools list
todoManage todospraisonai todo list
memoryManage memorypraisonai memory show
rulesManage rulespraisonai rules list
workflowManage workflowspraisonai workflow list
hooksManage hookspraisonai hooks list
researchDeep researchpraisonai research "query"

Global Options

# Verbose output
praisonai "task" -v

# Specify LLM model
praisonai "task" --llm openai/gpt-4o

# Save output to file
praisonai "task" --save

# Enable planning mode
praisonai "task" --planning

# Enable memory
praisonai "task" --memory

Combining Features

You can combine multiple CLI features for powerful workflows:
# Research with metrics and guardrails
praisonai "Analyze market trends" --metrics --guardrail "Include sources"

# Planning with router and flow display
praisonai "Complex analysis" --planning --router --flow-display

# Multi-agent with handoff and memory
praisonai "Research and write" --handoff "researcher,writer" --auto-memory
Use praisonai --help to see all available options and commands.