Agent CLI
The PraisonAI TypeScript CLI provides commands for running agents directly from the command line.Commands Overview
agent chat
Interactive chat with an agent.Basic Usage
With Custom Instructions
With Model Selection
Options
| Option | Description | Default |
|---|---|---|
--instructions, -i | Agent instructions/system prompt | ”You are a helpful assistant” |
--model, -m | LLM model to use | gpt-4o-mini |
--name, -n | Agent name | Auto-generated |
--verbose, -v | Enable verbose output | true |
--json | Output as JSON | false |
--session | Session ID for persistence | Auto-generated |
Examples
JSON Output Format
agent run
Run an agent with a specific task.Basic Usage
Options
| Option | Description | Default |
|---|---|---|
--instructions, -i | Agent instructions (required) | - |
--task, -t | Task to execute (required) | - |
--model, -m | LLM model to use | gpt-4o-mini |
--name, -n | Agent name | Auto-generated |
--verbose, -v | Enable verbose output | true |
--json | Output as JSON | false |
Examples
Environment Variables
Set these environment variables for API access:Using with Tools
Currently, tool usage via CLI requires a configuration file:Scripting Examples
Bash Script
Pipeline Usage
Error Handling
Missing API Key
Invalid Model
See Also
- Agent - Agent class documentation
- Agents CLI - Multi-agent CLI commands
- Workflow CLI - Workflow CLI commands

