|
9 | 9 | from rich.panel import Panel |
10 | 10 | from rich.table import Table |
11 | 11 | from rich.console import Console |
| 12 | +from rich.syntax import Syntax |
| 13 | +from rich.text import Text |
| 14 | +from rich.rule import Rule |
12 | 15 |
|
13 | 16 | from agentex.lib.utils.logging import make_logger |
14 | 17 |
|
@@ -178,7 +181,7 @@ def validate_agent_name(text: str) -> bool | str: |
178 | 181 | return |
179 | 182 |
|
180 | 183 | description = questionary.text( |
181 | | - "Provide a brief description of your agent:", default="An AgentEx agent" |
| 184 | + "Provide a brief description of your agent:", default="An Agentex agent" |
182 | 185 | ).ask() |
183 | 186 | if not description: |
184 | 187 | return |
@@ -214,21 +217,155 @@ def validate_agent_name(text: str) -> bool | str: |
214 | 217 | project_path, context, answers["template_type"], answers["use_uv"] |
215 | 218 | ) |
216 | 219 |
|
217 | | - # Show next steps |
218 | | - console.print("\n[bold green]✨ Project created successfully![/bold green]") |
219 | | - console.print("\n[bold]Next steps:[/bold]") |
220 | | - console.print(f"1. cd {project_path}/{context['project_name']}") |
221 | | - console.print("2. Review and customize the generated files") |
222 | | - console.print("3. Update the container registry in manifest.yaml") |
| 220 | + # Show success message |
| 221 | + console.print() |
| 222 | + success_text = Text("✅ Project created successfully!", style="bold green") |
| 223 | + success_panel = Panel( |
| 224 | + success_text, |
| 225 | + border_style="green", |
| 226 | + padding=(0, 2), |
| 227 | + title="[bold white]Status[/bold white]", |
| 228 | + title_align="left" |
| 229 | + ) |
| 230 | + console.print(success_panel) |
| 231 | + |
| 232 | + # Main header |
| 233 | + console.print() |
| 234 | + console.print(Rule("[bold blue]Next Steps[/bold blue]", style="blue")) |
| 235 | + console.print() |
223 | 236 |
|
224 | | - if answers["template_type"] == TemplateType.TEMPORAL: |
225 | | - console.print("4. Run locally:") |
226 | | - console.print(" agentex agents run --manifest manifest.yaml") |
227 | | - else: |
228 | | - console.print("4. Run locally:") |
229 | | - console.print(" agentex agents run --manifest manifest.yaml") |
| 237 | + # Local Development Section |
| 238 | + local_steps = Text() |
| 239 | + local_steps.append("1. ", style="bold white") |
| 240 | + local_steps.append("Navigate to your project directory:\n", style="white") |
| 241 | + local_steps.append(f" cd {project_path}/{context['project_name']}\n\n", style="dim cyan") |
| 242 | + |
| 243 | + local_steps.append("2. ", style="bold white") |
| 244 | + local_steps.append("Review the generated files. ", style="white") |
| 245 | + local_steps.append("project/acp.py", style="yellow") |
| 246 | + local_steps.append(" is your agent's entrypoint.\n", style="white") |
| 247 | + local_steps.append(" See ", style="dim white") |
| 248 | + local_steps.append("https://agentex.sgp.scale.com/docs", style="blue underline") |
| 249 | + local_steps.append(" for how to customize different agent types", style="dim white") |
| 250 | + local_steps.append("\n\n", style="white") |
| 251 | + |
| 252 | + local_steps.append("3. ", style="bold white") |
| 253 | + local_steps.append("Set up your environment and test locally ", style="white") |
| 254 | + local_steps.append("(no deployment needed)", style="dim white") |
| 255 | + local_steps.append(":\n", style="white") |
| 256 | + local_steps.append(" uv venv && uv sync && source .venv/bin/activate", style="dim cyan") |
| 257 | + local_steps.append("\n agentex agents run --manifest manifest.yaml", style="dim cyan") |
| 258 | + |
| 259 | + local_panel = Panel( |
| 260 | + local_steps, |
| 261 | + title="[bold blue]Development Setup[/bold blue]", |
| 262 | + title_align="left", |
| 263 | + border_style="blue", |
| 264 | + padding=(1, 2) |
| 265 | + ) |
| 266 | + console.print(local_panel) |
| 267 | + console.print() |
230 | 268 |
|
231 | | - console.print("5. Deploy your agent:") |
232 | | - console.print( |
233 | | - " agentex agents deploy --cluster your-cluster --namespace your-namespace" |
| 269 | + # Prerequisites Note |
| 270 | + prereq_text = Text() |
| 271 | + prereq_text.append("The above is all you need for local development. Once you're ready for production, read this box and below.\n\n", style="white") |
| 272 | + |
| 273 | + prereq_text.append("• ", style="bold white") |
| 274 | + prereq_text.append("Prerequisites for Production: ", style="bold yellow") |
| 275 | + prereq_text.append("You need Agentex hosted on a Kubernetes cluster.\n", style="white") |
| 276 | + prereq_text.append(" See ", style="dim white") |
| 277 | + prereq_text.append("https://agentex.sgp.scale.com/docs", style="blue underline") |
| 278 | + prereq_text.append(" for setup instructions. ", style="dim white") |
| 279 | + prereq_text.append("Scale GenAI Platform (SGP) customers", style="dim cyan") |
| 280 | + prereq_text.append(" already have this setup as part of their enterprise license.\n\n", style="dim white") |
| 281 | + |
| 282 | + prereq_text.append("• ", style="bold white") |
| 283 | + prereq_text.append("Best Practice: ", style="bold blue") |
| 284 | + prereq_text.append("Use CI/CD pipelines for production deployments, not manual commands.\n", style="white") |
| 285 | + prereq_text.append(" Commands below demonstrate Agentex's quick deployment capabilities.", style="dim white") |
| 286 | + |
| 287 | + prereq_panel = Panel( |
| 288 | + prereq_text, |
| 289 | + border_style="yellow", |
| 290 | + padding=(1, 2) |
| 291 | + ) |
| 292 | + console.print(prereq_panel) |
| 293 | + console.print() |
| 294 | + |
| 295 | + # Production Setup Section (includes deployment) |
| 296 | + prod_steps = Text() |
| 297 | + prod_steps.append("4. ", style="bold white") |
| 298 | + prod_steps.append("Configure where to push your container image", style="white") |
| 299 | + prod_steps.append(":\n", style="white") |
| 300 | + prod_steps.append(" Edit ", style="dim white") |
| 301 | + prod_steps.append("manifest.yaml", style="dim yellow") |
| 302 | + prod_steps.append(" → ", style="dim white") |
| 303 | + prod_steps.append("deployment.image.repository", style="dim yellow") |
| 304 | + prod_steps.append(" → replace ", style="dim white") |
| 305 | + prod_steps.append('""', style="dim red") |
| 306 | + prod_steps.append(" with your registry", style="dim white") |
| 307 | + prod_steps.append("\n Examples: ", style="dim white") |
| 308 | + prod_steps.append("123456789012.dkr.ecr.us-west-2.amazonaws.com/my-agent", style="dim blue") |
| 309 | + prod_steps.append(", ", style="dim white") |
| 310 | + prod_steps.append("gcr.io/my-project", style="dim blue") |
| 311 | + prod_steps.append(", ", style="dim white") |
| 312 | + prod_steps.append("myregistry.azurecr.io", style="dim blue") |
| 313 | + prod_steps.append("\n\n", style="white") |
| 314 | + |
| 315 | + prod_steps.append("5. ", style="bold white") |
| 316 | + prod_steps.append("Build your agent as a container and push to registry", style="white") |
| 317 | + prod_steps.append(":\n", style="white") |
| 318 | + prod_steps.append(" agentex agents build --manifest manifest.yaml --registry <your-registry> --push", style="dim cyan") |
| 319 | + prod_steps.append("\n\n", style="white") |
| 320 | + |
| 321 | + prod_steps.append("6. ", style="bold white") |
| 322 | + prod_steps.append("Upload secrets to cluster ", style="white") |
| 323 | + prod_steps.append("(API keys, credentials your agent needs)", style="dim white") |
| 324 | + prod_steps.append(":\n", style="white") |
| 325 | + prod_steps.append(" agentex secrets sync --manifest manifest.yaml --cluster your-cluster", style="dim cyan") |
| 326 | + prod_steps.append("\n ", style="white") |
| 327 | + prod_steps.append("Note: ", style="dim yellow") |
| 328 | + prod_steps.append("Secrets are ", style="dim white") |
| 329 | + prod_steps.append("never stored in manifest.yaml", style="dim red") |
| 330 | + prod_steps.append(". You provide them via ", style="dim white") |
| 331 | + prod_steps.append("--values file", style="dim blue") |
| 332 | + prod_steps.append(" or interactive prompts", style="dim white") |
| 333 | + prod_steps.append("\n\n", style="white") |
| 334 | + |
| 335 | + prod_steps.append("7. ", style="bold white") |
| 336 | + prod_steps.append("Deploy your agent to run on the cluster", style="white") |
| 337 | + prod_steps.append(":\n", style="white") |
| 338 | + prod_steps.append(" agentex agents deploy --cluster your-cluster --namespace your-namespace", style="dim cyan") |
| 339 | + prod_steps.append("\n\n", style="white") |
| 340 | + prod_steps.append("Note: These commands use Helm charts hosted by Scale to deploy agents.", style="dim italic") |
| 341 | + |
| 342 | + prod_panel = Panel( |
| 343 | + prod_steps, |
| 344 | + title="[bold magenta]Production Setup & Deployment[/bold magenta]", |
| 345 | + title_align="left", |
| 346 | + border_style="magenta", |
| 347 | + padding=(1, 2) |
234 | 348 | ) |
| 349 | + console.print(prod_panel) |
| 350 | + |
| 351 | + # Professional footer with helpful context |
| 352 | + console.print() |
| 353 | + console.print(Rule(style="dim white")) |
| 354 | + |
| 355 | + # Add helpful context about the workflow |
| 356 | + help_text = Text() |
| 357 | + help_text.append("ℹ️ ", style="blue") |
| 358 | + help_text.append("Quick Start: ", style="bold white") |
| 359 | + help_text.append("Steps 1-3 for local development. Steps 4-7 require Agentex cluster for production.", style="dim white") |
| 360 | + console.print(" ", help_text) |
| 361 | + |
| 362 | + tip_text = Text() |
| 363 | + tip_text.append("💡 ", style="yellow") |
| 364 | + tip_text.append("Need help? ", style="bold white") |
| 365 | + tip_text.append("Use ", style="dim white") |
| 366 | + tip_text.append("agentex --help", style="cyan") |
| 367 | + tip_text.append(" or ", style="dim white") |
| 368 | + tip_text.append("agentex [command] --help", style="cyan") |
| 369 | + tip_text.append(" for detailed options", style="dim white") |
| 370 | + console.print(" ", tip_text) |
| 371 | + console.print() |
0 commit comments