@runflow-ai/cli 0.2.19 → 0.2.20

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # RunFlow CLI Documentation
2
2
 
3
- **Version:** 0.2.0
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 '{"var":"value"}'` |
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
- # Verificar saúde da API
390
- rf health
283
+ # Testar localmente com observabilidade
284
+ rf test
391
285
 
392
- # Ver execuções recentes
393
- rf executions list
286
+ # Verificar prompts
287
+ rf prompts get my-prompt
394
288
 
395
- # Analisar traces
396
- rf traces list
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 e abre o portal cloud para testar agentes.
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 cloud - usa `platform.runflow.ai` sempre atualizado
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: https://platform.runflow.ai/agents/abc.../test-monitor?...
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. **Abre portal cloud** (`platform.runflow.ai`) com parâmetros corretos
453
- 5. **Portal conecta** ao servidor local para buscar dados
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/ # Armazenamento de 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
@@ -8,6 +8,7 @@ Command line interface to manage AI agents via **API Portal**. Authenticate, pro
8
8
  - **Complete AI agent management** with cloning and deployment
9
9
  - **Interactive interface** with menu selection
10
10
  - **Secure credentials** integrated
11
+ - **Local testing** with observability server
11
12
 
12
13
  ## 🚀 Installation
13
14
 
@@ -34,27 +35,96 @@ rf agents deploy
34
35
 
35
36
  # 5. Pull latest changes when needed
36
37
  rf agents pull
38
+
39
+ # 6. Test locally with observability
40
+ rf test
37
41
  ```
38
42
 
39
- ## 🛠️ Main Commands
43
+ ## 🛠️ Available Commands
44
+
45
+ ### Authentication
46
+
47
+ | Command | Description | Options |
48
+ | --- | --- | --- |
49
+ | `rf login --api-key <key>` | Authenticate with RunFlow API | `--api <url>`, `--tenant-id <id>` |
50
+
51
+ ### Agents Management
40
52
 
41
53
  | Command | Description |
42
54
  | --- | --- |
43
- | `rf login --api-key <key>` | Authentication |
44
- | `rf agents <action>` | Manage AI agents |
45
- | `rf users <action>` | Manage users |
46
- | `rf prompts <action>` | Manage prompts |
47
- | `rf credentials <action>` | Manage credentials |
48
-
49
- **Key agent actions:**
50
- - `rf agents list` - List and select agents
51
- - `rf agents clone` - Download agent repository
52
- - `rf agents pull` - Pull latest changes (overwrites local)
53
- - `rf agents deploy` - Deploy local changes
55
+ | `rf agents list` | List agents with **interactive menu** (clone, deploy, duplicate, delete) |
56
+ | `rf agents get` | Show current/selected agent details |
57
+ | `rf agents create <json>` | Create a new agent |
58
+ | `rf agents update <json>` | Update the selected agent |
59
+ | `rf agents delete` | Delete the selected agent |
60
+ | `rf agents clone` | Download agent repository (clone) |
61
+ | `rf agents pull` | Pull latest changes from server |
62
+ | `rf agents duplicate` | Duplicate agent on server |
63
+ | `rf agents deploy` | Deploy local changes to server |
64
+
65
+ **Aliases:** `rf agent` (singular)
66
+
67
+ ### Users Management
68
+
69
+ | Command | Description |
70
+ | --- | --- |
71
+ | `rf users list` | List and select users |
72
+ | `rf users get` | Show selected user details |
73
+ | `rf users create <json>` | Create a new user |
74
+ | `rf users update <json>` | Update selected user |
75
+ | `rf users delete` | Delete selected user |
76
+
77
+ **Aliases:** `rf user` (singular)
78
+
79
+ ### Prompts Management
80
+
81
+ | Command | Description |
82
+ | --- | --- |
83
+ | `rf prompts get <name>` | Get prompt template by name |
84
+ | `rf prompts render <name> <json>` | Render prompt with variables (JSON required) |
85
+
86
+ **Example:**
87
+ ```bash
88
+ rf prompts render welcome-message '{"username": "John", "product": "RunFlow"}'
89
+ ```
90
+
91
+ **Aliases:** `rf prompt` (singular)
92
+
93
+ ### Credentials Management
94
+
95
+ | Command | Description |
96
+ | --- | --- |
97
+ | `rf credentials list` | List and select credentials |
98
+ | `rf credentials get <name>` | Get credential details by name |
99
+
100
+ **Aliases:** `rf credential` (singular)
101
+
102
+ ### Testing & Development
103
+
104
+ | Command | Description | Options |
105
+ | --- | --- | --- |
106
+ | `rf test` | Start **local** observability server with web interface | `-p, --port <port>`, `--no-browser` |
107
+
108
+ **Features:**
109
+ - Zero configuration - auto-detects agent from `.runflow/rf.json`
110
+ - Random ports (3000-4000) to avoid conflicts
111
+ - Local web portal with real-time monitoring
112
+ - Traces storage in `.runflow/traces.json`
113
+
114
+ ### Global Options
115
+
116
+ All commands support:
117
+ - `--api-key <key>` - Override API key
118
+ - `--api <url>` - Override API URL
119
+ - `--verbose` - Show detailed output
120
+ - `--quiet` - Suppress output
121
+ - `--help, -h` - Show help
54
122
 
