SDK examples
Configure, grade and serve a continual-learning ticket router.
Dataset & tasks creates the training and holdout Datasets and adds examples. Publish them in Ponder, then run Model setup to pin their published versions and bind the judge from Graders. Call the deployed Model with Serve (AI SDK) or Serve (Vanilla). These examples use Ponder SDK 1.1 or later and run on your server. Model setup
setup.ts
import { createPonder } from "ponder-sdk";
import { bindQueueGrader } from "./queue.judge";
const pond = createPonder({ apiKey: process.env.OPENPOND_API_KEY });
await pond.createModel({
id: "ticket-router",
name: "Ticket router",
baseModel: "Qwen/Qwen3-8B",
systemPrompt: "Route the ticket to billing, technical, or sales. Reply with just the queue.",
dataset: "support-tickets",
evaluation: { dataset: "support-tickets-holdout" },
graderBinding: await bindQueueGrader(pond),
training: { method: "grpo", adapter: "lora" },
learning: {
schedule: "nightly",
localTime: "20:00",
timeZone: "UTC",
minApprovedExamples: 100,
maxSpendPerUpdateUsd: 5,
maxSpendPerDayUsd: 20,
},
});