You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/getting-started/quick-start.md
+57-7Lines changed: 57 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ import TabItem from '@theme/TabItem';
8
8
9
9
# Quick Start
10
10
11
-
There are two ways to create a VoltAgent application: Automatic setup or manual setup. While both work, the automatic setup provides the smoothest experience, especially for new users.
11
+
There are two ways to create a VoltAgent application: Automatic setup or manual setup. While both work, the automatic setup provides the smoothest experience, especially for new users. Be sure your environment is running **Node.js 20.19 or newer** so the generated tsdown build works without ESM resolution issues.
12
12
13
13
### Automatic Setup (Recommended)
14
14
@@ -72,10 +72,12 @@ The CLI will guide you through the setup process:
72
72
73
73
The tool will automatically:
74
74
75
-
- Create project files and structure
75
+
- Create project files and structure (including a `tsdown.config.ts` build configuration)
76
76
- Generate a `.env` file with your API key (if provided)
77
77
- Initialize a git repository
78
-
- Install dependencies Once the setup is complete, navigate to your project directory:
78
+
- Install dependencies
79
+
80
+
Once the setup is complete, navigate to your project directory:
79
81
80
82
```bash
81
83
cd my-voltagent-app
@@ -167,6 +169,39 @@ You should receive a response from your AI agent in the chat window. This confir
167
169
168
170
The `dev` script uses `tsx watch`, so it will automatically restart if you make changes to your code in the `src` directory. Press `Ctrl+C`in the terminal to stop the agent.
169
171
172
+
### Build for Production
173
+
174
+
When you're ready to deploy, bundle the app and run the compiled JavaScript with Node:
175
+
176
+
<Tabs>
177
+
<TabItem value="npm" label="npm" default>
178
+
179
+
```bash
180
+
npm run build
181
+
npm start
182
+
```
183
+
184
+
</TabItem>
185
+
<TabItem value="yarn" label="yarn">
186
+
187
+
```bash
188
+
yarn build
189
+
yarn start
190
+
```
191
+
192
+
</TabItem>
193
+
<TabItem value="pnpm" label="pnpm">
194
+
195
+
```bash
196
+
pnpm build
197
+
pnpm start
198
+
```
199
+
200
+
</TabItem>
201
+
</Tabs>
202
+
203
+
The `build` script invokes **tsdown**, which bundles your TypeScript entrypoint (and any sibling directories such as `./workflows` or `./tools`) into `dist/index.js`. This extra step keeps the Node ESM loader from throwing `ERR_UNSUPPORTED_DIR_IMPORT` while preserving extensionless imports during development.
204
+
170
205
### Explore and Run Your Workflow from the Console
171
206
172
207
Your new project isn't just an agent; it's a powerful automation engine. We've included an expense approval workflow example to get you started, and you can run it directly from the VoltOps console.
0 commit comments