TypeScript SDK — Agents
Agent CRUD methods in @korclaw/sdk.
typescript
// Create
const agent = await korclaw.agents.create({
name: "Ops Bot",
provider: "openai",
environment: "production",
risk_level: "high",
allowed_tools: ["deploy", "rollback"],
});
// List (cursor pagination)
const page = await korclaw.agents.list({ limit: 20, status: "active" });
// Get / retrieve
const one = await korclaw.agents.get(agent.id);
// Update
await korclaw.agents.update(agent.id, { status: "active" });
// Delete
await korclaw.agents.delete(agent.id);
// Paginate all
for await (const a of korclaw.paginate((c) => korclaw.agents.list({ cursor: c }))) {
console.log(a.name);
}