Skip to main content

What is Runflow CLI?

RunFlow CLI is a powerful command line interface to manage AI agents via API Portal. Create agents from templates, manage knowledge bases, handle prompts, and switch between multiple tenants โ€” all from the terminal.

Key Features

  • ๐Ÿš€ Create agents from templates with rf create
  • ๐Ÿง  Manage knowledge bases (vector stores) with rf kb
  • ๐Ÿ“ Full prompts management with CRUD and editor integration
  • ๐Ÿ‘ฅ Multi-tenant profiles - switch between API keys easily
  • ๐Ÿงช Local testing with web interface and live reload
  • ๐Ÿค– AI-friendly - non-interactive flags for automation

Quick Start

# 1. Authenticate with your API key
rf login

# 2. Create a new agent from template
rf create

# 3. Navigate to the created folder
cd my-agent/

# 4. Test locally with web interface
rf test

# 5. Deploy to production
rf agents deploy

Main Commands

CommandDescription
rf createCreate new agents from templates โญ
rf loginAuthenticate with RunFlow API
rf switchSwitch between saved profiles
rf agentsManage AI agents (deploy, clone, duplicate)
rf kbManage knowledge bases for RAG
rf promptsManage prompt templates (CRUD)
rf testStart local development server with web interface

Interactive & Non-Interactive Modes

All commands support both interactive and non-interactive modes:

Interactive Mode (Default)

Perfect for developers working manually:
rf create           # Walks you through agent creation
rf login            # Prompts for API key
rf prompts create   # Opens editor for content

Non-Interactive Mode

Perfect for scripts, CI/CD, and AI tools (Cursor, Copilot):
rf create --name my-agent --template starter --yes
rf login --api-key sk-xxx --profile prod
rf prompts create support --content "You are a helpful assistant"
rf kb upload docs ./files --yes
rf agents delete --yes
Use --yes or -y to skip confirmations in scripts and automation!

Multi-Tenant Support

Manage multiple API keys and switch between them easily:
# Save profiles for different clients
rf login --profile acme-corp
rf login --profile tech-startup

# Switch between profiles
rf switch acme-corp
rf agents list

rf switch tech-startup
rf agents list

# List all profiles
rf profiles

Local Development

Test your agents locally before deploying:
cd my-agent/
rf test
Features:
  • Zero config - auto-detects from .runflow/rf.json
  • Web portal with real-time monitoring
  • Live reload on file changes
  • Traces saved to .runflow/traces.json

Complete Workflow Example

# 1. Login and create agent
rf login
rf create
# โ†’ Select "RAG Agent" template
# โ†’ Name: "support-bot"

# 2. Navigate and set up knowledge base
cd support-bot/
rf kb create support-docs
rf kb upload support-docs ./docs --yes

# 3. Create prompt template
rf prompts create system --content "You are a support assistant"

# 4. Test locally
rf test

# 5. Deploy to production
rf agents deploy

Next Steps