@waken/sdk
v0.1.1
Published
Waken SDK: persistent AI agents hosted on the cloud, from TypeScript and JavaScript
Maintainers
Readme
@waken/sdk
Persistent AI agents hosted on the cloud, from TypeScript and JavaScript. A thin client over the Waken HTTP API, no dependencies, Node 18+, Deno, Bun and browsers.
npm install @waken/sdkimport { Waken } from "@waken/sdk";
const waken = new Waken({ apiKey: process.env.WAKEN_KEY! });
const agent = await waken.agents.create({
name: "bookkeeper",
model: { provider: "anthropic", api_key: process.env.ANTHROPIC_API_KEY! },
spend_cap_usd: 10,
});
const reply = await waken.agents.message(agent.id, "Sort my March receipts by vendor.");
console.log(reply.text);
const cp = await waken.checkpoints.take(agent.id); // a point you can rewind to
await waken.checkpoints.restore(agent.id, cp.id); // rewind: files, memory, conversationEverything the API does is here: agents (create, list, get, delete, message, sleep, wake, restart, usage, resize, setModel, setHarness, logs, exec), checkpoints (take, list, restore), files (list, read, readText, write, mkdir, move, delete, uploadTar), env (list, set), triggers (schedules and the agent's incoming webhook), webhooks (events on all your agents), harnesses(). Any other route: waken.request(method, path, body).
Errors throw a WakenError with status and the API message.
Keys are created in the dashboard, Developers. An agent runs on your own model key, passed at creation and never stored by Waken.