55
123
  Run `rf --help` to see all commands.
56
124
 
57
- ## 📦 Usage Example
125
+ ## 📦 Usage Examples
126
+
127
+ ### Basic Workflow
58
128
 
59
129
  ```bash
60
130
  # 1. Authenticate
@@ -74,6 +144,49 @@ rf agents deploy
74
144
  rf agents pull
75
145
  ```
76
146
 
147
+ ### Local Testing
148
+
149
+ ```bash
150
+ # Start local server with web interface
151
+ cd agent-name/
152
+ rf test
153
+
154
+ # Opens browser automatically at:
155
+ # http://localhost:PORT/agents/your-agent/test-monitor
156
+
157
+ # Specify custom port
158
+ rf test --port 4500
159
+
160
+ # Without opening browser
161
+ rf test --no-browser
162
+ ```
163
+
164
+ ### Managing Prompts
165
+
166
+ ```bash
167
+ # Get a prompt template
168
+ rf prompts get welcome-message
169
+
170
+ # Render prompt with variables
171
+ rf prompts render welcome-message '{"username": "John", "product": "RunFlow"}'
172
+ ```
173
+
174
+ ### Managing Credentials
175
+
176
+ ```bash
177
+ # List all credentials
178
+ rf credentials list
179
+
180
+ # Get specific credential
181
+ rf credentials get my-api-key
182
+ ```
183
+
184
+ ## 📚 Documentation
185
+
186
+ For detailed documentation, see:
187
+ - [CLI-DOCS.md](./CLI-DOCS.md) - Complete command reference
188
+ - [docs/TEST-COMMAND.md](./docs/TEST-COMMAND.md) - Test command guide
189
+
77
190
  ## 📝 License
78
191
 
79
192
  MIT – (c) IFTL 2025
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runflow-ai/cli",
3
- "version": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "description": "Official CLI for RunFlow AI platform - manage agents, deploy code, and interact with AI workflows from your terminal",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,34 +19,34 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@gati/space-invaders": "^1.0.2",
22
- "@nestjs/common": "^10.0.0",
23
- "@nestjs/core": "^10.0.0",
24
- "axios": "^1.6.0",
22
+ "@nestjs/common": "^10.4.20",
23
+ "@nestjs/core": "^10.4.20",
24
+ "axios": "^1.13.2",
25
25
  "chalk": "^4.1.2",
26
26
  "cors": "^2.8.5",
27
- "express": "^4.18.0",
28
- "figlet": "^1.8.2",
29
- "inquirer": "^8.2.6",
30
- "nest-commander": "^3.0.0",
27
+ "express": "^4.22.1",
28
+ "figlet": "^1.9.4",
29
+ "inquirer": "^8.2.7",
30
+ "nest-commander": "^3.20.1",
31
31
  "ora": "^5.4.1",
32
- "tsx": "^4.0.0",
33
- "yaml": "^2.8.1"
32
+ "tsx": "^4.21.0",
33
+ "yaml": "^2.8.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@types/cors": "^2.8.0",
37
- "@types/express": "^4.17.0",
36
+ "@types/cors": "^2.8.19",
37
+ "@types/express": "^4.17.25",
38
38
  "@types/figlet": "^1.7.0",
39
- "@types/jest": "^29.0.0",
40
- "@types/node": "^20.0.0",
41
- "@typescript-eslint/eslint-plugin": "^6.0.0",
42
- "@typescript-eslint/parser": "^6.0.0",
43
- "eslint": "^8.0.0",
44
- "eslint-config-prettier": "^9.0.0",
45
- "jest": "^29.0.0",
46
- "prettier": "^3.0.0",
47
- "ts-jest": "^29.0.0",
48
- "ts-node": "^10.0.0",
49
- "typescript": "^5.0.0"
39
+ "@types/jest": "^29.5.14",
40
+ "@types/node": "^20.19.26",
41
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
42
+ "@typescript-eslint/parser": "^6.21.0",
43
+ "eslint": "^8.57.1",
44
+ "eslint-config-prettier": "^9.1.2",
45
+ "jest": "^29.7.0",
46
+ "prettier": "^3.7.4",
47
+ "ts-jest": "^29.4.6",
48
+ "ts-node": "^10.9.2",
49
+ "typescript": "^5.9.3"
50
50
  },
