basic-agent.ts
1 /** 2 * Basic Agent Example 3 * Demonstrates simple agent usage with OpenAI 4 */ 5 6 import { Agent } from 'praisonai'; 7 8 async function main() { 9 const agent = new Agent({ 10 name: 'Assistant', 11 instructions: 'You are a helpful assistant. Be concise and informative.', 12 llm: 'openai/gpt-4o-mini' 13 }); 14 15 const response = await agent.chat('What is TypeScript?'); 16 console.log('Response:', response.text); 17 } 18 19 main().catch(console.error);