Copy
# Basic research
npx ts-node -e "
import { DeepResearchAgent } from 'praisonai';
const agent = new DeepResearchAgent();
agent.research('What is machine learning?').then(r => {
console.log('Answer:', r.answer.substring(0, 200));
console.log('Confidence:', r.confidence);
});
"
# View reasoning steps
npx ts-node -e "
import { DeepResearchAgent } from 'praisonai';
const agent = new DeepResearchAgent();
agent.research('Explain AI').then(r => {
r.reasoning.forEach(s => console.log('Step', s.step, s.thought));
});
"
# With verbose mode
npx ts-node -e "
import { DeepResearchAgent } from 'praisonai';
const agent = new DeepResearchAgent({ verbose: true });
agent.research('Latest tech trends').then(r => {
console.log('Done. Confidence:', r.confidence);
});
"
# Check citations
npx ts-node -e "
import { DeepResearchAgent } from 'praisonai';
const agent = new DeepResearchAgent();
agent.research('AI history').then(r => {
console.log('Citations:', r.citations.length);
r.citations.forEach(c => console.log('-', c.title));
});
"
# Create named agent
npx ts-node -e "
import { DeepResearchAgent } from 'praisonai';
const agent = new DeepResearchAgent({ name: 'Scholar' });
console.log('Agent:', agent.name);
"

