1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
//! Agent CLI arguments
use clap::{Args, Subcommand};
/// Agent management arguments
#[derive(Args)]
pub struct AgentArgs {
#[command(subcommand)]
pub command: AgentCommands,
}
/// Spelling patience configuration
#[derive(clap::ValueEnum, Clone, Debug)]
pub enum SpellingPatience {
/// Automatic (default)
Auto,
/// Low patience
Low,
/// Medium patience
Medium,
/// High patience
High,
}
#[derive(Subcommand)]
pub enum AgentCommands {
/// List all agents
List {
/// Page size
#[arg(short, long)]
limit: Option<u32>,
},
/// Get agent summaries (lightweight)
Summaries {
/// Page size
#[arg(short, long)]
limit: Option<u32>,
},
/// Get agent details
Get {
/// Agent ID
agent_id: String,
},
/// Create a new agent
Create {
/// Agent name
#[arg(short, long)]
name: String,
/// Agent description
#[arg(short, long)]
description: Option<String>,
/// Voice ID for the agent
#[arg(long)]
voice_id: Option<String>,
/// First message template
#[arg(short = 'm', long)]
first_message: Option<String>,
/// System prompt
#[arg(short = 'p', long)]
system_prompt: Option<String>,
},
/// Update an agent
Update {
/// Agent ID
agent_id: String,
/// New name
#[arg(short, long)]
name: Option<String>,
/// New description
#[arg(short, long)]
description: Option<String>,
},
/// Delete an agent
Delete {
/// Agent ID
agent_id: String,
},
/// Get agent public link
Link {
/// Agent ID
agent_id: String,
},
/// Duplicate an agent
Duplicate {
/// Agent ID to duplicate
agent_id: String,
/// Name for the new agent
#[arg(short, long)]
name: String,
},
/// List agent branches
Branches {
/// Agent ID
agent_id: String,
},
/// Rename an agent branch
RenameBranch {
/// Agent ID
agent_id: String,
/// Branch ID
branch_id: String,
/// New branch name
#[arg(short, long)]
name: String,
},
/// List batch calls
BatchList {
/// Page size
#[arg(short, long)]
limit: Option<u32>,
},
/// Get batch call status
BatchStatus {
/// Batch call ID
batch_id: String,
},
/// Delete a batch call
BatchDelete {
/// Batch call ID
batch_id: String,
},
/// Simulate a conversation with an agent (for testing)
Simulate {
/// Agent ID
agent_id: String,
/// User message to simulate
#[arg(short, long)]
message: String,
/// Maximum turns in the simulation
#[arg(long, default_value = "5")]
max_turns: u32,
},
/// Update agent turn configuration
UpdateTurn {
/// Agent ID
agent_id: String,
/// Spelling patience (auto, low, medium, high)
#[arg(long, value_enum)]
spelling_patience: Option<SpellingPatience>,
/// Turn silence threshold in milliseconds
#[arg(long)]
silence_threshold_ms: Option<u32>,
},
/// List WhatsApp accounts connected to agents
WhatsappList,
/// Get agent widget configuration
WidgetGet {
/// Agent ID
agent_id: String,
},
/// Set agent widget avatar
WidgetAvatar {
/// Agent ID
agent_id: String,
/// Avatar image file path
#[arg(short, long)]
avatar_file: String,
},
}