agent.tsNode.js
import { Jettson } from "@jettson/sdk";
const jet = new Jettson({ apiKey: process.env.JETTSON_API_KEY! });
// One call. A durable Linux agent with memory + identity.
const agent = await jet.agents.spawn({
task: "Find 10 plumbers in Phoenix with 4.5+ stars and email them.",
name: "outreach-bot",
});
// Block until the agent finishes — resuming if it's interrupted along the way.
const result = await jet.agents.wait(agent.agent_id);
console.log(result.status, result.final_result);