initial preparation
The first thing you need to do is to make sure that you have installed the Node.js environment (LTS version is recommended). The installation process is mainly done through the CLI tool and the steps are as follows:
Installation steps
- Create a project: Running
npm create voltagent-app@latest my-voltagent-app
- Selection Tools: Follow the prompts to choose a package manager (npm/yarn/pnpm)
- Access to the catalog:
cd my-voltagent-app
Environment Configuration
In the project root directory, create the.env
file to configure API keys, such as OpenAI:
OPENAI_API_KEY=sk-proj-你的密钥
Initiation of projects
(of a computer) runnpm run dev
Launch a development server to support hot code updates. By default, the development server can be started via thehttp://localhost:3000
Access to the debugging console.
caveat
For different LLM providers you need to configure the appropriate environment variables, refer to the official documentation voltagent.dev/docs for detailed parameters.
This answer comes from the articleVoltAgent: TypeScript Open Source Framework for Rapidly Building AI IntelligentsiaThe