Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

如何在项目中安装和配置VoltAgent?

2025-08-24 1.2 K

初始准备

首先需要确保已安装Node.js环境(建议LTS版本)。安装过程主要通过CLI工具完成,步骤如下:

Installation steps

  • Create a project: Runningnpm create voltagent-app@latest my-voltagent-app
  • Selection Tools: 根据提示选择包管理器(npm/yarn/pnpm)
  • Access to the catalog: cd my-voltagent-app

Environment Configuration

In the project root directory, create the.env文件配置API密钥,例如OpenAI:

OPENAI_API_KEY=sk-proj-你的密钥

Initiation of projects

(of a computer) runnpm run dev启动开发服务器,支持代码热更新。默认可通过http://localhost:3000访问调试控制台。

caveat

针对不同LLM提供商需要配置相应的环境变量,详细参数参考官方文档voltagent.dev/docs。

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish