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
- Entering the agent name
- Choosing a template
- Creating the agent on the server
- Cloning the repository locally
- Installing dependencies
Non-Interactive Mode
Perfect for scripts, CI/CD pipelines, and AI tools (Cursor, Copilot):Options
| Option | Alias | Description | Example |
|---|---|---|---|
--name <name> | -n | Agent name (non-interactive) | --name support-bot |
--template <id> | -t | Template ID or name (non-interactive) | --template starter |
--yes | -y | Auto-install dependencies without prompting | --yes |
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 runrf create, the following happens:
-
Server-side Agent Creation
- Agent is created in your RunFlow account
- Git repository is initialized
- Template files are added
-
Local Repository Clone
- Repository is cloned to
./agent-name/ - All template files are downloaded
- Repository is cloned to
-
Project Configuration
.runflow/rf.jsonis created with agent metadata- Contains:
agentId,agentName,tenantId
-
Dependencies Installation (if confirmed)
npm installis run automatically- Or skipped if
--yesflag is used
Complete Workflow Example
Using with AI Tools
The non-interactive mode is designed for seamless integration with AI coding assistants:- 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:Common Options Combination
Troubleshooting
Template Not Found
starter, rag-agent, webhook-handler
Agent Name Already Exists
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