51
51
  "files": [
52
52
  "dist/**/*",
@@ -1,273 +0,0 @@
1
- # 🚀 Quick Test Guide - rf test
2
-
3
- ## TL;DR
4
-
5
- ```bash
6
- cd seu-agente/
7
- rf test
8
- ```
9
-
10
- That's it! 🎉
11
-
12
- ---
13
-
14
- ## Passo a Passo Completo
15
-
16
- ### 1. Instale ou atualize a CLI
17
-
18
- ```bash
19
- # Se ainda não tem instalado
20
- npm install -g @runflow-ai/cli
21
-
22
- # Se já tem, atualize
23
- npm update -g @runflow-ai/cli
24
- ```
25
-
26
- ### 2. Entre no diretório do agente
27
-
28
- ```bash
29
- cd smartfit-agents/agent-com-rag/
30
- # ou qualquer agente com .runflow/rf.json
31
- ```
32
-
33
- ### 3. Execute o comando test
34
-
35
- ```bash
36
- rf test
37
- ```
38
-
39
- **Output esperado:**
40
-
41
- ```
42
- 🧪 Runflow Test Server
43
- Starting local observability server...
44
-
45
- ✓ Found agent config
46
- Agent: Agent com RAG (Agentic)
47
-
48
- ✓ Local server running on port 3421
49
-
50
- ✓ Opening browser...
51
-
52
- 📊 Test Portal Ready!
53
-
54
- 🌐 Portal: https://platform.runflow.ai/local-test/agents/fbc4c76d-57b3-40c3-a165-c4edcbf28434/test-monitor?apiUrl=http://localhost:3421&agentName=Agent%20com%20RAG
55
- 📡 API: http://localhost:3421
56
- 💾 Storage: /Users/danrleymorais/projects/runflow/runflow-sdk-repo/smartfit-agents/agent-com-rag/.runflow/traces
57
-
58
- ⚠️ Note: Your browser may show a warning about
59
- mixed content (HTTPS → HTTP). Click "Allow" if prompted.
60
-
61
- Press Ctrl+C to stop
62
- ```
63
-
64
- ### 4. Teste no navegador
65
-
66
- O portal abre automaticamente em `https://platform.runflow.ai` com:
67
- - Interface de teste (40% esquerda)
68
- - Monitoramento em tempo real (60% direita)
69
-
70
- **Features disponíveis:**
71
- - ✅ Enviar mensagens para o agente
72
- - ✅ Ver lista de threads (conversas)
73
- - ✅ Ver execuções por thread
74
- - ✅ Visualizar traces detalhados (árvore hierárquica)
75
- - ✅ Métricas: tokens, custo, duração
76
-
77
- ### 5. Execute seu agente (em outro terminal)
78
-
79
- ```bash
80
- # Terminal 2
81
- cd seu-agente/
82
- npm run dev
83
- # ou
84
- node agent.ts
85
- ```
86
-
87
- As execuções aparecerão automaticamente no portal! 🎯
88
-
89
- ---
90
-
91
- ## 🧪 Testando com dados de exemplo
92
-
93
- Para testar a visualização sem executar o agente, use o trace de exemplo:
94
-
95
- ```bash
96
- # 1. Crie o diretório de traces
97
- mkdir -p .runflow/traces/2025-11-06
98
-
99
- # 2. Copie o arquivo de exemplo
100
- cp /path/to/runflow-cli/docs/trace-example.json .runflow/traces/2025-11-06/session-test-1730894400000.json
101
-
102
- # 3. Edite o agentId no arquivo para corresponder ao seu
103
- # Substitua "fbc4c76d-..." pelo agentId do seu .runflow/rf.json
104
-
105
- # 4. Inicie o servidor
106
- rf test
107
- ```
108
-
109
- Agora você verá threads e execuções de exemplo no portal! ✨
110
-
111
- ---
112
-
113
- ## 🎛️ Opções Avançadas
114
-
115
- ### Porta customizada
116
-
117
- ```bash
118
- rf test --port 5000
119
- ```
120
-
121
- ### Sem abrir navegador
122
-
123
- ```bash
124
- rf test --no-browser
125
-
126
- # Depois abra manualmente:
127
- open https://platform.runflow.ai/agents/SEU_AGENT_ID/test-monitor?apiUrl=http://localhost:3421&mode=local
128
- ```
129
-
130
- ### Múltiplos agentes simultaneamente
131
-
132
- ```bash
133
- # Terminal 1
134
- cd agent-1/
135
- rf test --port 3500
136
-
137
- # Terminal 2
138
- cd agent-2/
139
- rf test --port 3600
140
-
141
- # Terminal 3
142
- cd agent-3/
143
- rf test --port 3700
144
- ```
145
-
146
- Cada um abrirá em uma aba diferente do navegador! 🔥
147
-
148
- ---
149
-
150
- ## 🐛 Troubleshooting
151
-
152
- ### Erro: "No agentId found"
153
-
154
- ```bash
155
- ❌ No agentId found in .runflow/rf.json
156
- Run "rf clone <agentId>" first
157
- ```
158
-
159
- **Solução:**
160
- ```bash
161
- # Clone um agente primeiro
162
- rf agents list
163
- # Selecione um agente e clone
164
- ```
165
-
166
- ### Erro: "Failed to start server after 3 attempts"
167
-
168
- ```bash
169
- ❌ Failed to start server after 3 attempts
170
- All ports are busy. Try again later.
171
- ```
172
-
173
- **Solução:**
174
- ```bash
175
- # Tente porta específica
176
- rf test --port 5000
177
-
178
- # Ou mate processos ocupando portas
179
- lsof -ti:3000,3001,3002 | xargs kill
180
- ```
181
-
182
- ### Portal não mostra dados
183
-
184
- **Verificações:**
185
- 1. ✅ Servidor está rodando? `curl http://localhost:3421/health`
186
- 2. ✅ Diretório de traces existe? `ls .runflow/traces/`
187
- 3. ✅ AgentId correto na URL?
188
- 4. ✅ Console do navegador tem erros?
189
-
190
- **Solução comum:**
191
- ```bash
192
- # Recarregue a página permitindo mixed content
193
- # Chrome: Click no shield icon → "Load unsafe scripts"
194
- # Firefox: Click no shield icon → "Disable protection"
195
- ```
196
-
197
- ### Mixed Content Warning
198
-
199
- O navegador pode avisar sobre **mixed content** (HTTPS → HTTP):
200
-
201
- **Chrome:**
202
- 1. Click no ícone de shield na barra de endereço
203
- 2. Click em "Load unsafe scripts"
204
-
205
- **Firefox:**
206
- 1. Click no ícone de shield
207
- 2. Click em "Disable protection for now"
208
-
209
- **Safari:**
210
- 1. Safari → Preferences → Advanced
211
- 2. Enable "Show Develop menu"
212
- 3. Develop → Disable Cross-Origin Restrictions
213
-
214
- ---
215
-
216
- ## 📊 Estrutura de Dados
217
-
218
- ### Storage Local
219
-
220
- ```
221
- .runflow/
222
- ├── rf.json # Config do agente
223
- └── traces/ # Traces
224
- ├── 2025-11-06/
225
- │ ├── session-abc123-1730894400000.json # Sessão 1
226
- │ └── session-xyz789-1730894500000.json # Sessão 2
227
- └── 2025-11-07/
228
- └── ...
229
- ```
230
-
231
- ### Formato de Trace
232
-
233
- Ver [`docs/trace-example.json`](docs/trace-example.json) para exemplo completo.
234
-
235
- **Estrutura básica:**
236
- ```json
237
- {
238
- "sessionId": "session-uuid-timestamp",
239
- "agentId": "agent-uuid",
240
- "createdAt": "2025-11-06T10:00:00Z",
241
- "threads": {
242
- "user@email.com": {
243
- "threadId": "user@email.com",
244
- "executions": [
245
- {
246
- "executionId": "exec-uuid",
247
- "inputMessage": "Hello",
248
- "outputMessage": "Hi!",
249
- "status": "success",
250
- "traces": [ /* árvore de traces */ ]
251
- }
252
- ]
253
- }
254
- }
255
- }
256
- ```
257
-
258
- ---
259
-
260
- ## ✨ Próximos Passos
261
-
262
- 1. **Teste básico:** `rf test` e envie mensagens no portal
263
- 2. **Execute agente:** Em outro terminal, rode seu agente
264
- 3. **Monitore:** Veja execuções em tempo real
265
- 4. **Debug:** Analise traces detalhados
266
- 5. **Itere:** Faça mudanças e teste novamente
267
-
268
- **Happy testing!** 🚀
269
-
270
- Para mais detalhes, veja:
271
- - [`docs/TEST-COMMAND.md`](docs/TEST-COMMAND.md) - Documentação completa
272
- - [`CLI-DOCS.md`](CLI-DOCS.md) - Todos os comandos da CLI
273
-