import { query } from "@anthropic-ai/claude-agent-sdk"; // 1-hello.ts — Simplest Agent SDK call. No tools, no streaming tricks. // Just ask Claude a question and print the answer. const q = query({ prompt: "Explain in 2-3 sentences what a payments gateway does and why a merchant needs one.", options: { maxTurns: 1 }, }); for await (const msg of q) { if (msg.type === "assistant" && msg.message) { for (const block of msg.message.content) { if (block.type === "text") { console.log(block.text); } } } if (msg.type === "result") { console.log(`\n[${msg.subtype}, $${msg.total_cost_usd.toFixed(4)}]`); } }