Agent class is the primary entry point for the PraisonAI TypeScript SDK — instructions, tools, and optional persistence in one API.
Quick Start
Basic Usage
Simple Agent
Agent with Custom Name
Agent with Model Selection
Agent with Tools
Pass plain JavaScript functions as tools - schemas are auto-generated:Multiple Tools
Agent with Persistence
Use thedb() factory for easy database setup:
Database URL Formats
Agent Configuration
Full Configuration Options
Advanced Mode (Role/Goal/Backstory)
For more structured agent definitions:Session Management
Methods
chat(prompt: string)
Send a message and get a response:start(prompt: string)
Alias forchat():
execute()
Execute without a new prompt (uses existing context):Environment Variables
Examples
Research Agent
Code Assistant
Related
AgentTeam
Multi-agent orchestration
AgentFlow
Step-based workflows
Tools
Custom tool development

