chore(examples): migrate to v3 authoring and lifecycle APIs

Draft
ZR
4d ago
+1930-1279

PR Checklist

  • Commit message follows repository conventions.

Bugs / Features

  • Examples and generated starter code updated.
  • CLI deployment guidance updated.
  • Changeset included for CLI and create-voltagent-app.

What is the current behavior?

Examples and generators teach constructor-based authoring and implicit startup, so newly scaffolded applications do not match the v3 API.

What is the new behavior?

  • Migrate repository examples to canonical authoring factories and explicit application readiness.
  • Update create-voltagent-app templates and the example generator.
  • Update CLI deployment output, including serverless readiness guidance.
  • Preserve native AI SDK tools and integration-specific behavior.

Testing

  • CLI and create-voltagent-app builds passed.
  • LibSQL dependency and the base example build passed.
  • Repository lint, changed Markdown formatting, and whitespace checks passed.
  • The entire example catalog was not individually built or run against external services.

Notes for reviewers

Layer 3 of 4. Depends on #1454 and #1455; merge those first.

This cross-fork draft targets upstream next, so its diff initially includes layers 1–2. The examples/scaffolding-specific commit is 681f108d. Rebase this branch onto next after its dependencies merge, preserving that commit.

Review order: #1454 → #1455 → this PR → documentation.


Summary by cubic

Migrates repository examples and generated starter code to the v3 authoring and lifecycle APIs so newly scaffolded applications match the v3 core API.

  • Replaces new Agent(...), tool(...), and new VoltAgent(...) in examples with defineAgent, defineTool, and the voltagent factory.
  • Makes application startup explicit by awaiting voltagent(...).ready() instead of relying on implicit construction-time startup.
  • Updates create-voltagent-app templates and the example generator to use the canonical factories.
  • Updates CLI deployment guidance with await app.ready() before creating serverless handlers.
  • Agent and VoltAgent are now type-only exports; their runtime classes are internal.

Notes for reviewers

  • Layer 3 of 4; depends on #1454 and #1455, which should merge first.
  • Native AI SDK tools and integration-specific behavior are preserved.
  • CLI and create-voltagent-app builds, the LibSQL dependency, the base example, lint, and Markdown/whitespace checks passed; the full example catalog was not built or run against external services.