Copy
# Analyze an image
npx ts-node -e "
import { ImageAgent } from 'praisonai';
const agent = new ImageAgent();
agent.analyze({
imageUrl: 'https://example.com/image.jpg',
prompt: 'Describe this image'
}).then(console.log);
"
# Chat with image context
npx ts-node -e "
import { ImageAgent } from 'praisonai';
const agent = new ImageAgent();
agent.chat('What is in this image?', 'https://example.com/image.jpg')
.then(console.log);
"
# Compare two images
npx ts-node -e "
import { ImageAgent } from 'praisonai';
const agent = new ImageAgent();
agent.compare(
'https://example.com/img1.jpg',
'https://example.com/img2.jpg'
).then(console.log);
"
# High detail analysis
npx ts-node -e "
import { ImageAgent } from 'praisonai';
const agent = new ImageAgent();
agent.analyze({
imageUrl: 'https://example.com/image.jpg',
detail: 'high'
}).then(console.log);
"
# Create named agent
npx ts-node -e "
import { ImageAgent } from 'praisonai';
const agent = new ImageAgent({ name: 'VisionBot' });
console.log('Agent:', agent.name);
"

