Copy
Ask AI
import Anchorbrowser from 'anchorbrowser';
const anchorClient = new Anchorbrowser()
const session = await anchorClient.sessions.create()
const sessionId = session.data?.id
const result = await anchorClient.agent.task(
`Find the most recent NBA game played by the Milwaukee Bucks
and provide the result.`,
{
taskOptions: {
url: 'https://nba.com/',
},
sessionId: sessionId,
}
)
console.log(result)
const author = await anchorClient.agent.task(
`Find an article discussing the game and provide the author's name.`,
{
sessionId: sessionId,
}
)
console.log(author)

