Skip to content

Commit be1aec2

Browse files
refactor: Change voice template back to hidden --voice flag
Per team feedback, keep the voice template as a hidden flag until audio package integration is complete. Users who understand the limitations can use: agentex init --voice
1 parent 0e6e9bb commit be1aec2

File tree

1 file changed

+41
-34
lines changed
  • src/agentex/lib/cli/commands

1 file changed

+41
-34
lines changed

src/agentex/lib/cli/commands/init.py

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,14 @@ def get_project_context(answers: Dict[str, Any], project_path: Path, manifest_ro
124124
}
125125

126126

127-
def init():
127+
def init(
128+
voice: bool = typer.Option(
129+
False,
130+
"--voice",
131+
hidden=True,
132+
help="Create a voice agent template with interruption handling and conversation state management",
133+
),
134+
):
128135
"""Initialize a new agent project"""
129136
console.print(
130137
Panel.fit(
@@ -133,40 +140,40 @@ def init():
133140
)
134141
)
135142

136-
# Use a Rich table for template descriptions
137-
table = Table(show_header=True, header_style="bold blue")
138-
table.add_column("Template", style="cyan", no_wrap=True)
139-
table.add_column("Description", style="white")
140-
table.add_row(
141-
"[bold cyan]Async - ACP Only[/bold cyan]",
142-
"Asynchronous, non-blocking agent that can process multiple concurrent requests. Best for straightforward asynchronous agents that don't need durable execution. Good for asynchronous workflows, stateful applications, and multi-step analysis.",
143-
)
144-
table.add_row(
145-
"[bold cyan]Async - Temporal[/bold cyan]",
146-
"Asynchronous, non-blocking agent with durable execution for all steps. Best for production-grade agents that require complex multi-step tool calls, human-in-the-loop approvals, and long-running processes that require transactional reliability.",
147-
)
148-
table.add_row(
149-
"[bold cyan]Sync ACP[/bold cyan]",
150-
"Synchronous agent that processes one request per task with a simple request-response pattern. Best for low-latency use cases, FAQ bots, translation services, and data lookups.",
151-
)
152-
table.add_row(
153-
"[bold cyan]Conversational Agent[/bold cyan]",
154-
"Real-time conversational agent with built-in interruption handling, state management, and guardrail support. Best for voice assistants, interactive chatbots, and applications requiring natural turn-taking and streaming responses.",
155-
)
156-
console.print()
157-
console.print(table)
158-
console.print()
143+
# If --voice flag is passed, skip the menu and use voice template
144+
if voice:
145+
console.print("[bold cyan]Creating Voice Agent template...[/bold cyan]\n")
146+
template_type = TemplateType.VOICE
147+
else:
148+
# Use a Rich table for template descriptions
149+
table = Table(show_header=True, header_style="bold blue")
150+
table.add_column("Template", style="cyan", no_wrap=True)
151+
table.add_column("Description", style="white")
152+
table.add_row(
153+
"[bold cyan]Async - ACP Only[/bold cyan]",
154+
"Asynchronous, non-blocking agent that can process multiple concurrent requests. Best for straightforward asynchronous agents that don't need durable execution. Good for asynchronous workflows, stateful applications, and multi-step analysis.",
155+
)
156+
table.add_row(
157+
"[bold cyan]Async - Temporal[/bold cyan]",
158+
"Asynchronous, non-blocking agent with durable execution for all steps. Best for production-grade agents that require complex multi-step tool calls, human-in-the-loop approvals, and long-running processes that require transactional reliability.",
159+
)
160+
table.add_row(
161+
"[bold cyan]Sync ACP[/bold cyan]",
162+
"Synchronous agent that processes one request per task with a simple request-response pattern. Best for low-latency use cases, FAQ bots, translation services, and data lookups.",
163+
)
164+
console.print()
165+
console.print(table)
166+
console.print()
159167

160-
# Gather project information
161-
template_type = questionary.select(
162-
"What type of template would you like to create?",
163-
choices=[
164-
{"name": "Async - ACP Only", "value": TemplateType.DEFAULT},
165-
{"name": "Async - Temporal", "value": "temporal_submenu"},
166-
{"name": "Sync ACP", "value": "sync_submenu"},
167-
{"name": "Conversational Agent", "value": TemplateType.VOICE},
168-
],
169-
).ask()
168+
# Gather project information
169+
template_type = questionary.select(
170+
"What type of template would you like to create?",
171+
choices=[
172+
{"name": "Async - ACP Only", "value": TemplateType.DEFAULT},
173+
{"name": "Async - Temporal", "value": "temporal_submenu"},
174+
{"name": "Sync ACP", "value": "sync_submenu"},
175+
],
176+
).ask()
170177

171178
def validate_agent_name(text: str) -> bool | str:
172179
"""Validate agent name follows required format"""

0 commit comments

Comments
 (0)