import { Agent } from 'praisonai';
import { codeExecution } from 'praisonai/tools';
const agent = new Agent({
name: 'DataAnalyst',
instructions: `You are a data analyst.
Use Python code to perform calculations and data analysis.
Always show your work and explain the results.`,
tools: [codeExecution({ timeout: 60000 })],
});
const result = await agent.run(`
Calculate the following:
1. Sum of first 100 prime numbers
2. Standard deviation of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
3. Fibonacci sequence up to 1000
`);
console.log(result.text);