import { T2000 } from '@t2000/sdk';
const agent = await T2000.create();
const prices = await agent.pay({
url: 'https://mpp.t2000.ai/coingecko/v1/price',
method: 'POST',
body: JSON.stringify({ ids: 'sui,ethereum,bitcoin', vs_currencies: 'usd' }),
});
const news = await agent.pay({
url: 'https://mpp.t2000.ai/newsapi/v1/search',
method: 'POST',
body: JSON.stringify({ q: 'crypto', pageSize: 5 }),
});
const brief = await agent.pay({
url: 'https://mpp.t2000.ai/anthropic/v1/messages',
method: 'POST',
headers: { 'anthropic-version': '2023-06-01' },
body: JSON.stringify({
model: 'claude-sonnet-4-5',
max_tokens: 1024,
messages: [{
role: 'user',
content: `Prices: ${JSON.stringify(prices.body)}. Headlines: ${JSON.stringify(news.body)}. Write a 200-word brief.`,
}],
}),
});