Skip to main content
The rf create command provides an interactive way to create new agents from pre-built templates. It handles everything: creating the agent on the server, initializing the repository, cloning locally, and installing dependencies.

Basic Usage

This will guide you through:
  1. Entering the agent name
  2. Choosing a template
  3. Creating the agent on the server
  4. Cloning the repository locally
  5. Installing dependencies

Non-Interactive Mode

Perfect for scripts, CI/CD pipelines, and AI tools (Cursor, Copilot):

Options

Available Templates

starter

Minimal setup, perfect for beginners A simple agent with basic configuration. Best for:
  • Learning RunFlow basics
  • Quick prototyping
  • Custom implementations from scratch

rag-agent

Agent with knowledge base integration Pre-configured with RAG (Retrieval Augmented Generation) capabilities. Best for:
  • Customer support bots
  • Documentation assistants
  • Knowledge-based Q&A systems

webhook-handler

Process webhooks and integrations Specialized template for handling external webhooks. Best for:
  • Integration workflows
  • Event-driven automation
  • Third-party service connections

What Gets Created?

When you run rf create, the following happens:
  1. Server-side Agent Creation
    • Agent is created in your RunFlow account
    • Git repository is initialized
    • Template files are added
  2. Local Repository Clone
    • Repository is cloned to ./agent-name/
    • All template files are downloaded
  3. Project Configuration
    • .runflow/rf.json is created with agent metadata
    • Contains: agentId, agentName, tenantId
  4. Dependencies Installation (if confirmed)
    • npm install is run automatically
    • Or skipped if --yes flag is used

Complete Workflow Example

Using with AI Tools

The non-interactive mode is designed for seamless integration with AI coding assistants:
Why it’s AI-friendly:
  • No user interaction required
  • All parameters via flags
  • Automatic dependency installation with --yes
  • Predictable output
  • Exit codes for success/failure

Automation & Scripts

Use in bash scripts or CI/CD pipelines:

Project Structure

After creation, your agent folder will contain:

.runflow/rf.json

This file contains essential metadata:
Don’t delete .runflow/rf.json - it’s required for rf test and rf agents deploy to work!

Common Options Combination

Troubleshooting

Template Not Found

Solution: Use one of the available templates: starter, rag-agent, webhook-handler

Agent Name Already Exists

Solution: Choose a different name or delete the existing agent first with rf agents delete

Dependencies Installation Failed

If dependency installation fails:

Next Steps

Test Locally

Test your newly created agent

Knowledge Base

Add knowledge base for RAG

Prompts

Manage prompt templates

Deploy

Deploy to production