Skip to main content

PraisonAI TypeScript SDK

The PraisonAI TypeScript SDK provides a complete framework for building AI agents, workflows, and applications.

Installation

npm install praisonai
# or
pnpm add praisonai

Quick Start

import { Agent, createAgent } from 'praisonai';

// Create a simple agent
const agent = createAgent({
  name: 'Assistant',
  instructions: 'You are a helpful assistant.',
  llm: 'openai/gpt-4o-mini'
});

// Chat with the agent
const response = await agent.chat('Hello!');
console.log(response.text);

Features

Core Features

  • Agents - Create and manage AI agents
  • Workflows - Multi-agent orchestration
  • Tools - Extend agent capabilities
  • Memory - Persistent conversation memory
  • Sessions - Conversation management

Specialized Agents

Advanced Features

Integrations

CLI

The SDK includes a full CLI. See TypeScript CLI Reference.
# Install globally
npm install -g praisonai

# Use the CLI
praisonai-ts chat "Hello!"
praisonai-ts auto "Build a web scraper"
praisonai-ts research "AI trends 2024"

LLM Providers

import { createProvider, getAvailableProviders } from 'praisonai';

// List available providers
const providers = getAvailableProviders();

// Create a provider
const openai = createProvider('openai/gpt-4o-mini');
const anthropic = createProvider('anthropic/claude-3-sonnet');
const google = createProvider('google/gemini-pro');

Environment Variables

OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=...
PRAISONAI_MODEL=openai/gpt-4o-mini