import Anchorbrowser from 'anchorbrowser';
const anchorClient = new Anchorbrowser({
apiKey: process.env.ANCHORBROWSER_API_KEY
});
const response = await anchorClient.agent.task(
'Search for the latest AI news and summarize the top 3 articles',
{
taskOptions: {
url: 'https://news.google.com',
agent: 'gemini-computer-use',
// model: 'gemini-2.5-computer-use-preview-10-2025', // Default model
maxSteps: 25,
outputSchema: {
type: 'object',
properties: {
articles: {
type: 'array',
items: {
type: 'object',
properties: {
title: { type: 'string' },
summary: { type: 'string' },
source: { type: 'string' }
}
}
}
}
}
}
}
);
console.log(response);