- Node.js
Quick Start
Requires Node.js 18+ (the bundled
openai dependency needs Node 18).1
Simple Usage
As of v1.7.4, praisonai requires Node.js 18 or later (
openai@4 needs Node 18+). Importing the package no longer requires OPENAI_API_KEY — the key is only checked when an OpenAI client is created, so Anthropic and Google users can require('praisonai') without one.2
With Configuration
Requires Node ≥ 18 (
engines.node >= 18). As of praisonai-ts 1.7.4, require('praisonai') no longer throws when OPENAI_API_KEY is unset — the key is only needed at client creation, so the 5-line example below runs end-to-end.3
Create File
4
Run Script
Usage Examples
Single Agent Example
Single Agent Example
Create and run a single agent to perform a specific task:
Multi-Agent Example
Multi-Agent Example
Create and run multiple agents working together:
Task-Based Agent Example
Task-Based Agent Example
Create agents with specific tasks and dependencies:
Running the Examples
1
Set Environment Variables
2
Create Example File
Create a new TypeScript file (e.g.,
app.ts) with any of the above examples.3
Run the Example
Related
TypeScript SDK
TypeScript agent framework
Agent
Agent configuration

