@runflow-ai/cli 0.2.19 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLI-DOCS.md +23 -132
- package/README.md +354 -41
- package/dist/commands/agents/agents.command.d.ts +1 -0
- package/dist/commands/agents/agents.command.js +39 -20
- package/dist/commands/agents/agents.command.js.map +1 -1
- package/dist/commands/agents/git.service.js +8 -2
- package/dist/commands/agents/git.service.js.map +1 -1
- package/dist/commands/agents/types.d.ts +1 -0
- package/dist/commands/agents/types.js.map +1 -1
- package/dist/commands/create/create.command.d.ts +19 -0
- package/dist/commands/create/create.command.js +316 -0
- package/dist/commands/create/create.command.js.map +1 -0
- package/dist/commands/kb/kb.command.d.ts +27 -0
- package/dist/commands/kb/kb.command.js +596 -0
- package/dist/commands/kb/kb.command.js.map +1 -0
- package/dist/commands/login/login.command.d.ts +2 -0
- package/dist/commands/login/login.command.js +26 -4
- package/dist/commands/login/login.command.js.map +1 -1
- package/dist/commands/profiles/profiles.command.d.ts +7 -0
- package/dist/commands/profiles/profiles.command.js +104 -0
- package/dist/commands/profiles/profiles.command.js.map +1 -0
- package/dist/commands/prompts/prompts.command.d.ts +16 -0
- package/dist/commands/prompts/prompts.command.js +468 -29
- package/dist/commands/prompts/prompts.command.js.map +1 -1
- package/dist/commands/switch/switch.command.d.ts +5 -0
- package/dist/commands/switch/switch.command.js +78 -0
- package/dist/commands/switch/switch.command.js.map +1 -0
- package/dist/common/config.d.ts +25 -2
- package/dist/common/config.js +94 -16
- package/dist/common/config.js.map +1 -1
- package/dist/common/help.d.ts +1 -1
- package/dist/common/help.js +4 -1
- package/dist/common/help.js.map +1 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/package.json +27 -23
- package/QUICK-TEST-GUIDE.md +0 -273
package/CLI-DOCS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# RunFlow CLI Documentation
|
|
2
2
|
|
|
3
|
-
**Version:** 0.2.
|
|
3
|
+
**Version:** 0.2.19
|
|
4
4
|
**Command:** `rf`
|
|
5
5
|
|
|
6
6
|
A CLI para interagir com a API Portal RunFlow, permitindo gerenciar agentes de IA, usuários, prompts e muito mais.
|
|
@@ -8,7 +8,7 @@ A CLI para interagir com a API Portal RunFlow, permitindo gerenciar agentes de I
|
|
|
8
8
|
## Instalação
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
npm install -g runflow-cli
|
|
11
|
+
npm install -g @runflow-ai/cli
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
## Autenticação
|
|
@@ -131,7 +131,9 @@ rf prompt <action> <name> [data] # alias
|
|
|
131
131
|
| Ação | Descrição | Exemplo |
|
|
132
132
|
|------|-----------|---------|
|
|
133
133
|
| `get <name>` | Obtém um prompt | `rf prompts get meu-prompt` |
|
|
134
|
-
| `render <name> <json>` | Renderiza prompt com variáveis | `rf prompts render meu-prompt '{"
|
|
134
|
+
| `render <name> <json>` | Renderiza prompt com variáveis (JSON obrigatório) | `rf prompts render meu-prompt '{"username":"João","product":"RunFlow"}'` |
|
|
135
|
+
|
|
136
|
+
**Nota:** O comando `render` requer um JSON válido como terceiro parâmetro contendo as variáveis para renderizar o template.
|
|
135
137
|
|
|
136
138
|
### 🔑 Credentials (Credenciais)
|
|
137
139
|
|
|
@@ -149,104 +151,6 @@ rf credential <action> [name] # alias
|
|
|
149
151
|
| `list` | Lista credenciais | `rf credentials list` |
|
|
150
152
|
| `get <name>` | Obtém credencial específica | `rf credentials get minha-credencial` |
|
|
151
153
|
|
|
152
|
-
### 🔍 Search Tools
|
|
153
|
-
|
|
154
|
-
Gerenciar ferramentas de busca.
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
rf search-tools <action>
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
**Ações:**
|
|
161
|
-
|
|
162
|
-
| Ação | Descrição | Exemplo |
|
|
163
|
-
|------|-----------|---------|
|
|
164
|
-
| `list` | Lista ferramentas de busca | `rf search-tools list` |
|
|
165
|
-
|
|
166
|
-
### ⚡ Executions
|
|
167
|
-
|
|
168
|
-
Gerenciar execuções.
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
rf executions <action>
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
**Ações:**
|
|
175
|
-
|
|
176
|
-
| Ação | Descrição | Exemplo |
|
|
177
|
-
|------|-----------|---------|
|
|
178
|
-
| `list` | Lista execuções | `rf executions list` |
|
|
179
|
-
|
|
180
|
-
### 💾 Sessions
|
|
181
|
-
|
|
182
|
-
Gerenciar sessões.
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
rf sessions <action>
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
**Ações:**
|
|
189
|
-
|
|
190
|
-
| Ação | Descrição | Exemplo |
|
|
191
|
-
|------|-----------|---------|
|
|
192
|
-
| `list` | Lista sessões | `rf sessions list` |
|
|
193
|
-
|
|
194
|
-
### 📊 Datasources
|
|
195
|
-
|
|
196
|
-
Gerenciar fontes de dados.
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
rf datasources <action>
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
**Ações:**
|
|
203
|
-
|
|
204
|
-
| Ação | Descrição | Exemplo |
|
|
205
|
-
|------|-----------|---------|
|
|
206
|
-
| `list` | Lista fontes de dados | `rf datasources list` |
|
|
207
|
-
|
|
208
|
-
### 🔗 Connectors
|
|
209
|
-
|
|
210
|
-
Gerenciar conectores.
|
|
211
|
-
|
|
212
|
-
```bash
|
|
213
|
-
rf connectors <action>
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
**Ações:**
|
|
217
|
-
|
|
218
|
-
| Ação | Descrição | Exemplo |
|
|
219
|
-
|------|-----------|---------|
|
|
220
|
-
| `list` | Lista conectores | `rf connectors list` |
|
|
221
|
-
|
|
222
|
-
### 🎯 Triggers
|
|
223
|
-
|
|
224
|
-
Gerenciar triggers.
|
|
225
|
-
|
|
226
|
-
```bash
|
|
227
|
-
rf triggers <action>
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
**Ações:**
|
|
231
|
-
|
|
232
|
-
| Ação | Descrição | Exemplo |
|
|
233
|
-
|------|-----------|---------|
|
|
234
|
-
| `list` | Lista triggers | `rf triggers list` |
|
|
235
|
-
|
|
236
|
-
### 📈 Traces
|
|
237
|
-
|
|
238
|
-
Gerenciar traces.
|
|
239
|
-
|
|
240
|
-
```bash
|
|
241
|
-
rf traces <action>
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
**Ações:**
|
|
245
|
-
|
|
246
|
-
| Ação | Descrição | Exemplo |
|
|
247
|
-
|------|-----------|---------|
|
|
248
|
-
| `list` | Lista traces | `rf traces list` |
|
|
249
|
-
|
|
250
154
|
### 🔐 Secret
|
|
251
155
|
|
|
252
156
|
Gerenciar secrets.
|
|
@@ -261,16 +165,6 @@ rf secret <action>
|
|
|
261
165
|
|------|-----------|---------|
|
|
262
166
|
| `list` | Lista secrets | `rf secret list` |
|
|
263
167
|
|
|
264
|
-
### 🏥 Health
|
|
265
|
-
|
|
266
|
-
Verificar saúde da API.
|
|
267
|
-
|
|
268
|
-
```bash
|
|
269
|
-
rf health [detail]
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
**Descrição:** Verifica o status de saúde da API Portal.
|
|
273
|
-
|
|
274
168
|
### 🔓 Login
|
|
275
169
|
|
|
276
170
|
Autenticar com a API RunFlow.
|
|
@@ -386,21 +280,21 @@ rf prompts render welcome-message '{"username": "João", "product": "RunFlow"}'
|
|
|
386
280
|
|
|
387
281
|
### Monitoramento
|
|
388
282
|
```bash
|
|
389
|
-
#
|
|
390
|
-
rf
|
|
283
|
+
# Testar localmente com observabilidade
|
|
284
|
+
rf test
|
|
391
285
|
|
|
392
|
-
#
|
|
393
|
-
rf
|
|
286
|
+
# Verificar prompts
|
|
287
|
+
rf prompts get my-prompt
|
|
394
288
|
|
|
395
|
-
#
|
|
396
|
-
rf
|
|
289
|
+
# Gerenciar credenciais
|
|
290
|
+
rf credentials list
|
|
397
291
|
```
|
|
398
292
|
|
|
399
293
|
---
|
|
400
294
|
|
|
401
295
|
## 🧪 Test (Local Testing)
|
|
402
296
|
|
|
403
|
-
Inicia servidor local de observabilidade
|
|
297
|
+
Inicia servidor local de observabilidade com interface web para testar agentes.
|
|
404
298
|
|
|
405
299
|
```bash
|
|
406
300
|
rf test [options]
|
|
@@ -413,8 +307,8 @@ rf test [options]
|
|
|
413
307
|
**Características:**
|
|
414
308
|
- ✅ Zero configuração - detecta `agentId` automaticamente do `.runflow/rf.json`
|
|
415
309
|
- ✅ Portas aleatórias - evita conflitos tentando até 3 portas
|
|
416
|
-
- ✅ Portal
|
|
417
|
-
- ✅ Dados locais - traces armazenados em `.runflow/traces
|
|
310
|
+
- ✅ Portal local - interface web servida em `localhost` com arquivos estáticos incluídos
|
|
311
|
+
- ✅ Dados locais - traces armazenados em `.runflow/traces.json`
|
|
418
312
|
- ✅ Monitoramento real-time - visualize threads, execuções e traces
|
|
419
313
|
|
|
420
314
|
**Exemplo básico:**
|
|
@@ -430,9 +324,9 @@ rf test
|
|
|
430
324
|
# ✓ Opening browser...
|
|
431
325
|
#
|
|
432
326
|
# 📊 Test Portal Ready!
|
|
433
|
-
# 🌐 Portal:
|
|
327
|
+
# 🌐 Portal: http://localhost:3421/agents/abc.../test-monitor?...
|
|
434
328
|
# 📡 API: http://localhost:3421
|
|
435
|
-
# 💾 Storage: .runflow/traces
|
|
329
|
+
# 💾 Storage: .runflow/traces.json
|
|
436
330
|
```
|
|
437
331
|
|
|
438
332
|
**Com opções:**
|
|
@@ -449,8 +343,8 @@ rf test --no-browser
|
|
|
449
343
|
1. **Lê configuração** do `.runflow/rf.json` (agentId, agentName)
|
|
450
344
|
2. **Inicia servidor local** com 3 APIs de observabilidade
|
|
451
345
|
3. **Tenta até 3 portas** caso a primeira esteja ocupada
|
|
452
|
-
4. **
|
|
453
|
-
5. **Portal
|
|
346
|
+
4. **Serve interface web local** em `localhost` com arquivos estáticos incluídos na CLI
|
|
347
|
+
5. **Portal mostra dados** armazenados localmente em `.runflow/traces.json`
|
|
454
348
|
|
|
455
349
|
**APIs disponíveis:**
|
|
456
350
|
- `GET /health` - Health check
|
|
@@ -462,11 +356,7 @@ rf test --no-browser
|
|
|
462
356
|
```
|
|
463
357
|
.runflow/
|
|
464
358
|
├── rf.json # Configuração do agente
|
|
465
|
-
└── traces
|
|
466
|
-
├── 2025-11-06/ # Pastas por data
|
|
467
|
-
│ └── session-*.json
|
|
468
|
-
└── 2025-11-07/
|
|
469
|
-
└── ...
|
|
359
|
+
└── traces.json # Armazenamento de traces local
|
|
470
360
|
```
|
|
471
361
|
|
|
472
362
|
**Fluxo típico de uso:**
|
|
@@ -489,11 +379,12 @@ node agent.ts
|
|
|
489
379
|
|
|
490
380
|
### Problemas de Autenticação
|
|
491
381
|
```bash
|
|
492
|
-
# Verificar configuração
|
|
493
|
-
rf health
|
|
494
|
-
|
|
495
382
|
# Fazer login novamente
|
|
496
383
|
rf login --api-key sua-chave
|
|
384
|
+
|
|
385
|
+
# Verificar configuração
|
|
386
|
+
ls -la .runflow/rf.json
|
|
387
|
+
cat .runflow/rf.json
|
|
497
388
|
```
|
|
498
389
|
|
|
499
390
|
### Problemas de Git
|
package/README.md
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
# RunFlow CLI
|
|
2
2
|
|
|
3
|
-
Command line interface to manage AI agents via **API Portal**.
|
|
3
|
+
Command line interface to manage AI agents via **API Portal**. Create agents, manage knowledge bases, handle prompts — all from the terminal.
|
|
4
4
|
|
|
5
5
|
## Key Features
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
- **
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
7
|
+
- 🚀 **Create agents from templates** with `rf create`
|
|
8
|
+
- 🧠 **Manage knowledge bases** (vector stores) with `rf kb`
|
|
9
|
+
- 📝 **Full prompts management** with CRUD and editor integration
|
|
10
|
+
- 👥 **Multi-tenant profiles** - switch between API keys easily
|
|
11
|
+
- 🧪 **Local testing** with web interface and live reload
|
|
11
12
|
|
|
12
|
-
##
|
|
13
|
+
## 📦 Installation
|
|
13
14
|
|
|
14
15
|
```bash
|
|
15
16
|
npm i -g @runflow-ai/cli
|
|
@@ -19,62 +20,374 @@ npm i -g @runflow-ai/cli
|
|
|
19
20
|
|
|
20
21
|
```bash
|
|
21
22
|
# 1. Authenticate with your API key
|
|
22
|
-
rf login
|
|
23
|
+
rf login
|
|
23
24
|
|
|
24
|
-
# 2.
|
|
25
|
-
rf
|
|
25
|
+
# 2. Create a new agent from template
|
|
26
|
+
rf create
|
|
27
|
+
|
|
28
|
+
# 3. Navigate to the created folder
|
|
29
|
+
cd my-agent/
|
|
26
30
|
|
|
27
|
-
#
|
|
28
|
-
|
|
31
|
+
# 4. Test locally with web interface
|
|
32
|
+
rf test
|
|
29
33
|
|
|
30
|
-
#
|
|
31
|
-
cd agent-name/
|
|
32
|
-
# ... make changes ...
|
|
34
|
+
# 5. Deploy to production
|
|
33
35
|
rf agents deploy
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 🛠️ Commands
|
|
39
|
+
|
|
40
|
+
### `rf create` - Create New Agent ⭐
|
|
41
|
+
|
|
42
|
+
Interactive agent creation with templates from the API.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Interactive mode
|
|
46
|
+
rf create
|
|
34
47
|
|
|
35
|
-
#
|
|
36
|
-
rf
|
|
48
|
+
# Non-interactive mode (for scripts/AI)
|
|
49
|
+
rf create --name my-agent --template starter
|
|
50
|
+
rf create -n my-agent -t rag-agent --yes
|
|
37
51
|
```
|
|
38
52
|
|
|
39
|
-
|
|
53
|
+
**Options:**
|
|
54
|
+
- `-n, --name <name>` - Agent name (non-interactive)
|
|
55
|
+
- `-t, --template <id>` - Template ID or name (non-interactive)
|
|
56
|
+
- `-y, --yes` - Auto-install dependencies without prompting
|
|
40
57
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
| `rf credentials <action>` | Manage credentials |
|
|
58
|
+
**Flow:**
|
|
59
|
+
1. Enter agent name (or use `--name`)
|
|
60
|
+
2. Choose template (or use `--template`)
|
|
61
|
+
3. Agent created on server with repository
|
|
62
|
+
4. Repository cloned locally
|
|
63
|
+
5. Dependencies installed (auto with `--yes`)
|
|
48
64
|
|
|
49
|
-
**
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
- `rf agents deploy` - Deploy local changes
|
|
65
|
+
**Available Templates:**
|
|
66
|
+
- **starter** - Minimal setup, perfect for beginners
|
|
67
|
+
- **rag-agent** - Agent with knowledge base integration
|
|
68
|
+
- **webhook-handler** - Process webhooks and integrations
|
|
54
69
|
|
|
55
|
-
|
|
70
|
+
---
|
|
56
71
|
|
|
57
|
-
|
|
72
|
+
### `rf login` - Authentication
|
|
58
73
|
|
|
59
74
|
```bash
|
|
60
|
-
#
|
|
75
|
+
# Interactive login
|
|
76
|
+
rf login
|
|
77
|
+
|
|
78
|
+
# With API key directly
|
|
61
79
|
rf login --api-key sk-xxx...
|
|
62
80
|
|
|
63
|
-
#
|
|
64
|
-
rf
|
|
81
|
+
# Save as named profile
|
|
82
|
+
rf login --profile client-acme
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Options:**
|
|
86
|
+
- `--api-key <key>` - API key to use
|
|
87
|
+
- `--profile <name>` - Save as named profile
|
|
88
|
+
- `--api <url>` - Custom API URL
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
### `rf switch` - Switch Profile
|
|
93
|
+
|
|
94
|
+
Switch between saved profiles for multi-tenant support.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Interactive selection
|
|
98
|
+
rf switch
|
|
99
|
+
|
|
100
|
+
# Direct switch
|
|
101
|
+
rf switch client-acme
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### `rf profiles` - Manage Profiles
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# List all profiles
|
|
110
|
+
rf profiles
|
|
111
|
+
|
|
112
|
+
# Show current profile
|
|
113
|
+
rf profiles current
|
|
114
|
+
|
|
115
|
+
# Delete a profile
|
|
116
|
+
rf profiles delete client-acme
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
### `rf agents` - Agent Management
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
rf agents list # List agents (interactive menu)
|
|
125
|
+
rf agents get # Show current agent details
|
|
126
|
+
rf agents clone # Clone agent repository
|
|
127
|
+
rf agents pull # Pull latest changes
|
|
128
|
+
rf agents deploy # Deploy local changes
|
|
129
|
+
rf agents duplicate # Duplicate agent
|
|
130
|
+
rf agents delete # Delete agent
|
|
131
|
+
rf agents delete --yes # Delete without confirmation
|
|
132
|
+
```
|
|
65
133
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
134
|
+
**Options:**
|
|
135
|
+
- `-y, --yes` - Skip confirmation prompts
|
|
136
|
+
|
|
137
|
+
**Aliases:** `rf agent`
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
### `rf prompts` - Prompts Management
|
|
142
|
+
|
|
143
|
+
Full CRUD operations for prompt templates.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Interactive mode
|
|
147
|
+
rf prompts
|
|
148
|
+
|
|
149
|
+
# List all prompts
|
|
150
|
+
rf prompts list
|
|
151
|
+
|
|
152
|
+
# Get prompt content
|
|
153
|
+
rf prompts get <name>
|
|
154
|
+
|
|
155
|
+
# Create new prompt (interactive)
|
|
156
|
+
rf prompts create <name>
|
|
157
|
+
|
|
158
|
+
# Create prompt (non-interactive - for scripts/AI)
|
|
159
|
+
rf prompts create my-prompt --content "You are a helpful assistant"
|
|
160
|
+
rf prompts create my-prompt --file ./prompt.txt
|
|
161
|
+
|
|
162
|
+
# Update prompt (opens editor)
|
|
163
|
+
rf prompts update <name>
|
|
164
|
+
rf prompts update <name> --content "New content"
|
|
165
|
+
|
|
166
|
+
# Delete prompt
|
|
167
|
+
rf prompts delete <name>
|
|
168
|
+
rf prompts delete <name> --yes # Skip confirmation
|
|
169
|
+
|
|
170
|
+
# Render with variables
|
|
171
|
+
rf prompts render <name> '{"var": "value"}'
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Options:**
|
|
175
|
+
- `-c, --content <text>` - Prompt content (non-interactive)
|
|
176
|
+
- `-f, --file <path>` - Read content from file
|
|
177
|
+
- `-y, --yes` - Skip confirmation prompts
|
|
178
|
+
|
|
179
|
+
**Aliases:** `rf prompt`
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
### `rf kb` - Knowledge Base Management
|
|
184
|
+
|
|
185
|
+
Manage vector stores for RAG (Retrieval Augmented Generation).
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# List all knowledge bases
|
|
189
|
+
rf kb list
|
|
190
|
+
|
|
191
|
+
# Create new knowledge base (interactive)
|
|
192
|
+
rf kb create <name>
|
|
193
|
+
|
|
194
|
+
# Create KB (non-interactive - for scripts/AI)
|
|
195
|
+
rf kb create my-kb --embedding "OpenAI Small"
|
|
196
|
+
rf kb create my-kb -e openai-small
|
|
197
|
+
|
|
198
|
+
# Upload file
|
|
199
|
+
rf kb upload <kb-name> <file>
|
|
200
|
+
|
|
201
|
+
# Upload directory (with confirmation skip)
|
|
202
|
+
rf kb upload <kb-name> ./docs --yes
|
|
203
|
+
|
|
204
|
+
# Check processing status
|
|
205
|
+
rf kb status <kb-name>
|
|
206
|
+
|
|
207
|
+
# List documents
|
|
208
|
+
rf kb docs <kb-name>
|
|
209
|
+
|
|
210
|
+
# Remove document
|
|
211
|
+
rf kb remove-doc <kb-name> <doc-id>
|
|
212
|
+
rf kb remove-doc <kb-name> <doc-id> --yes # Skip confirmation
|
|
213
|
+
|
|
214
|
+
# Semantic search
|
|
215
|
+
rf kb search <kb-name> "your query"
|
|
216
|
+
|
|
217
|
+
# Delete knowledge base
|
|
218
|
+
rf kb delete <kb-name>
|
|
219
|
+
rf kb delete <kb-name> --yes # Skip confirmation
|
|
220
|
+
```
|
|
69
221
|
|
|
70
|
-
|
|
222
|
+
**Options:**
|
|
223
|
+
- `-e, --embedding <config>` - Embedding config ID or name (non-interactive)
|
|
224
|
+
- `-y, --yes` - Skip confirmation prompts
|
|
225
|
+
|
|
226
|
+
**Supported Files:** PDF, TXT, MD, DOCX
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
### `rf test` - Local Testing
|
|
231
|
+
|
|
232
|
+
Start local development server with web interface.
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
cd my-agent/
|
|
236
|
+
rf test
|
|
237
|
+
|
|
238
|
+
# Custom port
|
|
239
|
+
rf test --port 4000
|
|
240
|
+
|
|
241
|
+
# Without opening browser
|
|
242
|
+
rf test --no-browser
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**Features:**
|
|
246
|
+
- Zero config - auto-detects from `.runflow/rf.json`
|
|
247
|
+
- Web portal with real-time monitoring
|
|
248
|
+
- Live reload on file changes
|
|
249
|
+
- Traces saved to `.runflow/traces.json`
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
### Other Commands
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
rf users list # Manage users
|
|
257
|
+
rf credentials list # List credentials
|
|
258
|
+
rf triggers list # Manage triggers
|
|
259
|
+
rf executions list # View execution history
|
|
260
|
+
rf health # Check API health
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## 📖 Usage Examples
|
|
264
|
+
|
|
265
|
+
### Complete Development Workflow
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
# 1. Login and create agent
|
|
269
|
+
rf login
|
|
270
|
+
rf create
|
|
271
|
+
# → Select "RAG Agent" template
|
|
272
|
+
# → Name: "support-bot"
|
|
273
|
+
|
|
274
|
+
# 2. Navigate and set up knowledge base
|
|
275
|
+
cd support-bot/
|
|
276
|
+
rf kb create support-docs
|
|
277
|
+
rf kb upload support-docs ./docs --recursive
|
|
278
|
+
|
|
279
|
+
# 3. Test locally
|
|
280
|
+
rf test
|
|
281
|
+
|
|
282
|
+
# 4. Deploy to production
|
|
71
283
|
rf agents deploy
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Multi-Tenant Workflow
|
|
72
287
|
|
|
73
|
-
|
|
74
|
-
|
|
288
|
+
```bash
|
|
289
|
+
# Save profiles for different clients
|
|
290
|
+
rf login --profile acme-corp
|
|
291
|
+
rf login --profile tech-startup
|
|
292
|
+
|
|
293
|
+
# Switch between clients
|
|
294
|
+
rf switch acme-corp
|
|
295
|
+
rf agents list
|
|
296
|
+
|
|
297
|
+
rf switch tech-startup
|
|
298
|
+
rf agents list
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### Knowledge Base Management
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
# Create and populate KB
|
|
305
|
+
rf kb create product-docs
|
|
306
|
+
rf kb upload product-docs ./manual.pdf
|
|
307
|
+
rf kb upload product-docs ./faq.md
|
|
308
|
+
|
|
309
|
+
# Check status
|
|
310
|
+
rf kb status product-docs
|
|
311
|
+
|
|
312
|
+
# Test search
|
|
313
|
+
rf kb search product-docs "how to reset password"
|
|
314
|
+
|
|
315
|
+
# Manage documents
|
|
316
|
+
rf kb docs product-docs
|
|
317
|
+
rf kb remove-doc product-docs doc_123
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Using with AI Tools / Scripts (Non-Interactive Mode)
|
|
321
|
+
|
|
322
|
+
All commands support non-interactive flags for automation with AI tools (Cursor, Copilot) or CI/CD:
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
# Create agent without interaction
|
|
326
|
+
rf create --name my-agent --template starter --yes
|
|
327
|
+
|
|
328
|
+
# Create prompt without interaction
|
|
329
|
+
rf prompts create support-bot --content "You are a support assistant"
|
|
330
|
+
|
|
331
|
+
# Create KB without interaction
|
|
332
|
+
rf kb create docs-kb --embedding "OpenAI Small"
|
|
333
|
+
|
|
334
|
+
# Delete without confirmation
|
|
335
|
+
rf agents delete --yes
|
|
336
|
+
rf prompts delete old-prompt --yes
|
|
337
|
+
rf kb delete old-kb --yes
|
|
338
|
+
|
|
339
|
+
# Upload directory without confirmation
|
|
340
|
+
rf kb upload docs-kb ./documents --yes
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
**Flag Reference:**
|
|
344
|
+
|
|
345
|
+
| Command | Specific Flags | Common Flags |
|
|
346
|
+
|---------|---------------|--------------|
|
|
347
|
+
| `rf create` | `-n, --name` `-t, --template` | `-y, --yes` |
|
|
348
|
+
| `rf agents` | - | `-y, --yes` |
|
|
349
|
+
| `rf prompts` | `-c, --content` `-f, --file` | `-y, --yes` |
|
|
350
|
+
| `rf kb` | `-e, --embedding` | `-y, --yes` |
|
|
351
|
+
|
|
352
|
+
All commands also support: `--api-key` and `--api` for authentication overrides.
|
|
353
|
+
|
|
354
|
+
## 🔧 Configuration
|
|
355
|
+
|
|
356
|
+
### Environment Variables
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
RUNFLOW_API_URL=https://api.runflow.ai
|
|
360
|
+
RUNFLOW_API_KEY=sk-xxx...
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### Config File (`~/.runflowrc`)
|
|
364
|
+
|
|
365
|
+
```json
|
|
366
|
+
{
|
|
367
|
+
"currentProfile": "default",
|
|
368
|
+
"profiles": {
|
|
369
|
+
"default": {
|
|
370
|
+
"apiKey": "sk-xxx...",
|
|
371
|
+
"apiUrl": "https://api.runflow.ai",
|
|
372
|
+
"tenantId": "tenant_123",
|
|
373
|
+
"tenantName": "My Company"
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### Project Config (`.runflow/rf.json`)
|
|
380
|
+
|
|
381
|
+
Created automatically by `rf create` or `rf agents clone`:
|
|
382
|
+
|
|
383
|
+
```json
|
|
384
|
+
{
|
|
385
|
+
"agentId": "agent_uuid",
|
|
386
|
+
"agentName": "my-agent",
|
|
387
|
+
"tenantId": "tenant_123"
|
|
388
|
+
}
|
|
75
389
|
```
|
|
76
390
|
|
|
77
391
|
## 📝 License
|
|
78
392
|
|
|
79
393
|
MIT – (c) IFTL 2025
|
|
80
|
-
|