retell-cli 1.0.1 → 1.1.0
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/README.md +160 -0
- package/dist/index.js +2339 -141
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ Community-built command-line tool for Retell AI - designed to give AI assistants
|
|
|
10
10
|
- **Transcript Management** - List, retrieve, and analyze call transcripts
|
|
11
11
|
- **Agent Management** - View and configure Retell AI agents
|
|
12
12
|
- **Prompt Engineering** - Pull, edit, and update agent prompts
|
|
13
|
+
- **Tool Management** - Full CRUD for agent tools (webhooks, custom functions, etc.)
|
|
13
14
|
- **Multi-format Support** - Works with Retell LLM and Conversation Flows
|
|
14
15
|
- **AI-Friendly** - JSON output by default for AI coding assistants
|
|
15
16
|
- **Cross-Shell** - Works in bash, fish, zsh, and more
|
|
@@ -304,6 +305,164 @@ Publish a draft agent to make changes live.
|
|
|
304
305
|
retell agent-publish agent_123abc
|
|
305
306
|
```
|
|
306
307
|
|
|
308
|
+
### Tools
|
|
309
|
+
|
|
310
|
+
Manage agent tools (custom functions, webhooks, etc.). Tools are embedded within Retell LLM and Conversation Flow configurations.
|
|
311
|
+
|
|
312
|
+
#### `retell tools list <agent_id> [options]`
|
|
313
|
+
|
|
314
|
+
List all tools configured for an agent.
|
|
315
|
+
|
|
316
|
+
**Options:**
|
|
317
|
+
- `--state <name>` - Filter by state name (Retell LLM only)
|
|
318
|
+
- `--component <id>` - Filter by component ID (Conversation Flow only)
|
|
319
|
+
- `--fields <fields>` - Comma-separated list of fields to return
|
|
320
|
+
|
|
321
|
+
**Examples:**
|
|
322
|
+
```bash
|
|
323
|
+
# List all tools
|
|
324
|
+
retell tools list agent_123abc
|
|
325
|
+
|
|
326
|
+
# Filter by state (Retell LLM)
|
|
327
|
+
retell tools list agent_123abc --state greeting
|
|
328
|
+
|
|
329
|
+
# Show only total count
|
|
330
|
+
retell tools list agent_123abc --fields total_count,general_tools
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
#### `retell tools get <agent_id> <tool_name> [options]`
|
|
334
|
+
|
|
335
|
+
Get detailed information about a specific tool.
|
|
336
|
+
|
|
337
|
+
**Options:**
|
|
338
|
+
- `--state <name>` - State name to search within (Retell LLM only)
|
|
339
|
+
- `--component <id>` - Component ID to search within (Conversation Flow only)
|
|
340
|
+
- `--fields <fields>` - Comma-separated list of fields to return
|
|
341
|
+
|
|
342
|
+
**Example:**
|
|
343
|
+
```bash
|
|
344
|
+
retell tools get agent_123abc lookup_customer
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
#### `retell tools add <agent_id> [options]`
|
|
348
|
+
|
|
349
|
+
Add a new tool to an agent from a JSON file.
|
|
350
|
+
|
|
351
|
+
**Options:**
|
|
352
|
+
- `-f, --file <path>` - Path to JSON file containing tool definition (required)
|
|
353
|
+
- `--state <name>` - Add to specific state (Retell LLM only)
|
|
354
|
+
- `--component <id>` - Add to specific component (Conversation Flow only)
|
|
355
|
+
- `--dry-run` - Preview changes without applying them
|
|
356
|
+
|
|
357
|
+
**Example tool.json:**
|
|
358
|
+
```json
|
|
359
|
+
{
|
|
360
|
+
"name": "lookup_customer",
|
|
361
|
+
"type": "custom",
|
|
362
|
+
"description": "Look up customer information in CRM",
|
|
363
|
+
"url": "https://api.example.com/customers/lookup",
|
|
364
|
+
"method": "POST",
|
|
365
|
+
"speak_after_execution": true,
|
|
366
|
+
"parameters": {
|
|
367
|
+
"type": "object",
|
|
368
|
+
"properties": {
|
|
369
|
+
"phone_number": { "type": "string", "description": "Customer phone" }
|
|
370
|
+
},
|
|
371
|
+
"required": ["phone_number"]
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
**Examples:**
|
|
377
|
+
```bash
|
|
378
|
+
# Add to general tools
|
|
379
|
+
retell tools add agent_123abc --file tool.json
|
|
380
|
+
|
|
381
|
+
# Add to specific state
|
|
382
|
+
retell tools add agent_123abc --file tool.json --state booking
|
|
383
|
+
|
|
384
|
+
# Preview changes first
|
|
385
|
+
retell tools add agent_123abc --file tool.json --dry-run
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
#### `retell tools update <agent_id> <tool_name> [options]`
|
|
389
|
+
|
|
390
|
+
Update an existing tool with a new definition.
|
|
391
|
+
|
|
392
|
+
**Options:**
|
|
393
|
+
- `-f, --file <path>` - Path to JSON file containing updated tool definition (required)
|
|
394
|
+
- `--state <name>` - State where tool exists (Retell LLM only)
|
|
395
|
+
- `--component <id>` - Component where tool exists (Conversation Flow only)
|
|
396
|
+
- `--dry-run` - Preview changes without applying them
|
|
397
|
+
|
|
398
|
+
**Example:**
|
|
399
|
+
```bash
|
|
400
|
+
retell tools update agent_123abc lookup_customer --file updated-tool.json
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
#### `retell tools remove <agent_id> <tool_name> [options]`
|
|
404
|
+
|
|
405
|
+
Remove a tool from an agent.
|
|
406
|
+
|
|
407
|
+
**Options:**
|
|
408
|
+
- `--state <name>` - State where tool exists (Retell LLM only)
|
|
409
|
+
- `--component <id>` - Component where tool exists (Conversation Flow only)
|
|
410
|
+
- `--dry-run` - Preview changes without applying them
|
|
411
|
+
|
|
412
|
+
**Examples:**
|
|
413
|
+
```bash
|
|
414
|
+
# Remove from general tools
|
|
415
|
+
retell tools remove agent_123abc lookup_customer
|
|
416
|
+
|
|
417
|
+
# Remove from specific state
|
|
418
|
+
retell tools remove agent_123abc book_cal --state booking
|
|
419
|
+
|
|
420
|
+
# Preview removal
|
|
421
|
+
retell tools remove agent_123abc my_tool --dry-run
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
#### `retell tools export <agent_id> [options]`
|
|
425
|
+
|
|
426
|
+
Export all tools from an agent to a JSON file.
|
|
427
|
+
|
|
428
|
+
**Options:**
|
|
429
|
+
- `-o, --output <path>` - Output file path (prints to stdout if not specified)
|
|
430
|
+
|
|
431
|
+
**Examples:**
|
|
432
|
+
```bash
|
|
433
|
+
# Export to stdout
|
|
434
|
+
retell tools export agent_123abc
|
|
435
|
+
|
|
436
|
+
# Export to file
|
|
437
|
+
retell tools export agent_123abc --output tools.json
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
#### `retell tools import <agent_id> [options]`
|
|
441
|
+
|
|
442
|
+
Import tools from a JSON file to an agent.
|
|
443
|
+
|
|
444
|
+
**Options:**
|
|
445
|
+
- `-f, --file <path>` - Path to JSON file containing tools to import (required)
|
|
446
|
+
- `--dry-run` - Preview changes without applying them
|
|
447
|
+
- `--replace` - Replace existing tools with same name instead of skipping
|
|
448
|
+
|
|
449
|
+
**Examples:**
|
|
450
|
+
```bash
|
|
451
|
+
# Import tools
|
|
452
|
+
retell tools import agent_123abc --file tools.json
|
|
453
|
+
|
|
454
|
+
# Preview import
|
|
455
|
+
retell tools import agent_123abc --file tools.json --dry-run
|
|
456
|
+
|
|
457
|
+
# Replace existing tools
|
|
458
|
+
retell tools import agent_123abc --file tools.json --replace
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
**Important:** After modifying tools, remember to publish the agent:
|
|
462
|
+
```bash
|
|
463
|
+
retell agent-publish agent_123abc
|
|
464
|
+
```
|
|
465
|
+
|
|
307
466
|
### Field Selection
|
|
308
467
|
|
|
309
468
|
Reduce output size and token usage by selecting specific fields:
|
|
@@ -322,6 +481,7 @@ retell agents list --limit 10 --fields agent_id,agent_name
|
|
|
322
481
|
**Supported commands:**
|
|
323
482
|
- All transcript commands (`list`, `get`, `analyze`)
|
|
324
483
|
- All agent commands (`list`, `info`)
|
|
484
|
+
- Tools commands (`list`, `get`)
|
|
325
485
|
|
|
326
486
|
**Features:**
|
|
327
487
|
- Dot notation for nested fields (e.g., `metadata.duration`)
|